Tuesday, December 9, 2008

ISA and GS segment, elements enumeration in ANSI X12


The concept of snail mail envelope with sub-envelopes with varied contents has been replicated in EDI payload transportation. In fact the value passed though EDI envelope carries much more functional details to ensure correct recipient or group of recipients. These data is being transmitted through ISA and GS segments in ANSI X12 standard. I am trying to give you a feel of them and their importance.



ISA Segment

The ISA segment is probably the most important segment because it contains details on how to parse the rest of the file. Unlike any other segment in X12, ISA is fixed length of 105. This allows for processing software to identify delimiters for parsing the rest of the segments. Also, it is the segment that the processing software seeks to determine the beginning of the message and separate data from garbage characters that sometime can be found during communication. Many B2B tools have the facility called Interchange Splitter by which various ISA-IEA pairs get separated for stand alone Interchange processing. The parsed data then gets validated against stored data in the VAN’s backend database. I found many a times we get foxed with translation errors due to erroneous ISA, GS data in the provided X12 test data. That calls for a clear understanding of ISA GS segment, elements with data contents.
In Interchange can contain multiple Function Group envelopes, and each Function Group envelope can contain multiple Transaction Sets. Each transaction set represents a document (order, invoice, ASN).

Note : While creating test data for any Doc type we have to always include ISA segment. As each element of ISA is of fixed length, each element should be space padded if the value length is less than the particular element length. If we don't practice this, while translating, we will get an error.

The ISA Segment has the following structure
  • ISA01 Authorization Information Qualifier : min/max – 2/2
  • ISA02 Authorization Information : min/max – 10/10
  • ISA03 Security Information Qualifier : min/max – 2/2
  • ISA04 Security Information : min/max – 10/10
  • ISA05 Interchange ID Qualifier : min/max – 2/2
  • ISA06 Interchange Sender ID : min/max – 15/15
  • ISA07 Interchange ID Qualifier : min/max – 2/2
  • ISA08 Interchange Receiver ID : min/max – 15/15
  • ISA09 Interchange Date : min/max – 6/6
  • ISA10 Interchange Time : min/max – 4/4
  • ISA11 Interchange Control Standards ID : min/max – 1/1
  • ISA12 Interchange Control Version Number : min/max – 5/5
  • ISA13 Interchange Control Number : min/max – 9/9
  • ISA14 Acknowledgment Requested : min/max – 1/1
  • ISA15 Test Indicator : min/max – 1/1
  • ISA16 Subelement Separator : min/max – 1/1

Sample ISA segment (length of each element is not per standard)
ISA*00* *00* *ZZ*167520391 *ZZ*39319445 *991201*1248*U*00200*000000001*0*P*>

Syntax and value content for Interchange Control Header
  • ISA01-02 (Authorization qualifier and information)
If you select a value other than 00 for the Authorization qualifier, enter a value for the Authorization information. There is no default value for Authorization information. This is an optional alphanumeric field, with a minimum of one character and a maximum of 10 characters.
  • ISA03-04 (Security qualifier and information)
If you select a value other than 00 for the Security qualifier, enter a value for the Security information. There is no default value for Security information. This is an optional alphanumeric field, with a minimum of one character and a maximum of 10 characters.
  • ISA05-06 (Sender qualifier and identifier)
Enter a value for the Sender identifier. This is an alphanumeric field, with a minimum of one character and a maximum of 15 characters. By default, each of these properties is a null. Once you have entered a value for either of these properties, you can replace it with a different value, but you cannot return the field to a null value.
  • ISA07-08 (Receiver qualifier and identifier)
Enter a value for the Receiver identifier. This is an alphanumeric field, with a minimum of one character and a maximum of 15 characters. By default, each of these properties is a null. Once you have entered a value for either of these properties, you can replace it with a different value, but you cannot return the field to a null value. ISA08 must be an unique number with proper identifier present in ISA07
  • ISA09 (Interchange Date)
This element consists of Interchange Date. The date format is YYMMDD of 6 length
  • ISA10 (Interchange Time)
This element consists of Interchange Time. The time format is HHMM of 4 length
  • ISA11 (Standard identifier)
The default value for the standard identifier is U - U.S. EDI Community of ASC X12, TDCC and UCS.
  • ISA12 (Interchange Control Version Number)
The value is 00401 if ANSI 4010 standard is adopted. It can have 00501,00302 etc.
Required field. Minimum five characters, maximum five characters.
  • ISA13 (Interchange Control Number)
The default value is 1. It should be an unique number per ISA-IEA loop and generally gets incremented by 1. Required numeric field. Minimum one character, maximum nine characters. Generally, all service providers have their own algorithim for ICN generation.
  • ISA14 (Technical acknowledgment required)
The value can be either 0 or 1
  • ISA15 (Usage indicator)
The default is T - Test Environment. The other value can be P indicating Production Environment.
  • ISA16 (Component separator)
The default value is : if the type is Char, and 3a if the type is Hex.
This element is limited to the values in the ASCII character set.

Segment terminator

The default value is ~ if the type is Char, and 7e if the type is Hex.
You can leave this data element empty, but if you do, you need to designate a suffix.
This element is limited to the values in the ASCII character set.

Suffix

