EDI ANSI X12 850 PO.

Chandrasekar P
3 min readApr 26, 2022

--

EDI X12 document structure

EDI:

Electronic data interchange is a computer-to-computer exchange of business documents between business partners in a standard electronic format.

EDI Standards:

Standards used for electronic data interchange are ANSI X12(US), EDIFACT(Europe), TRADACOMS(UK), and HIPAA(North America).

HIPAA is a sub-part of the ANSI X12 standard which is used in the Healthcare industry.

TRADACOMS used in domestic trade in the UK.

EDI Document:

EDI Documents are structured in a way of postal letters and have named envelopes based on their nature used in the documents. Each EDI document composes of the following segments:-

EDI document segment division. Note: Based on standards Naming only varies segment division remains the same
EDI File Structure

1. Interchange Envelope

The interchange Envelope header is ISA and the trailer is IEA.

Note: We are discussing 850 Purchase Orders only.

HEADER: ISA*00* *00* *ZZ*5489002*01*197607336*20000616*1549*U*00400*191154908*0*P*~

The header (ISA) is an outermost segment, it is a fixed length of 106 and delimited. Each position is delimited by * and each position is a data element. ISA, IEA&, etc are called Record Identifiers.

Each data element is called Position with the related segment as 01,02,03,…etc.

ISA01- 00 (Authorization info qualifier)

ISA02- Authorization Information, since ISA01 is 00, means No Authorization info(Ten empty spaces are given). ISA01 contains 5 codes from 00 to 04.

ISA03 — Security information Qualifier

00:No Security Information Present

01:Password

ISA04-Security information (Empty because no security requirement).

ISA05- Interchange Sender Id Qualifier (This qualifier is decided and given by Sender ) (*ZZ*)

ISA06- Sender Id of the size of 1/15(min/max), other 14 places filled with spaces and this applies for receiver ID as well (*5489002*).

ISA07- Interchange Receiver Id Qualifier (This qualifier is decided and given by Receiver. Sender & Receiver Mutually agree to have a qualifier which can be the same or different) (*01*).

ISA08- Receiver Id of size of 1/15(min/max) (*197607336*).

ISA09- Interchange Date(YYMMDD: Format) (*20000616*).

ISA10- Interchange Time(HH: MM) (*1549*)

ISA11- Interchange Standards ID (Code to identify who is responsible for the Standard control) (*U*).

ISA12- Interchange Version ID ( Standard has version- preciously means release date) (*00400*).

ISA13- Interchange Control Number (*191154908*).

ISA14- Acknowledgement request (*0*) .

0: No Acknowledgment Requested

1: Interchange Acknowledgment Requested

ISA15- Data Indicator (*P*)

P: Production(Data used in live production and original); T: Test(purpose of testing at developer end)

ISA16- Sub_Element Separator (*~*)

TRAILER: IEA(Record Identifier)

IEA*1*00001*~

IEA01- Total number of functional groups (*01*)

IEA02- Interchange Control number (*00001*)

IEA03- Segment separator (*~*).

2. Functional Group Envelope

The group Envelope header is GS and the trailer is GE.

HEADER: GS*PO*Sender ID *Receiver ID*Data Interchange Date*Data Interchange Time*Functional group control number* Standard Code*Version Release ID~

GS*PO*00001*000003*20061223*1750*4553882*X*003030~

TRAILER: GS*Total no. of Transaction set*Functional group control no.~

GS*3*4553882~

Note: Functional group can be 1-N depending on the customer needs. For example, Alphabet is a Parent Company and its child company are Google, Youtube, etc.,

Scenario : Consider Alphabet is our customer and he wants transactions of google, youtube in one file that is possible by adding 2 GS or each transaction for google & youtube needs to be separate then that is also possible.

3. Transaction Set Envelope

The Transaction Set Envelope header is ST and the trailer is SE.

Header: ST*Transaction Set Identifier Code*Transaction set Control Number~

ST*850*191154910~

Trailer: SE*Total transaction segment count(lines)*TS Control Number~

TS Count is inclusive of SE and ST.

SE*17*191154910~

Delimiters used in EDI file

  • ~ or | are segment delimiter or separator.
  • * Element separator.
  • : Composite element separator(sub-element separator).
  • ? Escape sequence delimiter( when any above delimiter is observed in EDI docs ? is used to tell the compiler that the next character is escape sequence).

Detailing for Escape sequence: In company name: QWERTY but misspelled as QWE * RTY, to omit the delimiter(*)-> ?* is used.

EDI Transaction codes of ANSI X12 vs EDIFACT

Transaction code

NOTE: All the delimiters and certain qualifiers are decided by customers & trading partners.

--

--