Skip to main content
All CollectionsX12 EDIEDI Basics
X12 - Structure of EDI
X12 - Structure of EDI
Micah A. Parker avatar
Written by Micah A. Parker
Updated over 2 weeks ago

Product: X12


All Electronic Data Interchange (EDI) for X12 follows a basic standardized structure that allows for EDI Networks to understand the data being passed between Trading Partners.


Basic Structure


Transaction Sets all follow a general structure that breaks down the data being exchanged into specific groupings that can be parsed.

  • Interchange Control Header and Trailer: The beginning and end of the entire EDI transmission. These parts contain information like sender/receiver IDs and control numbers to ensure the correct processing of the data.

  • Functional Group Header and Trailer: Group messages that share similar purposes (e.g., all invoices).

  • Transaction Set: The individual message being transmitted (e.g., an invoice or purchase order).

  • Segment: Each Transaction Set is made up of segments, which are groups of related data elements.

  • Data Elements: The smallest unit of information in a segment (like a number, date, or code).


Segments


Segments are the building blocks of an X12 message. They are typically represented by a short code (e.g., ISA, GS, ST, BEG) followed by a set of data elements. Each segment serves a specific purpose.

  • Example of a Segment: BEG*00*NE*12345*20121201

    • BEG: Beginning segment for a transaction set.

    • 00: Transaction Set Purpose Code.

    • NE: Purchase Order type.

    • 12345: Purchase Order number.

    • 20121201: Date.


Elements


Data elements are individual pieces of data within a segment. They are separated by a special character, commonly an asterisk *.

  • Example: BEG*00*NE*12345*20121201

    • 00: Purpose code.

    • NE: Order type.

    • 12345: Order number.

    • 20121201: Date (YYYYMMDD format).


Delimiters


X12 EDI uses special characters to separate the different components of the message, while some Trading Partners may use different delimiters - the most common configuration is utilizes *, ~, and : to communicate the sections of a Segment.

  • Asterisk (*): Separates individual data elements within a segment.

  • Tilde (~): Separates different segments - often referred to as a Segment Terminator

  • Colon (:): Sometimes used for further data breakdown within specific elements.


Transaction Set Examples


Each X12 document has a specific format, which is dictated by its Transaction Set Code(e.g., 810 for an invoice, 850 for a purchase order). Each type of message (Transaction Set) follows its own set of required and optional segments.


Interpreting the Data


Once you identify the segments and data elements, you can interpret the meaning of each. A specific code within a segment might represent a piece of business data like an order number, date, item description, or price.

  • For instance, PO1 segment indicates the line item in a purchase order with information such as quantity and unit price.


Validation and Processing


After reading and understanding the message, EDI software or a system typically validates the data to ensure it follows the correct syntax and format rules. Then, it can be processed by the receiving system to take the appropriate business action (e.g., placing an order, processing payment).

In Summary

To read an X12 EDI message, look for:

  • Segment identifiers (e.g., BEG, PO1, SE).

  • Data elements separated by an asterisk.

  • Transaction set codes to understand the type of message.

  • Delimiters (like * and ~) that organize the data.

With these, you can break down the structure and interpret the details of the message for business purposes.

12/03/2024

Did this answer your question?