Segment identifier, either None, CR (carriage return), LF (line feed), or CR LF (carriage return/line feed). If you designate a Suffix, the Segment terminator data element can be empty. If the Segment terminator is left empty, you must designate a suffix.

The segment terminator and suffix pair can be any of the following values:
  1. Segment terminator
  2. Segment terminator + carriage return
  3. Segment terminator + line feed
  4. Segment terminator + carriage return/line feed
  5. Carriage return
  6. Line feed
  7. Carriage return/line feed

GS Segment

The GS segment identifies the application type for the interchange for both sender and receiver. This segment can be used to route EDI data to various systems or locations by trading partners (ex: different A/P systems, different physical locations). The GS segment is also the beginning of a functional group. This segment is also used to provide control information

• GS01 - Functional Group Header Code : min/max – 2/2
- AG = Application Advice
- IN = Invoice
- PO = Purchase Order
- PR = P.O. Acknowledgement
- RA = Payment
- RQ = Request For Quote
- RR = Response to RFQ

• GS02 - Application Sender's Code : min/max – 2/15
• GS03 - Application Receiver's Code : min/max – 2/15
• GS04 - Date - : min/max – 8/8 CCYYMMDD as of 4010.
• GS05 - Time - HHMM : min/max – 4/8
• GS06 - Group Control Number - : min/max – 1/9 Like the ISA control number, is used for audit and to detect duplicates, missing, or out of sequence groups. Most importantly, the 997 Functional Acknowledgment, which acts as a return receipt for the group, references the group control number. May take any numeric value so long as there are no duplicates in the interchange, but is usually incremented by one for each group of this type sent to the same trading partner.
• GS07 - Responsible Agency Code - : min/max – 1/2 X for X12 or T for TDCC
• GS08 - Version/Release/Industry Identifier Code - : min/max – 1/12. The first six characters specify the X12 version and release, while any of the last six may be used to indicate an Industry standard or Implementation Convention reference. “004010VICS"

Sample GS segment
GS*PO*9732397773T*999999999*20060607*1248*1*X*004010

33 comments:

  1. I wanted to discuss one question:
    Can the ISA be less than/ more than 107 characters?

    - Arpit Tayal

    ReplyDelete
    Replies
    1. No ..It should be of 106 characters only
      and its length is fixed

      Delete
  2. Arpit

    the length of ISA segment is always 105. If its less or more than this then the translator will throw an error.

    - ambarnath

    ReplyDelete
  3. Thanks. I meant 107 including sub- element delimiter & segment delimiter.
    This link has discussion on ISA length which made me curious:

    http://edi.stylusstudio.com/msg06618.htm#

    ReplyDelete
  4. one question: Can we send ST-801 & ST-856 in one GS?

    ReplyDelete
  5. No we can't send two different docs in one GS, because one functional group can hold set of same transactions.(GS 01 defines the FG type of transaction).

    ReplyDelete
  6. I have a spec from a vendor that says they want an 8 digit date in ISA09 for version 004010. Is that valid?

    ReplyDelete
  7. Sehr Hilfreich, Danke.

    ReplyDelete
  8. I need help on finding a solution for my situation. Currently, we receive shipcon 945 from our 3PL for normal shipments. Now we are putting a destruction process in place. They want to send the 945 with the same ISA ID but different GS ID for destruction orders. On my side, I need to use a different map to translate destruction 945s. Is there a way to set it up in Gentran to accomplish this?

    ReplyDelete
  9. How does the X12 EDI community deal with foreign characters like é

    Many recipients cannot handle

    ReplyDelete
  10. Thank you... exactly what I needed a complete breakdown of these segments. I admit your color scheme is weird in that the text coloring makes it real hard to read... but the words behind it were great!

    ReplyDelete
  11. can we have multiple ISA segments in single Transaction set?

    ReplyDelete
  12. hi i have one doubt ISA06 and gs02 is same

    ReplyDelete
    Replies
    1. can you please explain me why both are same is there any chances will get diffrent values

      Delete
    2. yes, it can be different also.

      Delete
  13. Can any one please describe ISA14 with a practical example?
    Thanks in advance!

    ReplyDelete
  14. HI, Thanks a lot for your valuable post

    ReplyDelete
  15. Hi All,

    i'm getting below error

    Errors detected in the format of an ISA and IEA X12 envelope segment set

    please help me

    ReplyDelete
  16. Hi friends can u tel what is the ISA Length and GS length

    ReplyDelete
  17. What is the meaning of carriage return with example

    ReplyDelete
  18. Hello Folks,
    Can anyone tell what are the valid values for ISA-11 segment in version 5010 ?

    ReplyDelete
  19. What is maximum count of GS segments under one interchange is allowed?

    ReplyDelete
  20. I need empty spaces to the right side of ISA 06. Right now i have 7 characters and I need 8 empty spaces to be padded tot his ISA 06.

    How can I do this?

    ReplyDelete
  21. ISA Segment gives information about Organisation or Client and GS gives information about Departments in that organisation most of cases both have same ID's

    ReplyDelete
  22. Can anyone tell me about responsible agency code...GS07

    ReplyDelete
  23. For GS07 segment , we are receiving value as T in request but x12 connector is failing but its working for value as X. Could you please help how to change the default value or any other workaround ?

    ReplyDelete
  24. It is possible ISA12 and GS08 is diffrent

    ReplyDelete