Supply Chain & InventoryFree referencePDF, Excel, Word export

X12 Envelope Reference: ISA, GS, ST, SE, GE and IEA Elements

Most X12 file errors that stop a whole interchange happen in the envelope, not in the PO or invoice data. This table lists each element of ISA, GS, ST, SE, GE and IEA with its type and length so you can check a file or build a map.

Download:
SegmentElementNameTypeLength (min/max)Notes
ISA
ISA01
Authorization Information Qualifier
ID
2/2
00 means no authorization information present. Most partners use 00.
ISA
ISA02
Authorization Information
AN
10/10
Ten spaces when ISA01 is 00.
ISA
ISA03
Security Information Qualifier
ID
2/2
00 means no security information present.
ISA
ISA04
Security Information
AN
10/10
Ten spaces when ISA03 is 00.
ISA
ISA05
Interchange ID Qualifier (sender)
ID
2/2
Common values: 01 (DUNS), 12 (phone), 14 (DUNS plus suffix), ZZ (mutually defined).
ISA
ISA06
Interchange Sender ID
AN
15/15
Pad with trailing spaces to exactly 15 characters.
ISA
ISA07
Interchange ID Qualifier (receiver)
ID
2/2
Same code list as ISA05.
ISA
ISA08
Interchange Receiver ID
AN
15/15
Pad with trailing spaces to exactly 15 characters.
ISA
ISA09
Interchange Date
DT
6/6
YYMMDD.
ISA
ISA10
Interchange Time
TM
4/4
HHMM.
ISA
ISA11
Repetition Separator (4020 and later) or Standards ID
ID
1/1
In version 004010 and earlier this is a standards identifier, normally U. From 004020 it holds the repetition separator.
ISA
ISA12
Interchange Control Version Number
ID
5/5
For example 00401 or 00501. Note: this is the envelope version, not the GS08 transaction version.
ISA
ISA13
Interchange Control Number
N0
9/9
Zero padded, unique per interchange, must equal IEA02.
ISA
ISA14
Acknowledgment Requested
ID
1/1
0 no, 1 yes. 1 requests a TA1 interchange acknowledgment.
ISA
ISA15
Interchange Usage Indicator
ID
1/1
P production, T test. Wrong value is a common go-live error.
ISA
ISA16
Component Element Separator
AN
1/1
Often > or :. This character ends the ISA and also tells the parser the sub-element separator.
GS
GS01
Functional Identifier Code
ID
2/2
PO for 850/860, SH for 856, IN for 810, FA for 997, PR for 855, SM for 204.
GS
GS02
Application Sender's Code
AN
2/15
Often matches ISA06 trimmed, but partners may assign a separate code.
GS
GS03
Application Receiver's Code
AN
2/15
Often matches ISA08 trimmed.
GS
GS04
Date
DT
8/8
CCYYMMDD.
GS
GS05
Time
TM
4/8
HHMM, HHMMSS or HHMMSSDD.
GS
GS06
Group Control Number
N0
1/9
Must equal GE02. Unique per group within the interchange.
GS
GS07
Responsible Agency Code
ID
1/2
X for ASC X12.
GS
GS08
Version / Release / Industry Identifier Code
AN
1/12
For example 004010 or 004010VICS or 005010.
ST
ST01
Transaction Set Identifier Code
ID
3/3
For example 850, 855, 856, 810, 997.
ST
ST02
Transaction Set Control Number
AN
4/9
Must equal SE02. Usually starts at 0001 in each group.
ST
ST03
Implementation Convention Reference
AN
1/35
Used in 005010 guides. Absent in most 004010 files.
SE
SE01
Number of Included Segments
N0
1/10
Counts every segment from ST through SE inclusive. A wrong count causes AK502 code 4.
SE
SE02
Transaction Set Control Number
AN
4/9
Must match ST02.
GE
GE01
Number of Transaction Sets Included
N0
1/6
Count of ST/SE pairs in this group.
GE
GE02
Group Control Number
N0
1/9
Must match GS06.
IEA
IEA01
Number of Included Functional Groups
N0
1/5
Count of GS/GE pairs in the interchange.
IEA
IEA02
Interchange Control Number
N0
9/9
Must match ISA13.

The ISA segment is fixed length: 106 characters including the segment terminator. Separators are declared by position inside the ISA (element separator is character 4, component separator is ISA16, segment terminator follows ISA16). Always confirm separators, qualifiers and version with the partner guide.

Compare envelope settings across all partners

An optional review of your partner envelope settings against what the integration layer sends.

Optional. The tool and every export work without this. No spam.

How the envelope nests

An interchange starts with ISA and ends with IEA. Inside it are one or more functional groups (GS to GE), and inside each group are transaction sets (ST to SE). Control numbers must match at each level: ISA13 with IEA02, GS06 with GE02, ST02 with SE02. The counts must also match: IEA01 counts groups, GE01 counts sets, and SE01 counts segments in the set.

Fixed length rules in the ISA

The ISA is the only segment where every element has a fixed length, which is how a parser finds the separators before it knows them. That is why ISA06 and ISA08 must be padded to exactly 15 characters and why ISA02 and ISA04 are ten spaces. A sender ID of 9 characters followed by only 3 spaces gives a short ISA, and the partner's gateway will either reject the file or misread the date.

  • ISA06 and ISA08: exactly 15 characters.
  • ISA13: exactly 9 digits, zero padded.
  • ISA15: P for production, T for test.
  • ISA16: a single character separator, not blank.

Common envelope mistakes

Test files sent with ISA15 set to P cause real orders at the partner. Production files left with T are ignored. Another frequent issue is recycling ISA13 after a counter reset, which gets the interchange dropped as a duplicate. Counters should be stored in the translator and never reset by hand during a live relationship. Check that SE01 counts include the added segments that a mapping tool inserts after the template was designed.

Frequently Asked Questions

Why must ISA06 and ISA08 be 15 characters?

The ISA is a fixed length segment so a parser can read the separators by position before it knows them. IDs shorter than 15 characters are padded with trailing spaces. Without padding, every later element shifts and the interchange fails.

What is the difference between ISA12 and GS08?

ISA12 is the version of the interchange envelope, such as 00401. GS08 is the version of the transaction sets inside the group, such as 004010 or 004010VICS. They often look similar but control different things.

Can ISA13 repeat?

It should not repeat for the same sender and receiver pair. A repeated interchange control number is commonly treated as a duplicate. Keep the counter in the translator and avoid manual resets.

Does SE01 include the ST segment?

Yes. SE01 counts all segments from ST through SE inclusive. A set with ST, BAK, one PO1 and SE has SE01 of 4.

If envelope settings are scattered across spreadsheets for many partners, Netray can help centralize them and compare them to what your ERP integration layer actually sends.