close

Already a user? Sign in here

UN/EDIFACT

The international standard for exchanging purchase orders, despatch advice and invoices between trading partners. What it is, how a message is built, what a directory version means, and the full specification for every version held here.

UN/EDIFACT is the international standard for exchanging business documents between organisations electronically. The name stands for United Nations rules for Electronic Data Interchange for Administration, Commerce and Transport, it is maintained by UN/CEFACT, and its syntax is published as ISO 9735.

What UN/EDIFACT actually defines

The standard sets out an agreed structure for documents that cross company boundaries: a purchase order, a despatch advice, an invoice. Rather than a file format one company invented, it gives both sides the same definition of what a field means, which fields are mandatory, and how they are ordered, so a document written by one system can be read by another that has never seen it.

Each document type is a message, identified by a six-letter code. ORDERS is a purchase order, DESADV a despatch advice, INVOIC an invoice, ORDRSP a response to an order. There are several hundred, though most trading relationships use fewer than ten.

How an EDIFACT message is put together

A message is built from nested parts, each with its own identifier. Reading one is a matter of knowing which level you are looking at.

Level What it is
Interchange The envelope, opened by UNB and closed by UNZ. Carries sender, recipient and a reference for the whole transmission.
Message One business document, opened by UNH and closed by UNT. An interchange can hold many.
Segment group A repeating block, such as the group holding each order line and everything attached to it.
Segment A three-letter unit of meaning: NAD for a party, LIN for a line item, QTY for a quantity, MOA for an amount, DTM for a date.
Data element A single value inside a segment, often qualified by a code that says what the value represents.

Qualifiers are where most of the difficulty sits. A DTM segment does not mean "a date", it means "a date of the type this qualifier names", and the same segment appears many times in one message carrying different meanings each time.

What a directory version means

EDIFACT is versioned by directory, published twice a year. A code like D96A reads as the D directory, 1996, release A; D22B is the second release of 2022. A message definition can change between directories, gaining segments, changing whether a field is mandatory, or extending a code list.

This is why a trading partner specifies a directory rather than just a message. Both sides must build against the same one, and a mapping written for one directory will not necessarily validate against another.

EDIFACT, EANCOM, X12 and TRADACOMS

Standard Where it fits
UN/EDIFACT The international standard, and the superset the others below are measured against. Dominant across Europe.
EANCOM A GS1 subset of EDIFACT for retail. Narrower, with GS1 identifiers such as GLN and GTIN made mandatory. EANCOM 1997 is based on D96A, EANCOM 2002 on D01B.
ANSI X12 The North American standard. A different syntax entirely, using numbered transaction sets — 850 for a purchase order, 856 for a despatch advice, 810 for an invoice.
TRADACOMS A UK retail standard that predates EDIFACT. No longer developed, but still live in some long-standing retailer relationships.

Which version you will actually need

It is decided by your trading partner, not by you. D96A remains the most common in UK and European grocery because it is the base for EANCOM 1997, while newer programmes tend to be built on later directories. If a partner has not told you which they use, that is the first question to ask, because it determines everything that follows.

Frequently asked questions

What does EDIFACT stand for?

United Nations rules for Electronic Data Interchange for Administration, Commerce and Transport. It is maintained by UN/CEFACT, and the syntax rules are published as ISO 9735.

What does a version like D96A mean?

The D directory, published in 1996, release A. Directories are released twice a year, A then B, and a message definition can differ between them.

What is the difference between EDIFACT and EANCOM?

EANCOM is a GS1 subset of EDIFACT built for retail. It uses the same syntax and the same messages, with fewer options and GS1 identifiers made mandatory, so anything valid in EANCOM is valid EDIFACT but not the other way round.

Is EDIFACT the same as X12?

No. X12 is the North American standard and uses a different syntax and different document identifiers. A supplier trading in both regions generally needs both.

Where can I look up a specific message?

The directory list below covers every version held on this site. Each page gives the segment sequence in document order, which segments are mandatory, repeat counts and valid code values, and every segment is linked by its three-letter identifier so it can be cited directly.

EDIFACT directory versions

Every directory held on this site. Each links to the message types that version defines.

Sources and further reading