EDIFACT (Electronic Data Interchange for Administration, Commerce and Transport) is an international standard developed under the United Nations (UN/CEFACT) for the structured electronic exchange of business documents between organizations.

Instead of exchanging paper documents or custom data formats, trading partners exchange standardized messages such as:

  • Orders (ORDERS)
  • Invoices (INVOIC)
  • Despatch advice (DESADV)
  • Purchase order responses (ORDRSP)
  • Transport and customs messages

An EDIFACT message consists of segments, composite data elements, and simple data elements, identified by short codes and specified in a consistent hierarchy:

EDIFACT Construct Data Object Description Example (s)
Message type Business document structure CUSREP
Segment Business information unit NAD, UNH
Composite Grouping of related data elements S009: Message Identifier
Data Element Atomic business attribute 0065: Message Type, 0051: Controlling Agency, Coded, 0054: Message Release Number

Some of the common first lines of a message are illustrated here. For more details, see for :

UNH+1+INVOIC:D:01B:UN'
BGM+380+12345'
DTM+137:20261101:102'


Key characteristics:

  • Internationally recognized EDI standard
  • Widely used in retail, logistics, transportation, customs, healthcare, and manufacturing
  • Platform and application independent
  • Uses a compact, delimiter-based syntax rather than XML or JSON
  • Enables automated system-to-system data exchange

EDIFACT is a global grammar and vocabulary that allows business systems from different organizations to exchange orders, invoices, shipping notices, and other commercial documents automatically and unambiguously.


Each message was created and is maintained by one of the International Trade and Business
processes Groups, or TBG’s, depicted on the figure below:

tbg

A second figure shows the messages maintained by TBG04 Customs:

tbg04.png

The EDI viewer by ProgM (Germany) shows the structure and content of the messages with a detailed description of all elements and segments.


Comparing EDIFACT witht XML and JSON

EDIFACT, XML, and JSON all solve the same fundamental problem: exchanging structured data between systems.
They differ significantly in age, readability, flexibility, and typical use cases.

Aspect EDIFACT XML JSON
Introduced 1980s 1990s 2000s
Primary purpose Business-to-business (B2B) EDI Generic structured data exchange Web APIs and modern applications
Human readability Low Medium High
Verbosity Very compact Verbose Compact
Structure Segments and data elements Tagged hierarchical documents Key-value objects and arrays
Validation Message directories and code lists XML Schema (XSD) JSON Schema
Extensibility Controlled and standardized Highly extensible Highly extensible
Industry adoption Logistics, retail, customs, transport Enterprise integration, documents APIs, cloud, web, mobile
Parsing complexity High Medium Low

Purchase Order


Focus, Pro and Con


Many industries continue to use EDIFACT because it provides more than syntax:

  • Standard business messages (ORDERS, INVOIC, DESADV, etc.)
  • Standardized data elements (such as C058)
  • Agreed codelists
  • Decades of interoperability across trading partners

In practice, many organizations today use JSON internally and for APIs, while continuing to exchange EDIFACT externally with suppliers, logistics providers, retailers, and customs authorities.


Remark: Comparison was asked to Copilot on November 1, 2026. Links to other Societal architecture model elements and some modifications by the editor so as to better illustrate the relevance of the concept for #Tagcoding.