EDIFACT messages can be processed in a Logic App, either decoding incoming messages or encoding outbound ones. To configure EDIFACT message encoding and decoding, a number of steps must be taken:
- Add the schema into the integration account
- Create both partners
- Configure the agreement
- Use the agreement in the Logic App
Configure the integration account:
To start the procedure, the first step is to add the schema into the integration account. EDIFACT schemas are available at the following link: EDIFACT schema.
Then, define 2 partners. The first will be the message sender and the second the message recipient.
Lastly, the agreement must be configured. First enter the type of agreement and the two partners (“Host” is the sender, and “Guest” the message recipient).
When receiving a message, the “Receive Settings” need to be configured to indicate the schema being used (i.e. EDIFACT) and the desired validation type.
When sending a message, the “Send Settings” need to be configured to indicate the schema being used (i.e. EDIFACT) and all the agreement details by entering the header segments with the version or encoding used.
Once everything is in place in the integration account, a call to the “Encode to EDIFACT” or “Decode EDIFACT” steps in the Logic App is all that is required.
To encode, the name of the agreement and the XML message to be encoded are the two parameters required.
For decoding, the XML message alone is sufficient. The corresponding agreement is found using data in the first segments in the message, such as the partners.
In conclusion, I find that EDIFACT message handling in Logic Apps is quite well designed. The configuration is fairly comprehensive, and it is easy to process messages, provided they match the associated standard. If this is not the case, it is always possible to modify the XSD schema in order to make it match.