All guides

X12 vs EDIFACT: how the two EDI standards differ for order teams

X12 and EDIFACT are two EDI standards that carry the same kinds of business documents, such as purchase orders and invoices. They differ in who maintains them, how messages are named, and how the file is wrapped. X12 is the dominant standard in North America, and EDIFACT has broad adoption across Europe and other international markets, according to TrueCommerce. Which one you use usually depends on where your trading partner is.

Who maintains each standard?

X12 describes itself as “an ANSI-accredited, consensus-based, non-profit organization”. It says it develops and maintains EDI standards and XML schemas, and lists more than 320 transaction standards.

EDIFACT came out of the United Nations. Stedi’s EDIFACT reference describes it as “a set of internationally agreed standards, directories, and guidelines for the electronic interchange of structured data,” approved and published by UNECE in the UNTDID. TrueCommerce puts the contrast this way: EDIFACT was developed through the United Nations for international electronic commerce, while X12 was developed by the ANSI-accredited ASC X12 committee.

How do the message names differ?

X12 uses numbered transaction sets. EDIFACT uses descriptive message codes. TrueCommerce gives these pairs:

Document X12 EDIFACT
Purchase order 850 ORDERS
Invoice 810 INVOIC
Ship notice 856 DESADV

TrueCommerce lists ORDERS, DESADV and INVOIC as examples of EDIFACT codes and 850, 856 and 810 as examples of X12 sets, and its table maps all three pairs. Still, a partner’s implementation guide decides which message they really use.

If you already know the X12 side, start with the 850 purchase order, the 856 advance ship notice and the 810 invoice. An EDIFACT partner will send the equivalent business content in a different layout.

How is the file wrapped?

Both standards wrap documents in envelopes. Microsoft’s BizTalk documentation says the headers and trailers for both are similar. The segment names differ:

Level X12 EDIFACT
Interchange ISA and IEA UNB and UNZ
Functional group GS and GE UNG and UNE
Document ST and SE UNH and UNT

The same page says the EDIFACT group header and trailer pair is conditional, so a file may not have one. Stedi’s pages describe ISA as the segment that starts an interchange of zero or more functional groups. They describe UNB as the segment that identifies an interchange. UNB carries the sender, the recipient, the date and time of preparation, an interchange control reference, and a test indicator.

The envelope layers in an interchange
  1. 1Interchange (ISA or UNB)
  2. 2Functional group (GS or UNG)
  3. 3Document (ST or UNH)
  4. 4Document trailer (SE or UNT)

Names show the X12 segment first, then the EDIFACT one. Trailers close each layer in reverse order.

How are the separators defined?

Microsoft’s documentation says the major difference in the headers is the UNA service string advice header in EDIFACT, which defines the separators used in the interchange. In X12, the separators are defined in the ISA header.

The UNA header is not required in EDIFACT, according to the same page. If it is missing, BizTalk, for example, uses the separators set in its own configuration.

Stedi’s ISA page adds one rule for X12: the component element separator “must be different than the data element separator and the segment terminator.” It is a delimiter, not a data element.

For you, this means a file can be valid in structure and still fail if your system expects different separators. Check the sample files from a new partner before you build a map.

Does the choice affect your order process?

The business questions stay the same: Did the order arrive, is it accepted, what is shipping, and what do we invoice? Your order to cash process does not change because a partner uses EDIFACT. The mapping, the codes and the test steps do.

Things that usually change:

  • Code lists and qualifiers. Each standard has its own, so a mapping table from your X12 codes will not carry over.
  • Versions. Stedi’s X12 page says X12 Release 8010 was published in 2020, and its EDIFACT page says Release D21A was published in 2021. Partners may run other releases, so ask which one they use.
  • Acknowledgments. An X12 partner may expect a 997. Ask an EDIFACT partner which acknowledgment message they expect.
  • Validation. Errors in one standard will not read the same as in the other, so your team needs a reference for each.

What should you ask a new trading partner?

These questions are practical suggestions, not rules from either standard:

  1. Which standard and which release do you use?
  2. Which messages do you want from us, and which will you send?
  3. Can you send sample files and your implementation guide?
  4. Which separators and character set does your interchange use?
  5. How do we test, and who signs off on go-live?
  6. Which acknowledgment do you expect for each file?

Write the answers down by partner. A mismatch between the guide and what is actually sent is a common cause of order exceptions.

Where Dockmend fits

Dockmend is being built to help operations teams read partner orders and messages, match them to their own records and flag exceptions for a person to review. It is still being built, and we have not announced support for any specific EDI standard or message. Start your free trial

This guide is general information, not legal or professional advice. EDI details vary by trading partner, version and implementation guide, so check your partner’s before you build or change anything.