We may earn a commission if you make a purchase through the links on our website.

EDIFACT vs X12 Guide

EDIFACT vs X12 Guide

Diego Asturias UPDATED: October 11, 2022

EDIFACT and X12 are two popular data exchange syntax standards used for Business-to-Business (B2B) communication and based on the Electronic Data Interchange (EDI) standard electronic format.

EDIFACT and X12 are very similar goals: their set of rules aim to optimize and standardize the flows of data between business partners, regardless of geography, industry, technology, and language. Still, both standards do have some differences. These are especially found in their use case and geography of users.

In this post, we’ll go through the X12 and EDIFACT standards, how they work, their similarities, and their differences. We’ll also show you a step-by-step guide on how you can get started. 

What is EDIFACT?

The EDI For Administration, Commerce, and Transport (EDIFACT), also referred to as United Nations/EDIFACT (UN/EDIFACT) is an international standard defined by the UN/ECE (United Nations/Economic Commission for Europe), for intercompany electronic data exchange. The EDIFACT standard defines a set of rules and guidelines for the exchange of structured data between two independent systems using the technical basis of the EDI concept. 

Characteristics:

  • It provides a set of syntax rules that structure data.
  • The exchange of data is systems and platform-agnostic.
  • It is popular worldwide, but more common in Asia and Europe. It is used outside the US.

EDIFACT was designed to optimize the flow of data between two business partners, regardless of their technology, industry, or country of origin, by standardization. It ensures that data transmitted between two systems is respected and interpreted correctly.

EDIFACT is popular in the international supply chain, logistics, and transportation industries. For example, only in the retail sector, EDIFACT is used by +100,000 traders worldwide.EDIFACT in the international supply chain, logistics, and transportation industries

How does EDIFACT work?

EDIFACT is similar to a language with rules, where the vocabulary and grammar can make up a message. EDIFACT relies on syntax rules (the grammar) based on the character set and the data elements (vocabulary).

The syntax contains the set of rules, which defines: 

  • Structure of data in a message.
  • Acceptable character sets.
  • The message structures.

A message represents a single business document, which is made up of a collection of segments in sequence and defined within areas.

EDIFACT Document Structure

EDIFACT provides a hierarchical structure for messages. Refer to the above diagram; the first segment within a message is a message header (identified by UNH), and the segment finishes with a footer or (UNT) message trailer. The service segments, UNB-UNZ and UNG-UNE are referred to as envelopes and the UNA is an optional delimiter. The transaction set (message) includes anything from invoices, Purchase Orders (POs), to Delivery Notes (DNs), and they are identified by a six-character name (i.e. ORDERS for purchase orders).

Below is an example. The following EDIFACT message (source) was used to answer an availability request for a flight ticket (FRA-JFK-MIA).

EDIFACT message

What is X12?

X12 is an interoperable and syntax-neutral standard used for cross-industry and cross-company electronic data exchange. It is the EDI format standard used by default in the United States. All EDI transactions within the United States must comply with the X12 standard. All these transactions also require in many cases, X12-compliant software to allow translation and message integrity. With X12, the businesses within the US can exchange information with each other without having to worry about incompatible software/hardware or insecure communications.

X12 also goes by two longer, formal names: “ANSI ASC X12” or “EDI ANSI X12”. 

In 1979, the American National Standards Institute (ANSI) granted authority to the Accredited Standards Committee (ASC) X12 to create and maintain standards for inter-industry and inter-business for their Electronic Data Interchange (EDI). Today, ASC X12 (or ANSI ASC X12) develops and maintains X12 EDI, the Context Inspired Component Architecture (CICA) standards, and XML schemas.

X12 encompasses many different industries including, health care, transportation, finance, commerce, insurance, supply chain, and more.

X12 in health care

X12 Characteristics:

  • All EDI within the US for HIPAA is based on X12. Due to the HIPAA regulations enacted in 1996, X12 is the defacto EDI standard in the healthcare industry.
  • X12 has a comprehensive set of transactions and EDI documents including health care claims, invoices, purchase orders, price catalogs, shipment information, delivery notes, and many more.
  • X12 EDI sets include Communications & Controls, Finance, Transportation, Supply Chain, Insurance.
  • Industry specific-X12 substes include HIPAA, UCS, VICS, AIAG, CIDX, EIDX, PIDX.

How does X12 work?

An EDI X12 is a text file separated by segments, elements, and delimiters. The segments within X12 text files are separated by a carriage return for easier reading, although this is not mandatory. The X12’s delimiter (or segment terminator) uses the character (~), to indicate when a segment ends. The segment identifiers for X12 are ISA-IEA, GS-GE, and ST-SE.

X12 Document Structure

The segments (ISA-IEA, GS-GE, and ST-SE) form an X12 envelope; which are found in all the X12 files and messages. The transaction set, (or the message) in the X12 file, contains all data including interchange, transmission date, time, etc.

In the example of an X12 message (source) below, the message starts at (BEG), the beginning of the segment. The message also contains an 850 which refers to a Purchase Order.

X12 message

EDIFACT vs X12

So now that you know what EDIFACT and X12 are, let’s point out their similarities and differences. 

The X12 (or ANSI ASC X12) and the EDIFACT (or UN/EDIFACT) are two of the most common standard document types based on the Electronic Data Interchange (EDI) format. Both standards are very similar, especially because they help with electronic document exchange.

