Inbound Message Routing
Depending on the endpoint type and protocol, the successful routing of your partner’s send messages to the configured source endpoints uses the message type ID, file-naming pattern, and content type.
Messages That Use an AS2 Receive from Partners Endpoint
To successfully route inbound messages that use an AS2 Receive from Partners endpoint, your partner does the following:
-
For non-EDI files (JSON or XML), uses a filename that begins with
{message-type-id}_
.For example, if the message type is named
custom-po
, the filename must begin withcustom-po_
.There are no filename restrictions for EDI files.
-
Sets the AS2 MIME-Type in the inbound AS2 message as follows, depending on the message type:
-
EDIFACT:
application/EDIFACT
ortext/plain
-
JSON:
application/json
-
X12:
application/EDI-X12
ortext/plain
-
XML:
application/xml
-
CSV:
text/csv
-
Messages That Use an FTP or SFTP Endpoint
The process that Partner Manager uses to route inbound messages differs depending on whether the messages are EDI messages (Edifact or X12) or non-EDI messages (JSON or XML).
EDI Messages
Partner Manager routes an inbound EDI message based on the EDI identifier in the message content.
Non-EDI Messages
Partner Manager routes an inbound non-EDI message based on either the associated message type or the filename:
-
If you specified an associated message type in the endpoint configuration, Partner Manager routes the message based on that message type.
-
If you did not specify an associated message type in the endpoint configuration, Partner Manager routes the message based on the filename. The filename must begin with
{message-type-id}_
and have an appropriate file extension:-
.json
for JSON files -
.xml
for XML files -
*.csv
for CSV files
-
For example, if the message type is named custom-po
and it is formatted as XML, the filename must begin with custom-po_
and end with .xml
.
Messages That Use an HTTP or HTTPS Receive from Partners Endpoint
To successfully route inbound messages that use an HTTP Receive from Partners endpoint or an HTTPS Receive from Partners endpoint, your partner does the following:
-
For EDI messages (EDIFACT or X12), posts them to the base URL and sets the Content-Type value in the incoming HTTP request as follows, depending on the message format:
-
EDIFACT:
application/EDIFACT
ortext/plain
-
JSON:
application/json
-
X12:
application/EDI-X12
ortext/plain
-
XML:
application/xml
-
CSV:
text/csv
-
-
For non-EDI messages (JSON or XML), includes the message type ID in the relative path of the HTTP request.
For example, suppose you have the following scenario in a CloudHub deployment:
-
The base URL of the HTTP or HTTPS Receive from Partners endpoint is
https://b2b-inbound-http-abcd.us-e2.cloudhub.io:443/receive1/
. -
The expected message type ID for the inbound message is
custom-po
.In this case, your partner should post the message to the
https://b2b-inbound-http-abcd.us-e2.cloudhub.io:443/receive1/custom-po
URL.
-