Transform EDIFACT messages to JSON or XML messages

Author: Avinash Upadhyayula

EDIFACT Messages

EDI, or Electronic Data Interchange, is the most popular communication technology that’s used to effectively transfer data from system to system. EDIs offer a paperless option to businesses for securely transfer data within their business community electronically.

Mule’s EDIFACT connector supports versions D.93A, D.95B, D.96A, D.97A, D.98B, D.99A, D.99B, D.00A, D.01B, D.02A, D.03A

Sample Message

EDI Schema Language

EDI Schema Language to represent EDI schemas. ESLs define the structure of EDI messages in terms of structures (messages, in EDIFACT terminology), groups, segments, composites, and elements. ESLs for the EDIFACT versions d00a, d01b, d02a, d03a, d93a, d95b, d96a, d97a, d98b, d99a, and d99b are included.

Mule’s EDIFACT connector uses these schema’s to validate and parse EDIFACT messages to Map which can further used in dataweave to retrieve required data.

Sample EDI Schema

Creating mule application using EDIFACT connector

  1. Download EDIFACT connector from exchange into studio
  1. Create mule flow to process EDIFACT messages and transform them into XML or JSON messages.


  1. EDIFACT Connector configurations
  1. Project structure



  1. Running the project

Trigger the mule flow using postman as shown below.

Pass ‘output’ header value as ‘JSON’ or ‘XML’

EDIFACT to JSON transformation example





EDIFACT to XML transformation example

Pass header as show below

The above example illustrates how to parse EDIFACT messages with the help of EDI schema file and to transform the message into required formats. 


We use cookies on this site to enhance your user experience. For a complete overview of how we use cookies, please see our privacy policy.