ANSI X12 vs UN/EDIFACT
Which one to choose?
To choose between ANSI X12 vs UN/EDIFACT standards it all comes down to where and with whom your doing business with. ANSI X12 is most commonly used in North America and UN/EDIFACT is mostly used in Europe and Asia.

ANSI X12 Standard
ANSI stands for American National Standard Institute founded by the Accredited Standards Committee (ASC) in 1979 these are a set of standards and rules that determine a specific syntax for structuring and transferring business documents electronically between partners. This standard is also sometimes called ANSI X12 Standard or just simply X12.
ANSI X12 uses a hierarchical structure, which means that there are levels of segments. The top-level segment is the ISA segment, which identifies the sender and receiver of the message. Below the ISA segment, there are functional group segments, followed by transaction set segments, and then data segments. ANSI X12 has a wide range of message types, including purchase orders, invoices, shipping notices, and payment orders.

Transaction Set and Messages: the main body of the message — e.g., the purchase order details in a purchase order. X12 calls it a Transaction Set
The Functional Group: the header that specifies where the message will go, e.g., a company department. It can contain multiple Transaction Sets/Messages, for example, two or three invoices or an invoice and a PO. For both standards, the Functional Group has a header segment and a footer segment. X12 uses GS for the header segment and GE for the footer.
The Interchange: consists of a header and footer and identifies the company that you're sending the document to. X12 uses ISA for the header and IEA for the footer.
The EDI Document: These characters are specified out-of-band in X12 and are an optional control segment.
ASC X12 Segments and Sequence
The following Purchase Order example shows which segments can be used in the transaction set and the desired sequence of segments:
ID TITLE
ST Transaction Set Header
BEG Beginning Segment for Purchase Order
CUR Currency
REF Reference Identification
PER Administrative Communications Contract
TAX Tax Reference
FOB F.O.B. Related Information
CTP Pricing Information
PAM Period Amount
CSH Sales Requirements
TC2 Commodity

Benefits of ANSI X12 Standard
The ANSI X12 standard is a widely used electronic data interchange (EDI) standard in North America. It offers several benefits for organizations that use it to exchange electronic data. Here are some of the main benefits of the ANSI X12 standard:
Streamlined Electronic Data Exchange
The ANSI X12 standard enables organizations to exchange electronic data in a streamlined and efficient manner. It eliminates the need for manual data entry, which can reduce errors and save time. The standard defines a consistent format for data exchange, which ensures that data is easily understood and processed by both the sender and receiver.
Wide Range of Message Types
The ANSI X12 standard offers a wide range of message types for organizations to exchange data, including purchase orders, invoices, shipping notices, and payment orders. This allows organizations to exchange different types of data and automate many of their business processes.
Cost Savings
Using the ANSI X12 standard can result in cost savings for organizations. Electronic data exchange eliminates the need for paper-based transactions, reducing printing, postage, and processing costs. It also eliminates the need for manual data entry, reducing labor costs.
Increased Accuracy
The ANSI X12 standard can help improve data accuracy by reducing errors that can occur during manual data entry or paper-based transactions. The standard defines a consistent format for data exchange, which helps ensure that data is accurate and complete.
Industry Acceptance
The ANSI X12 standard is widely accepted and used in many industries, including healthcare, finance, retail, and automotive. Using a standard that is widely accepted can help organizations streamline their business processes and improve their supply chain efficiency.
UN/EDIFACT Standard
UN/EDIFACT (United Nations/Electronic Data Interchange for Administration, Commerce, and Transport is the international standard that was developed by the United Nations). Comprise a set of internationally agreed standards, directories, and guidelines for the electronic interchange of structured data, between independent computerized information systems.
EDIFACT uses a flat structure, which means that there are no levels of segments. All segments are at the same level. The UNA segment is used to identify the separator characters used in the message. Below the UNA segment, there are message header segments, followed by data segments. EDIFACT has a wide range of message types, including purchase orders, invoices, shipping notices, and payment orders.
An EDIFACT message represents a single business document. – For example, an ORDRSP file represents a Purchase Order note. Each message has a six-letter identifier that shows the short name of the message.
Any document in the UN / EDIFACT standard has a hierarchical structure. The entire electronic document is called a message. A message consists of data groups combined in some way, for example, a data group describing customs payments, a group of data describing the attributes of documents, etc. In turn, the group consists of typical data segments that describe document attributes in more detail. The standard provides about 200 different types of segments from which messages are composed. The segments themselves also have a hierarchical structure and consist of data elements that can be simple (data field) and composite (usually 2-3 data fields).
The following is the structure of an EDIFACT transmission:
- Service String Advice
- Interchange Header
- Functional Group Header
- Message Header
- User Data Segments
- Message Trailer
- Functional Group Trailer
- Interchange Trailer

