Inputs
The options mirror a BizTalk MLLP send port.
| Input | Meaning |
|---|---|
message | The HL7 message or batch to send. Segment terminators are normalized to CR unless normalizeSegmentTerminators is false. |
waitForAck | Wait for the acknowledgement (solicit-response). Default true. |
ackTimeoutSeconds / connectTimeoutSeconds | Defaults 30 and 15 seconds. |
keepConnectionOpen | Keep one pooled, persistent connection per endpoint; messages on it are serialized. |
validateAckControlId | Check that MSA-2 matches the sent MSH-10. Default true. |
failOnNegativeAck | Fail the action on AE/AR (CE/CR) so the retry policy resends. |
archive | Archive the message before it is written to the connection, and the ACK received. |
Example
Send an encoded message to the EMR, keep the connection open, and retry on a negative ACK:
"Send_to_EMR": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"message": "@{body('Encode_HL7')?['hl7Message']}",
"waitForAck": true,
"ackTimeoutSeconds": 30,
"keepConnectionOpen": true,
"failOnNegativeAck": true,
"archive": true
},
"serviceProviderConfiguration": {
"connectionName": "mllpEmr",
"operationId": "sendMessage",
"serviceProviderId": "/serviceProviders/lamboHl7Mllp"
}
},
"retryPolicy": { "type": "fixed", "count": 3, "interval": "PT10S" }
}Output
{
"messageControlId": "MSG00042", "bytesSent": 1187, "remoteEndpoint": "10.20.1.15:2575",
"connectionReused": true, "elapsedMs": 38,
"ackReceived": true, "ackCode": "AA", "ackControlId": "MSG00042", "ackText": "", "isPositive": true,
"ack": "MSH|^~\&|EMR|HOSP|LAB|HOSP|20261016093001||ACK^A01^ACK|A0001|P|2.5.1\rMSA|AA|MSG00042",
"isBatch": false, "messageCount": 1, "archiveId": "…"
}Errors
| Status | When |
|---|---|
| 502 | Connection, socket or MLLP protocol errors |
| 504 | No ACK within ackTimeoutSeconds |
| 403 | No valid license, or TLS is required and the connection doesn't use it |
| 503 | Archiving is required but neither its targets nor the spool took the record (nothing is sent) |
Outbound connections leave the Logic App directly. On App Service plans, private destinations need VNet integration.