EDIFACT versus ANSI X12

How the two major EDI standards differ in delimiters, segment names and regional use.

Two major EDI standards are in use worldwide: the European UN/EDIFACT and the North American ANSI ASC X12. They do the same job with different syntax and naming.

Delimiter characters

EDIFACTX12
Segment terminator'~
Element separator+*
Component separator:>

The quickest way to tell which standard a file follows is to look at the first line: UNB means EDIFACT, ISA means X12.

Segment and document names

EDIFACT names document types in readable form (ORDERS, INVOIC, DESADV); X12 uses numeric transaction set codes.

DocumentEDIFACTX12
Purchase orderORDERS850
Order responseORDRSP855
Order changeORDCHG860
Despatch adviceDESADV856
InvoiceINVOIC810
Inventory reportINVRPT846
Remittance adviceREMADV820

Segment names diverge too: an address is NAD in EDIFACT and N1 in X12; quantity is QTY in EDIFACT but usually sits inside the line segment (PO1, IT1) in X12.

Structural difference

X12 builds its envelope in three layers: ISA (interchange), GS (functional group) and ST (transaction set). In EDIFACT the functional group layer (UNG) is optional and in practice rarely used.

Which one will you work with?

That is usually your trading partner's decision rather than yours. Working with a European chain means EDIFACT; working with an American retailer means X12. Being able to open and read both formats in one tool is a practical necessity for companies that trade with both.