EDIFACT versus ANSI X12
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
| EDIFACT | X12 | |
|---|---|---|
| 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.
| Document | EDIFACT | X12 |
|---|---|---|
| Purchase order | ORDERS | 850 |
| Order response | ORDRSP | 855 |
| Order change | ORDCHG | 860 |
| Despatch advice | DESADV | 856 |
| Invoice | INVOIC | 810 |
| Inventory report | INVRPT | 846 |
| Remittance advice | REMADV | 820 |
|---|
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.