ASC X12 standard examples – transaction set, segment, element

ASC X12 body meets to develop and maintain EDI standards that facilitate electronic interchange relating to business transactions such as order placement and processing, shipping and receiving information, invoicing, payment and cash application data, and data to and from entities involved in finance, insurance, transportation, supply chains and state and federal governments.

The ASC X12 Manual is the ultimate source for the EDI standards. It is a large thick book with over 1500 pages of EDI transaction-set, segment and data element references. The following (courtesy of DISA and ASC X21 Manual) are extracts from ASC X12 manual in order to describe the formats of Transactions, Segments and Data Elements.

The following is an extract describing the format of the ASC X12 transaction set:


The following is an extract describing the format of a segment:


The following is an extract describing the format of a data element:

X12 segment

Viewing Data Element in the ASC X12 manual

The following is an extract from the X12 manual of the PO1 segment (truncated for display).


A: This is the data element reference designator. It is just a sequential number. PO1-02 can be referred to for the quantity.

B: This is the data element reference number. The element ID number can be used to look up all the details all about this element.

C: This is the name given to the data element. It should be descriptive enough to understand. For example, PO1-05 = Unit Price.

D: This is the requirement usage indicator and may contain the following:

  • O – Optional: The data element is optional. If trading partners choose, they can make this field mandatory in their implementation guidelines.
  • M – Mandatory: The element must appear in the segment. Trading partner implementation guidelines should not change the mandatory requirement to optional.
  • X – Conditional: The segment requirement depends on a conditional relationship. For example, if PO1-02 Quantity is sent then PO1-03 Unit of Measure must also be sent.

E: This is the data type attribute:

  • AN – Alpha Numeric: This will typically contain letters and digits, although it can also handle spaces and special characters.
  • R – Decimal Number: This is a numeric value. If the value is an integer, decimal points should not be sent. Decimal points should be sent only for fractional values. Negative amounts can be sent with a minus sign “-“ in front of the number. The absence of the minus sign indicates a positive value.
  • N(n) – Numeric: This can have two positions. The first N is a numeric value and the second (n) is the number of decimal places to the right.
  • ID – Identifier: The data type is specified by the data element ID that it relates to. For example, PO1-03 is the Unit of Measure Code

Looking up Element ID 355 in the EDI standards, you will find there are dozens of UOM options such as ‘EA’ for each or ‘01’ for actual pounds. Notice that ‘EA’ is alphanumeric and ‘01’ is all numeric. This is why data type depends on the identifier.

  • DT – Date: This is the date format. It can be either YYMMDD or CCYYMMDD in which CC is the century, YY is the year, MM is the month, and DD is the day
  • TM – Time: This is the time format in a 24-hour clock format: HHMMSS – HH is the hour, MM is minute, and SS second.

F: This is simply the minimum and maximum length of the element. For example, if the PO1-03 Unit of Measure is being used. The minimum and maximum length of this element is 2/2. It has to be at least two characters (e.g. EA) and can not be greater than two characters.

Best mapping practice at EDI Academy

Leave a Reply

Your email address will not be published.

Post Navigation