EDI X12
EDI X12 defines the following envelope structure and envelope code lists.
Envelope Structure
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 lowest, the structure is as follows:
- Interchange envelope
- Functional group
- Transaction set
The following diagram shows a schematic structure of X12 envelopes. Each of
these levels is explained in further detail.
Description of the illustration x12_env_structure.png
The following example 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, consist 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.
- Functional ID code (the two-letter transaction code; for example, PO for an 850 Purchase Order, HS for a 270 Eligibility, Coverage, or Benefit Inquiry) to indicate the type of transaction in the functional group.
- Identification of the sender and receiver.
- Control information (the functional group control numbers in the header and trailer segments must be identical).
- Date and time.
- The number of transaction sets included.
- The group control number (originated and maintained by the sender).
The following example shows a functional group header (GS).
The following example shows a functional group trailer (GE).
Interchange Envelopes (ISA/IEA)
The interchange envelope, often called the outer envelope, is the wrapper for all the data to send 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.
- Data element separators and data segment terminator
- Identification of sender and receiver
- Control information (used to verify the message was correctly received)
- Authorization and security information, if applicable
- ISA
- Optional interchange-related control segments
- Actual message information, grouped by transaction type into functional groups
- IEA
The following example shows an interchange header (ISA).
- Authorization information qualifier
- Security information qualifier
- Interchange ID qualifier
- Interchange sender ID
- Interchange ID qualifier
- Interchange receiver ID
- Date
- Time
- Repetition separator
- Interchange control version number
- Interchange control number
- Acknowledgment requested
- Usage indicator
The following example shows an interchange trailer (IEA).
Transaction Sets (ST/SE)
- Transaction set header (designated ST)
- Transaction set trailer (designated SE)
- Single message, enveloped within the header and footer
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 may convey the address: city, state, postal code, and other geographical information. A transaction set may contain multiple segments. For example, the address segment may 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.
The following example shows a transaction set header (ST).
The following example shows a transaction set trailer (SE).
Envelope Code Lists
This reference section provides a list of allowed values in X12 envelope segments, ISA and GS, for those elements that must use values from an enumerated code list.
Authorization Information Qualifier (ISA01)
Value | Description |
---|---|
00 (default) | No Authorization Information Present (No Meaningful Information in I02) |
01 | UCS Communications ID |
02 | EDX Communications ID |
03 | Additional Data Identification |
04 | Rail Communications ID |
05 | Department of Defense (DoD) Communication Identifier |
06 | United States Federal Government Communication Identifier |
07 ** | Truck Communications ID |
08 ** | Ocean Communications ID |
Note:
The highlighted code values are only valid for X12 versions 5020 and newer.Security Information Qualifier (ISA03)
The following table shows the allowed values for the security information qualifier in X12, as described in Schema Elements for Outbound EDI.
Value | Description |
---|---|
00 (default) | No Security Information Present (No Meaningful Information in element I04, Security Information) |
01 | Password |
EDI Interchange ID Qualifier (ISA05 and ISA07)
The following table shows the allowed values for the EDI Interchange ID Qualifier in X12, as described in Define the Host Profile and Schema Elements for Outbound EDI (headers > interchange-ctrl > sender-id-qualifier and receiver-id-qualifier ).
Value | Description |
---|---|
01 | Duns (Dun & Bradstreet) |
02 | SCAC (Standard Carrier Alpha Code) |
03 | FMC (Federal Maritime Commission) |
04 | IATA (International Air Transport Association) |
07 ** | Global Location Number (GLN)
(A globally unique 13 digit code for the identification of a legal, functional, or physical location within the Uniform Code Council (UCC) and International Article Number Association (EAN) numbering system.) |
08 | UCC EDI Communications ID (Comm ID) |
09 | X.121 (CCITT) |
10 | Department of Defense (DoD) Activity Address Code |
11 | DEA (Drug Enforcement Administration) |
12 | Phone (Telephone Companies) |
13 | UCS Code
(The UCS Code is a Code Used for UCS Transmissions; it includes the Area Code and Telephone Number of a Modem; it Does Not Include Punctuation, Blanks or Access Code.) |
14 | Duns Plus Suffix |
15 | Petroleum Accountants Society of Canada Company Code |
16 | Duns Number With 4-Character Suffix |
17 | American Bankers Association (ABA) Transit Routing Number (Including Check Digit, 9 Digit) |
18 | Association of American Railroads (AAR) Standard Distribution Code |
19 | EDI Council of Australia (EDICA) Communications ID Number (COMM ID) |
20 | Health Industry Number (HIN) |
21 | Integrated Postsecondary Education Data System, or (IPEDS) |
22 | Federal Interagency Commission on Education, or FICE |
23 | National Center for Education Statistics Common Core of Data 12-Digit Number for Pre-K-Grade 12 Institutes, or NCES |
24 | The College Board's Admission Testing Program 4-Digit Code of Postsecondary Institutes, or ATP |
25 | American College Testing Program 4-Digit Code of Postsecondary Institutions, or ACT |
26 | Statistics of Canada List of Postsecondary Institutions |
27 | Carrier Identification Number as assigned by Health Care Financing Administration (HCFA) |
28 | Fiscal Intermediary Identification Number as assigned by Health Care Financing Administration (HCFA) |
29 | Medicare Provider and Supplier Identification Number as assigned by Health Care Financing Administration (HCFA) |
30 | U.S. Federal Tax Identification Number |
31 | Jurisdiction Identification Number Plus 4 as assigned by the International Association of Industrial Accident Boards and Commissions (IAIABC) |
32 | U.S. Federal Employer Identification Number (FEIN) |
33 | National Association of Insurance Commissioners Company Code (NAIC) |
34 | Medicaid Provider and Supplier Identification Number as assigned by individual State Medicaid Agencies in conjunction with Health Care Financing Administration (HCFA) |
35 | Statistics Canada Canadian College Student Information System Institution Codes |
36 | Statistics Canada University Student Information System Institution Codes |
37 | Society of Property Information Compilers and Analysts NEW |
38 ** | The College Board and ACT, Inc. 6-Digit Code List of Secondary Institutions |
AM | Association Mexicana del Codigo de Producto (AMECOP) Communication ID |
NR | National Retail Merchants Association (NRMA) - Assigned |
SA ** | User Identification Number as assigned by the Safety and Fitness Electronic Records (SAFER) System |
SN | Standard Address Number |
ZZ | Mutually Defined |
Note:
The highlighted code values are only valid for X12 versions 5020 and newer.There is also no default value used. You must specify a value by adding a B2B identifier to the host profile or trading partner or mapping it in the outbound backend integration.
Interchange Control Standards Identifier (ISA11 - version 4012 and older)
The following table shows the allowed values for the Interchange Control Standards Identifier in X12. See Schema Elements for Outbound EDI.
Value | Description |
---|---|
U (default) | U.S. EDI Community of ASC X12, TDCC, and UCS |
Acknowledgment Requested (ISA14)
Value | Description |
---|---|
0 (default) | No Interchange Acknowledgment Requested |
1 | Interchange Acknowledgment Requested (TA1) |
Usage Indicator (ISA15)
Value | Description |
---|---|
I | Information |
P (default) | Production Data |
T | Test Data |
Responsible Agency Code (GS07)
Value | Description |
---|---|
T | Transportation Data Coordinating Committee (TDCC) |
X (default) | Accredited Standards Committee X12 |