See below for an example of an EDIFACT message used to answer a flight ticket (FRA-JFK-MIA) availability request:
UNA:+.? '
UNB+IATB:1+6XPPC:ZZ+LHPPC:ZZ+940101:0950+1'
UNH+1+PAORES:93:1:IA'
MSG+1:45'
IFT+3+XYZCOMPANY AVAILABILITY'
ERC+A7V:1:AMD'
IFT+3+NO MORE FLIGHTS'
ODI'
TVL+240493:1000::1220+FRA+JFK+DL+400+C'
PDI++C:3+Y::3+F::1'
APD+74C:0:::6++++++6X'
TVL+240493:1740::2030+JFK+MIA+DL+081+C'
PDI++C:4'
APD+EM2:0:1630::6+++++++DA'
UNT+13+1'
UNZ+1+1'
Benefits of UN/EDIFACT
Global Acceptance
UN/EDIFACT is widely accepted and used globally in many industries, including transportation, finance, retail, and healthcare. Using a standard that is recognized and accepted worldwide can help streamline business processes and improve supply chain efficiency.
Wide Range of Message Types
UN/EDIFACT offers a wide range of message types for organizations to exchange data, including purchase orders, invoices, shipping notices, and payment orders. This allows organizations to exchange different types of data and automate many of their business processes.
Reduced Costs
Using UN/EDIFACT can result in cost savings for organizations. Electronic data exchange eliminates the need for paper-based transactions, reducing printing, postage, and processing costs. It also eliminates the need for manual data entry, reducing labor costs.
Improved Accuracy
UN/EDIFACT can help improve data accuracy by reducing errors that can occur during manual data entry or paper-based transactions. The standard defines a consistent format for data exchange, which helps ensure that data is accurate and complete.
Increased Efficiency
Using UN/EDIFACT can help organizations streamline their business processes and improve supply chain efficiency. Electronic data exchange enables faster and more efficient data transfer between organizations, reducing the time and effort required for manual data entry and paper-based transactions.
Common EDI Transaction Document Codes Used in ANSI X12 and UN/EDIFACT
ANSI X12 | UN/EDIFACT | Name | Uses |
EDI 810 | INVOIC | Invoice | Used to receive payment for goods purchased |
EDI 820 | REMADV | Payment order / Remittance advice | Used to transfer information relating to payments |
EDI 830 | DELFOR | Planning schedule | Used to share with the supplier's forecast purchase plans |
EDI 832 | PRICAT | Price/sales catalog | Used to provide product price information |
EDI 846 | INVRPT | Inventory inquiry / advice | Used to communicate inventory levels |
EDI 850 | ORDERS | Purchase order | Used to place order for goods or services |
EDI 852 | SLSRPT | Product activity data | Used to provide sales, inventory and other product activity information |
EDI 855 | ORDRSP | PO acknowledgement | Used as an acknowledgement of the purchase order |
EDI 856 | DESADV | Advance ship notice / dispatch advice | Used to inform the recipient in advance about the shipment contents |
EDI 860 | ORDCHG | PO change (customer triggered) | Used to communicate order changes to the supplier |
EDI 865 | ORDRSP | PO change (supplier triggered) | Used to acceptance or rejection of changes to a previously submitted purchase order |
EDI 997 | CONTRL | Functional acknowledgement | Used to acknowledge that an EDI transaction was received |
Conclusion
X12 and EDIFACT are both widely used EDI standards for exchanging electronic data between organizations. X12 is used primarily in North America, while EDIFACT is used globally. They both have their own unique features and benefits, such as X12's hierarchical structure and EDIFACT's flat structure. Both standards offer a wide range of message types, allowing organizations to exchange different types of data. Regardless of which standard an organization uses, EDI enables seamless and efficient electronic data exchange.