Sun B2B Suite ASC X12 Protocol Manager User's Guide

Structure of X12 Envelopes

The rules for X12 envelope structure ensure the integrity of the data and the efficiency of the information exchange. The actual X12 message structure has primary levels that are hierarchical. From highest to the lowest, they are:

A schematic structure of X12 envelopes is shown in Figure 2–1. Each of these levels is explained in more detail in the remainder of this section.

Figure 2–1 X12 Envelope Schematic Diagram

Envelope Schematic Diagram

Figure 2–2 X12 997 (Functional Acknowledgment) Segment Table

X12 997 (Functional Acknowledgment) Segment Table

Figure 2–2 shows the standard segment table for an X12 997 (Functional Acknowledgment) as it appears in the X12 standard and in most industry-specific implementation guides.

Functional Groups (GS/GE)

Functional Groups, often referred to as the “inner envelope,” are made up of one or more Transaction Sets, all of the same type, which can be batched together into one transmission. The Functional Group is defined by the header and trailer segments.

The Functional Group Header (designated GS) segment appears at the beginning, and the Functional Group Trailer (designated GE) segment appears at the end. Many Transaction Sets can be included in the Functional Group, but all local transactions must be of the same type.

Within the Functional Group, each Transaction Set is assigned a functional identifier code, which is the first data element of the header segment. The Transaction Sets that constitute a specific Functional Group are identified by this functional ID code.

The GS segment contains:

The GE segment contains:

See Figure 2–3 and Figure 2–4.

Figure 2–3 Example of a Functional Group Header (GS)

Example of a Functional Group Header (GS)

Figure 2–4 Example of a Functional Group Trailer (GE)

Example of a Functional Group Trailer (GE)

Interchange Envelopes (ISA/IEA)

The Interchange Envelope, often referred to as the “outer envelope,” is the wrapper for all the data to be sent in one transmission. It can contain multiple Functional Groups. This characteristic means that transactions of different types can be included in the Interchange Envelope, with each type of transaction stored in a separate Functional Group.

The Interchange Envelope is defined by the header and trailer; the Interchange Control Header (designated ISA) appears at the beginning, and the Interchange Control Trailer (designated IEA) appears at the end.

As well as enveloping one or more Functional Groups, the ISA and IEA segments include:

The sequence of information transmitted is:

See Figure 2–5 and Figure 2–6.

Figure 2–5 Example of an Interchange Header (ISA)

Example of an Interchange Header (ISA)

The following list describes the ISA segments shown in Figure 2–5:

  1. Authorization Information Qualifier

  2. Security Information Qualifier

  3. Interchange ID Qualifier

  4. Interchange Sender ID

  5. Interchange ID Qualifier

  6. Interchange Receiver ID

  7. Date

  8. Time

  9. Repetition Separator

  10. Interchange Control Version Number

  11. Interchange Control Number

  12. Acknowledgment Requested

  13. Usage Indicator

Figure 2–6 Example of an Interchange Trailer (IEA)

Example of an Interchange Trailer (IEA

Transaction Sets (ST/SE)

Each Transaction Set also known as a transaction contains:

A Transaction Set has a three-digit code, a text title, and a two-letter code, for example, 997, Functional Acknowledgment (FA).

The Transaction Set is composed of logically related pieces of information grouped into units called segments. For example, one segment used in the Transaction Set might convey the address: city, state, postal code, and other geographical information. A Transaction Set may contain multiple segments. For example, the address segment might be used repeatedly to convey multiple sets of address information.

The X12 standard defines the sequence of segments in the Transaction Set and also the sequence of elements within each segment. The relationship between segments and elements can be compared to the relationship between records and fields in a database environment. See Figure 2–7 and Figure 2–8.

Figure 2–7 Example of a Transaction Set Header (ST)

Example of a Transaction Set Header (ST)

Figure 2–8 Example of a Transaction Set Trailer (SE)

Example of a Transaction Set Trailer (SE)