We have a lot of manufacturers that we send X12 850 purchase orders to. We don’t always receive a 997 and I am wondering if its possible to read and parse the MDN and extract the response confirming delivery.
My goal is to confirm AS2 delivery and add an Email send connector to the flow and notify our purchasing department that the PO was received.
Thanks
Page 1 / 1
When you ask about reading the MDN, are you looking to obtain a copy of the MDN receipt, or do you just want to be able to trigger an action based on when the returned MDN has been understood by the application.
If the latter is the case (and it sounds like it is), you can rely on the fact that an AS2 transfer is not considered a success until the MDN receipt is returned by the receiver of the message, the signature verified, and the Content-MIC compared to the original transfer.
This means that if you use the Show Success Path feature of the AS2 connector:
You can route the transferred message to a Notify or EmailSend connector to notify of delivery.
However, I should clarify the role of the MDN receipt, as it does contrast with the 997. A 997 is a functional acknowledgement of an EDI-X12 document, and indicates that an EDI document (the 850 here) was read and understood by the receiver of the transmission. This is a loose analogy, but the MDN functions as a delivery receipt without details about what was delivered (like an email notification from USPS that your packing weighing X lbs was delivered to its destination, but not quite like a packing slip).
The MDN receipt is a simple acknowledgement of the payload of the AS2 transmission. Contained within the MDN receipt is a Received-Content-MIC, which is a checksum of the payload received at the receiving party, but this is simply an acknowledgement of a payload received at the destination without any information about the contents of that payload.
This checksum is compared against what was sent by the sending agent (Arc), and the transmission is only considered a success if that checksum matches and the signature on the checksum is valid. You are ensured that the bytes that you intended to deliver were received by your partner, but the MDN has no indication that the PO for example, was valid.
The MDN itself is recorded as a log file, linked to the Success status of the transmission (in the .mdn log for the transmission). The MDN file itself isn’t processed as a separate message in Arc - because the calculations performed to get the checksum of the original payload are performed by the machine that signed it, the MDN log file is not something that can generally be validated outside of the program that signed the original message.