But one of the key similarities is that they use a similar document’s structure. Both standard structures contain a transaction set (headers and footers), a functional group, and an interchange control header. Additionally, both can use the same or different communication protocols.

But what are their differences?

The biggest difference is in their use case and the geographic location of their users.

  • Geography. X12 is the default and prevalent EDI standard used in the U.S. EDIFACT is the EDI standard used by international companies, outside the US and most prevalent in Europe and Asia.
  • Use Case. X12 has become very popular in the healthcare industry. It is used for creating HIPAA-compliant documents. EDIFACT does not offer HIPAA compliance. But still, both standards are used in other industries like finance, supply/chain, transport, etc.
  • Development and Management. X12 was created and is managed by the ASC X12 (chartered by ANSI). The EDIFACT is developed by the United Nations Economic Commission for Europe (UNECE) and the International Organization for Standardization (ISO).
  • EDI Terminologies. Both standard terminologies are different (refer to the diagram below). For example, although the Functional Group for both EDI-based documents contains a header and a footer, they are called differently. For X12, these are called GS (Functional Group Header) and GE (Functional Group Footer), while EDIFACT uses UNG as header segment and UNE as the footer segment. UNG and UNE are both optional in EDIFACT (but not in X12). The same for Interchange, X12 uses ISA and IEA (for header and footer respectively), while EDIFACT calls them UNB and UNZ.

X12 Document Structure and EDIFACT Document Structure

  • EDI Document. EDIFACT comes with an optional segment (UNA) only found in EDIFACT and not used in X12. This EDI document defines the characters used in the documents. For X12, (but also for EDIFACT) these characters can be defined with Out-Of-Band (OOB) methods.
  • Characters: X12 and EDIFACT use different characters to separate segments and elements. X12 uses terminators, while EDIFACT uses separators.
  • Document Style: X12 standard uses 3-digit number documents (810 for invoice), while EDIFACT uses six letters (INVOIC for invoice). Below are some examples of these differences.
Document  ANSI X12 Transaction Set  EDIFACT Message
Invoice 810 INVOIC
Planning Schedule 830 DELFOR
Purchase Order 850 ORDERS
Freight Invoice 859 IFTMCS
Functional Acknowledge 997 CONTROL

How to use X12 and EDIFACT EDI-based standards?

Technically, you could open an EDIFACT or X12 file with any text editor, including the standard Windows Notepad.exe. However, translator software is used to read and understand these files by recognizing segments and elements. In addition, you could send a file via email, but transmission software is preferred to manage and secure document exchange.

Below are simple steps to get started with any of these standards:

  1. Prepare and organize your documents according to the EDI standard. Prepare and organize your documents based on the right X12 or EDIFACT segments and data elements. These documents may range from spreadsheets, screens, electronic reports, etc.
  2. Use EDI translation and validation software. Translate your EDI formatted documents into a standard (either EDIFACT or X123) that both companies understand. Validate them once translated. Learn how to translate your EDI data.
  3. Define your exchange protocols and software. The most popular way to exchange EDI X12 or EDIFACT files and documents across a network is by using normal email, HTTP, or File Transfer Protocols (FTP). But using more secure protocols like SFTP and FTPS is recommended and even required by compliance. Two other FTP-based protocols were explicitly designed to use EDI; AS2 and OFTP.
  4. Set a point-to-point secure EDI connection. Once your document or file is converted according to the EDI X12 or EDIFACT formats, use secure Managed File Transfer (MTF) software to handle the communications. Choose software that helps you establish a secure and automatic point-to-point connection, and also that scales as a company's needs also grows.

Best Managed File Transfer Software

1. SolarWinds Serv-U Managed File Transfer Server – FREE TRIAL

SolarWinds’ Serv-U Managed File Transfer Server

SolarWinds Serv-U Managed File Transfer Server improves the control and security of your file transfers. Serv-U is a reliable FTP server software with centralized file transfer management and automation capabilities. In addition, it lets you maintain regulatory compliance for standards that involve securing data-in-transit, such as HIPAA, PCI DSS, FISMA, and SOX.

Pros:

  • Supports FTP, FTPS, and SFTP file transfers, making it a more flexible option than some of its competitors
  • Robust search features are ideal for large file transfers over long periods of time
  • Built with the enterprise in mind
  • Supports drag and drop transfers, making it an easy option for end-users
  • Built-in schedule works well for EDI and other regular transfers

Cons:

  • Would like to see a longer trial period for testing

Download: Register to get a 14-days free trial of Serv-U MFT Server.

Download 14-day Free Trial!

2. Files.com – FREE TRIAL

Files.com

Files.com is a secure cloud platform designed for files and workloads. This platform allows you to share files via share links, inbound inbox messages, and workflows. Files.com can be integrated and automated for file transfers. It can connect via FTP, SFTP, and WebDAV, and even mount or sync with cloud or on-premises storage.

Files.com is a good choice for transferring X12 files because the service is designed to be compatible with HIPAA compliance.

Pros:

  • Cloud-based service with no lengthy onboarding process or complicated setup
  • Cloud storage provides scalable storage and features without needing an on-premise setup
  • Support file redundancy and backup
  • Integrates well with other services like Dropbox or Google Drive, giving it more flexibility than similar products
  • Takes security seriously, enforces 2FA
  • Subscription tiered pricing makes this an accessible solution for any size business

Cons:

  • The platform offers many different features, which can require a time investment to learn them all

Sign up to Files.com to start a 7-day free trial

Start 7-day Free Trial!