EDI Interview Questions

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 32

What is EDI?

EDI Definition
EDI or Electronic Data Interchange is the exchange of data in a standard format between computers
without any human intermediary.

EDI Standards
Two widely used standards are X12 (commonly used in U.S.A. and Canada), and UN/EDIFACT
(commonly used in Europe and the rest of the world).

EDI Processes
A typical EDI exchange involves the following processes:

Outbound Process 
The Outbound process is the generating and sending of EDI files.  Below are the steps of an outbound
process.

1.  Obtain data from existing system.


2.  Generate EDI file.
3.  Validate EDI file.
4.  Send EDI file to trading partner.  Some common methods of transmission are FTP, HTTP and AS2.

Inbound Process
The Inbound process is the receiving and translating of EDI files.  Below are the steps of an inbound
process.

1.  Get EDI file.


2.  Validate and acknowledge EDI file be sending back a TA1, 997 or CONTRL EDI file.
3.  Translate EDI file.
4.  Save data to a database.

The EDI file structure


An EDI file is a binary computer file that contains data arranged in units called data elements.  Data
elements are separated by element terminators; and a group of data elements make up a data segment. 
Data segments are separated by segment terminators.

Figure 1:  A Data Segment


Transaction Sets (Messages) can be organized by grouping them by their topics or functions.  A group of
Transaction Sets is called a Functional Group.  Functional Groups themselves constitute an interchange. 
An Interchange is an electronic equivalent of a letter envelope.  It contains the destination and sender ID
of the EDI message, and the date/time stamp of when it was sent.  

      

    Figure 4a:  The ASC X12 file structure      

The Control Segments are the header and trailer segments that mark the start and end of their controlling
structure.

 The Header/Trailer control segments of the Interchange are the ISA/IEA in X12, and UNB/UNZ
in UN/EDIFACT.
 The Header/Trailer control segments of the Functional Group are the GS/GE in X12, and
UNG/UNE in UN/EDIFACT.
 The Header/Trailer control segments of the Transaction Set are the ST/SE in X12, and UNH/UNT
in UN/EDIFACT
List of Commonly Used EDI Segments

Segment /
Trans.
Example Name Description
Type
Elements
Interchange Identifies the sender and receiver using
All ISA
Information QID's. There is only one ISA
Functional Group Identifies the kind of business documents
All GS
Header in this transmission
Transaction Set Marks beginning of a document, for
All ST
Header example a Purchase Order
Transaction Set Marks the end of a document, for
All SE
Trailer example an Invoice
Functional Group
All GE Marks the end of a functional group
Trailer
Interchange Color Marks the end of functional group(s) and
All IEA
Trailer the end of an EDI Transmission
Marks the start of the purchase order and
PO BEG Beginning
has identifying information
Reference
PO REF  
Identification
To request or identify a service,
Service, Promotion,
PO SAC promotion, allowance, or charge and the
Allowance, or Charge
associated amount or percentage
PO ITD Terms of Sale Specifies the terms of the sale
PO DTM Date/Time Reference Specifies relevant dates as well as times
To identify a party or organization using
PO N1 Name
a code
PO N3, N4 Address Information Street, City, State address information
Specifies most frequently used Purchase
PO PO1* Baseline Item Detail
Order line item data
Marks the start of an the advance ship
ASN BSN Beginning
notice and has identifying information
ASN TD5 Carrier Details Specifies the carrier and routing sequence
Reference May be used for matching the Carrier's
ASN REF
Identification EDI 214 Carrier Status message
To identify a party or organization using
ASN N1 Name
a code
Purchase Order Contains data about the purchase order
ASN PRF
Reference being filled by this ASN
Specifies transportation details including
ASN TD1 Carrier Details
commodity, weight, and quantity
Specifies the packaging, weight, and
ASN PO4* Item Physical Details
dimensions
Indicates identifying marks and numbers
ASN MAN* Marks and Number
on the shipment
ASN LIN* Item Identification Item identification data
Item Detail Specifies line-item detail for this
ASN SN1*
(Shipment) shipment
Marks the start of the invoice and has
Invoice BIG Beginning
identifying information
To identify a party or organization using
Invoice N1 Name
a code
Invoice ITD Terms of Sale Specifies the terms of the sale
Invoice DTM Date/Time Reference Specifies relevant dates and times
FOB Related Specifies transportation and payment
Invoice FOB
Instructions instructions for a shipment
To request or identify a service,
Service, Promotion,
Invoice SAC promotion, allowance, or charge and the
Allowance, or Charge
associated amount or percentage
Specifies transportation details for the
Invoice CAD Carrier Detail
items being invoiced
Specifies most frequently used invoice
Invoice IT01* Baseline Item Detail
line item data
Product/Item
Invoice PID* Describes a product
Description

*Indicates segment is located on detail level of transaction

X12 Technical Tutorial - Syntax and Control


1 Introduction and Overall Structure

The essence of X12 is defined in X12.5 and X12.6. These standards provide the syntax and control
structures which allow data elements, segments, and transaction sets to be defined. For those with a
background in computer science, the basic X12 grammar qualifies as a context free grammar. It is specified
in X12.5 and X12.6 using Backus-Naur Form (BNF) notation.

The overall structure of X12 data is shown below.

2 Terminology and Basic Concepts

In this tutorial, only the basic concepts of the X12 syntax are addressed. The X12.58 security standards are
relevant to X12.5 and X12.6 as discussed here, but are not included in the discussion.

2.1 Simple Data Element

Data elements are defined in the X12 Data Element Dictionary - X12.3. A data element is equivalent to a
field in a data dictionary. Data elements have a name, a data element number, a brief description, a data
type, and a minimum and maximum length. For elements which represent codes, either a list of valid codes
is included or a reference is included to a source outside of the X12 standard.

Data Types

Data elements may have the following types:

 N - Numeric with implied decimal point, signed. Example: N2 indicates a numeric with two
decimal places. 12.34 becomes 1234. N0 indicates in integer.
 R - Decimal Number with explicit decimal point, signed. Example: 12.34 represented in R format
is 12.34. Starting with 4010, exponential notation is also supported.
 ID - Identifier - A coded value, usually alphanumeric.
 AN - String - alphanumeric.
 DT - Date - YYMMDD. As of 4010, CCYYMMDD is also supported.
 TM - Time - HHMM, with optional seconds and hundredths.
 B - Binary - Any sequence of 8 bit bytes.

2.2 Composite Data Structure

A composite data structure consists of two or more simple data elements separated by a delimiter character
known as the component data element separator. The individual component data elements in the composite
may be designated as either mandatory or optional.

2.3 Segment

Segments are defined in the X12 Segment Directory - X12.22. A segment is equivalent to a record type. A
segment is composed of one or more data elements or composite data structures, which are equivalent to
the fields in a record. Segments start with a two or three character segment tag which identifies the
segment, equivalent to a record type field. Data elements are separated by a delimiter character known as
an element separator, and end with a different delimiter character known as the segment terminator.
Elements which are not assigned values in a particular instance of a segment are represented by consecutive
delimiters, and such trailing delimiters are not transmitted. For example, if a segment XYX has five
elements and in a particular transmission only the second has a value, it is represented as XYZ**123<CR>,
where "*" is the element separator and <CR> is the segment terminator.

2.3.1 Elements

The elements in a segment may be assigned the following attributes:

 Requirements - Mandatory, Optional, or Conditional


 If Conditional - Two or more elements together may have the following conditional attributes:
o P - Paired or multiple. If any are used, all must be used
o R - Required. At least one of those noted must be used
o E - Exclusion. No more than one may be used
o C - Conditional. If the first element is present, then the others must be present
o L - List Conditional. If the first element is present, then at least one of the others must be
present

Example: In the N1 Name segment, the first element, N1_01, data element number 98 (Entity Identifier
Code), is mandatory. Elements three and four ( 66 Identification Code Qualifier and 67 Identification Code)
have a Semantic Note indicating a Conditional Relationship of P0304. If one is present, then both must be
present.

2.3.2 Semantic Notes

Segments may have Semantic Notes indicating the meaning to be applied to data elements, beyond just
their name and description. For example: In the N9 Reference Number Segment, a Semantic Note indicates
that the sixth element, 623 Time Code, indicates the time zone of the fifth element, 337 Time.

2.4 Transaction Set

A Transaction Set is a group of one or more data segments conveyed between trading partners. It usually
represents a business document such as a Purchase Order, but any unit of information meaningful to both
parties is sufficient. Transaction Sets are defined in the X12 standard with a number and name, a statement
of purpose, a Functional Group ID, and a table listing the included segments, their position numbers,
requirement designation, maximum usage, and loop repeat counts. Transaction Sets start with an ST
Transaction Set Header segment and end with an SE Transaction Set Trailer segment.

A specific segment may occur in several positions within a transaction set, representing different
information in each different position. For example, an N3 segment in the previous example regarding the
837 Health Care Claim applies to the Subscriber's street address in the first NM1 loop, but would represent
the provider's address in the 2310 NM1 loop. Transaction Sets are structured such that, in any given data
stream containing a Transaction Set, a segment's position in the defined standard for the Transaction Set
may be determined solely by the segment tag (except when LS/LE loops are used). In other words, the
segments defined position in regard to the standard is determined by considering the segments that
appeared before it in the data stream.

2.4.1 Segment Attributes

The Transaction Set definition includes attributes which apply to segments in a Transaction Set. These are:
 Position
 Requirement - Mandatory or Optional (and in earlier version of X12, Floating)
 Maximum Occurrences - If more than 1, then the segment may be repeated at that position in the
Transaction Set up through the maxim usage indicated.

2.4.2 Loops

A loop is a set of related segments in a Transaction Set. Segments are grouped together in this way to
conveniently represent a block of related information. No formal Loops are defined, but several basic loop
types, such as a Name/Address loop, appear with minor variations in many Transaction Sets. Different
loops may be nested within each other, and loops may repeat up to the maximum loop occurrences
specified within the Transaction Set. X12 defines two types of loop formats: Unbounded and Bounded.

2.4.2.1 Unbounded

An Unbounded loop starts with a specific segment, and all of the other segments in the loop may be
considered children of that segment. The start segment may appear once and only once in the loop, and
each new occurrence of the starting segment starts a new loop. A loop has a requirement designation of
optional or mandatory (corresponding to the requirement designator of the first segment in the loop), and a
repeat count indicating the maximum number of times it may repeat. If any of the segments in the loop are
used, the starting segment must be used even if the loop itself is optional. An example of an unbounded
loop is the N1/N2/N3/N4 Name and Address loop. It starts with the N1 Name segment, and includes the N2
Additional Name, N3 Address, and N4 Geographic Location segments.

2.4.2.2 Bounded (LS/LE)

A bounded loop has the same characteristics as an unbounded loop, except it is bracketed by LS Start Loop
and LE End Loop segments. Any of the segments in the loop may be the first in a specific instance of the
loop, depending on requirement designation of the loop. Bounded loops are used to identify loops that
otherwise would be indistinguishable from each other. If the loop does not appear in a particular
transmission, the LS and LE segments should not appear.

An example of a bounded loop appears in the 837 Health Care Claim ( Version 3040 in this example ). At
Position 2110, we start an NM1 loop identifying the subscriber. Within this NM1 loop, we have several
other NM1 loops identifying other entities related to this subscriber. Such as, at 2310 there is an NM1 loop
describing the Health Care provider. This 2310 loop is bounded by an LS/LE structure. Without the LS/LE,
it would appear that we are starting a new NM1 loop at 2110 for the Subscriber. This section of the 837
appears below:

NM1* subscriber info...


...
LS*2310
NM1* Provider info ...
...
LE*2310
...
NM1* Next subscriber loop
2.6 Functional Group

A Functional Group is a group of one or more related Transaction Sets sharing the same Functional Group
ID. Functional Groups start with a GS Functional Group Header segment and end with a GE Functional
Group Trailer segment. The details in the Functional Group GS/GE envelope are often used to route the
group's transaction sets to the appropriate department or business application within a company.

2.7 Interchange

An Interchange is the lowest unit of data exchanged between trading partners. It consists of one or more
Functional Groups enclosed in an envelope defined by an ISA Interchange Control Header segment and
ending with an IEA Interchange Control Trailer segment. The details in the ISA segment are often used to
route the Interchange between trading partners in an EDI Value Added Network, or VAN.

3 Envelope Details

Listed here are brief descriptions of the control segments for the interchange, group, and transaction set
envelopes. For full explanation of these segments, their purposes, and their data elements, refer to X12.5
Interchange Control Structures, X12.6 Application Control Structure, X12.22 Segment Directory, and
X12.3 Data Element Dictionary.

3.1 Interchange Envelope - ISA/IEA

ISA - Interchange Control Header

The ISA is effectively fixed length, since all of the elements are fixed length. This results in the segment
terminator always being in position 106. The element separator can be obtained from position 4, and the
subelement separator from 105. These delimiters allow the remainder of the interchange to be parsed.

 ISA01 - Authorization Information Qualifier


 ISA02 - Authorization Information
 ISA03 - Security Information Qualifier
 ISA04 - Security Information - This was originally used as a kind of a password. The receiver ID
might be public information such as a DUNS number, but this field might contain a value which is
not public information. It is however clear text, so the security provided is not at a very high level.
 ISA05 - Interchange ID Qualifier
 ISA06 - Interchange Sender ID - Identifies the sender.
 ISA07 - Interchange ID Qualifier
 ISA08 - Interchange Receiver ID - Identifies the receiver.
 ISA09 - Interchange Date - YYMMDD
 ISA10 - Interchange Time - HHMM
 ISA11 - Interchange Control Standards Identifier
 ISA12 - Interchange Control Version Number - Indicates the version of the ISA/IEA envelope
 ISA13 - Interchange Control Number - Uniquely identifies an interchange for tracking by trading
partners and VANS, and can be used to detect duplicate, missing, or out of sequence
transmissions. May take any numeric value, but is usually incremented by one for each
interchange sent to the same trading partner.
 ISA14 - Acknowledgment Requested - Indicates a request for a TA3 Interchange
Acknowledgment to be sent.
 ISA15 - Test Indicator - Test or Production
 ISA16 - Subelement Separator
IEA - Interchange Control Trailer

 IEA01 - Number of Included Functional Groups - This is used for message integrity, developed
before such things as check sums were widely implemented.
 IEA02 - Interchange Control Number - Must match the control number in the IEA.

3.2 Group Envelope - GS/GE

The Group Envelope, as noted above, may be used for internal routing. The X12 Version/Release is
specified in the GS, so all of the Transaction Sets in the group must be of the same version/release.

GS - Functional Group Header

 GS01 - Functional Group Header Code - Same as the Group Type of the included Transaction
Sets.
 GS02 - Application Sender's Code
 GS03 - Application Receiver's Code
 GS04 - Date - YYMMDD, or CCYYMMDD as of 4010.
 GS05 - Time - HHMM
 GS06 - Group Control Number - 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 - X for X12 or T for TDCC
 GS08 - Version/Release/Industry Identifier Code - 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.

GE - Functional Group Trailer

 GE01 - Number of included Transaction Sets - This is used for message integrity, developed
before such things as check sums were widely implemented.
 GE02 - Group Control Number - Must match the group control number of the GS

3.3 Transaction Set Envelope - ST/SE

ST - Transaction Set Header

 ST01 - Transaction Set Identifier Code - A three digit numeric code identifying the Transaction
Set type, from the Transaction Set table.
 ST02 - Transaction Set Control Number - May take any alphanumeric value so long as there are
no duplicates in the functional group. Usually starts with 0001 in each group, but there are several
other numbering schemes in common usage. Is referenced in the 997 Functional Acknowledgment
if individual transaction sets are positively acknowledged or if there are errors in the transaction
set indicating a rejection.

SE - Transaction Set Trailer

 SE01 - Number of included segments - This is used for message integrity, developed before such
things as check sums were widely implemented.
 SE02 - Transaction Set Control Number - Must match the Transaction Set Control Number in the
ST.

4 Example Interchange

This example has one transaction set, in one functional group, in one interchange. An asterisk "*" is used
for the element separator. A carriage return "^M" is used for the segment terminator. Each segment is listed
on a separate line for readability, but in reality the data appears as a single stream with the segments
separated only by the <CR>. There are four N1 Name/Address loops. Please note that the ISA segment is
wrapped over two lines to enable easier reading.

ISA*00* *00* *01*0011223456 *01*999999999*


950120*0147*U*00300*000000005*0*P*~<CR>
GS*PO*0011223456*999999999*950120*0147*5*X*003040<CR>
ST*850*000000001<CR>
BEG*00*SA*95018017***950118<CR>
N1*SE*UNIVERSAL WIDGETS<CR>
N3*375 PLYMOUTH PARK*SUITE 205<CR>
N4*IRVING*TX*75061<CR>
N1*ST*JIT MANUFACTURING<CR>
N3*BUILDING 3B*2001 ENTERPRISE PARK<CR>
N4*JUAREZ*CH**MEX<CR>
N1*AK*JIT MANUFACTURING<CR>
N3*400 INDUSTRIAL PARKWAY<CR>
N4*INDUSTRIAL AIRPORT*KS*66030<CR>
N1*BT*JIT MANUFACTURING<CR>
N2*ACCOUNTS PAYABLE DEPARTMENT<CR>
N3*400 INDUSTRIAL PARKWAY<CR>
N4*INDUSTRIAL AIRPORT*KS*66030<CR>
PO1*001*4*EA*330*TE*IN*525*VN*X357-W2<CR>
PID*F****HIGH PERFORMANCE WIDGET<CR>
SCH*4*EA****002*950322<CR>
CTT*1*1<CR>
SE*20*000000001<CR>
GE*1*5<CR>
IEA*1*000000005<CR>
850 mandatory segments
Header Section            
BEG Beginning Segment for Purchase Order Segment is Mandatory
210 1 M ID 2/2 353 Transaction Set Purpose Code
2 M ID 2/2 92 Purchase Order Type Code
3 M AN 1/22 324 Purchase Order Number
N
4 O AN 1/30 328 Release Number
U
5 O DT 8/8 328 Date
REF Reference Identification Can Occur only one time
510 1 M ID 2/3 128 Reference Identification Qualifier
2 R AN 1/30 127 Reference Identification
PER Administrative Communications Contact
510 1 M ID 2/2 366 Contact Function Code
2 O AN 1/60 93 Name
3 C ID 2/2 365 Communication Number Qualifier
4 C AN 1/80 364 Communication Number

FOB F.O.B Related Instructions Optional - Can Occur 999999


710 1 M ID 2/2 146 Shipment Method Of Payment

2 C ID 1/2 309 Location Qualifier


3 O AN 1/80 352 Description
CSH Sales Requirements Optional - Can Occur 5 times
1010 1 O ID 1/2 563 Sales Requirement Code
SAC Service Optional - Can occur 25 times
1 M ID 1/1 248 Allowance or Charge Indicator
130
2 O ID 4/4 Service
0
8 O N 1/9 118 Rate
Allowance or Charge Method Of
12 O ID 2/2 331
Handling Code
15 C AN 1/80 352 Description

ITD Terms Of Sale/ Defferred Terms Of Sale Optional - Can Occur 999999
1510 1 O ID 2/2 336 Terms Type Code
12 O AN 1/80 352 Description

DTM Date/Time Reference


1710 1 M ID 3/3 374 Date/Time Qualifier
2 O DT 8/8 373 Date

DTM Date/Time Reference


1710 1 M ID 3/3 374 Date/Time Qualifier
2 O DT 8/8 373 Date
TD5 Carrier Details [ Routing Sequence/Transit Optional - Can Occur 12
Time]
N
2610 O ID 1/2 122 Routing Sequence Code
1 U
2 C ID 1/2 66 Identification Code Qualifier
3 C AN 2/80 67 Identification Code
4 C ID 1/2 91 Transportation Method/Type Code
5 C AN 1/35 387 Routing
C ID 2/2 368 Shipment/Order Status Code
6
CTB Restrictions/Conditions Optional - Can occur 5 times
3110 1 M ID 2/2 688 Restrictions/Conditions Qualifier
2 C AN 1/80 352 Description

Loop Optional- Can Occur


N9 Reference identification    
1000Time
N9 Reference identification
3910 1 M ID 2/3 128 Reference Identification Qualifier

MSG Message Text Optional Can Occur 5 times

4110 1 M AN 1/264 933 Free-Form Message Text

N1 Name           Optional- Can Occur 1 Time

N1 1 O ID 2/3 98 Entity Identifier Code


4210 2 C AN 1/60 93 Name
3 C ID 1/2 66 Identification Code Qualifier
4 C AN 2/80 67 Identification Code
N2 Additional Name Information
4310 1 M AN 1/60 63 Name

2 O AN 1/60 63 Name

N3 Address Information Optional - Can occur 2 times


4410 1 M AN 1/55 166 Address information
N
2 M AN 1/55 166 Address information
U

N4 Geographic Information Optional - Can occur 1 time


4510 1 O AN 2/30 19 City Name
2 O ID 2/2 156 State or Province Code
PER Administrative Communications Contact Optional - Can Occur 999999 times
4810 1 M ID 2/2 366 Contact Function Code
N
2 O AN 1/60 93 Name
U
3 C ID 2/2 365 Communication Number Qualifier
4 C AN 1/80 364 Communication Number

5 C ID 2/2 365 Communication Number Qualifier


6 C AN 1/80 364 Communication Number

PO1 BaseLine Item Data       Mandatory - Can Occur 100000 times

PO1 BaseLine Item Data


7710 1 O AN 1/20 350 Assigned Identification
2 C N 1/15 330 Quantity Ordered
3 O ID 2/2 355 Unit or Basis for Measurement Code

4 C N 1/17 212 Unit Price

5 O ID 2/2 639 Basis of Unit Price Code


6 C ID 2/2 235 Product/Service ID Qualifier

7 C AN 1/48 234 Product/Service ID

PID Produc/Item Description     First PID Segment with in PO1 Loop


8710
1-3 Not Used
5 C AN 1/80 352 Description
6-9 Not Used
Second PID Segment with in PO1
PID Produc/Item Description    
Loop
8710
5 C AN 1/80 352 Description

              End of PO1 Loop

SAC Service Loop          


SAC Service Optional - Can occur 25 times
9310 1 M ID 1/1 248 Allowance or Charge Indicator
130
2 O ID 4/4 Service
0
3-7 Not Used
8 O N 1/9 118 Rate
8-11 Not Used
Allowance or Charge Method of
12 O ID 2/2 331
Handling Code

CTP Pricing Information Optional - Can occur 1 time


N
9510 1 O ID 2/2 687 Class Of Trade Code
U
2 C ID 3/3 236 Price Identifier Code
3 C N 1/17 212 Unit Price
4-11 Not Used

End Of SAC
             
Loop

SDQ Destination Quantity       Optional - Can occur 500 times

10310 1 M ID 2/2 355 Unit or Basis for Measurement Code


2 O ID 1/2 66 Identification Code Qualifier
3 M AN 2/80 67 Identification Code
4 M N 1/15 380 Quantity
5 C AN 2/80 67 Identification Code
6 C N 1/15 380 Quantity
7 C AN 2/80 67 Identification Code
8 C N 1/15 380 Quantity
9 C AN 2/80 67 Identification Code
10 C N 1/15 380 Quantity
11 C AN 2/80 67 Identification Code
12 C N 1/15 380 Quantity
13 C AN 2/80 67 Identification Code
14 C N 1/15 380 Quantity
15 C AN 2/80 67 Identification Code
16 C N 1/15 380 Quantity
17 C AN 2/80 67 Identification Code
18 C N 1/15 380 Quantity
19 C AN 2/80 67 Identification Code
20 C N 1/15 380 Quantity
21 C AN 2/80 67 Identification Code
22 C N 1/15 380 Quantity
N
23 O AN 1/30 310 Location Identifier
U

CTT Transaction Totals Optional - Can occur 1 time


19410 1 M N 1/6 354 Number of Line Items
2 O R 1/10 347 Hash Total

850 mandatory segments for idoc


Beginning Segment for Purchase Order Segment is Mandatory
BEG
210 1 M ID 2 353 Transaction set purpose code

2 M AN 2 92 Purchase order type code


3 M AN 22 324 Purchase order number
Not
4 O AN 30 328 Used Release number

5 M DT 8 373 Date
Not
6 O AN 1/30 367 Used Contract Number
Not
7 O ID 2/2 587 Used Acknowledgment Type

CUR (310) Currency Not Used

REF Reference Identification


410 1 M ID 2/2 128 Reference Identification Qualifier
2 O AN 1/50 127 Reference Identification

3 R AN 1/80 352 Description

PER Loop              
PER Administrative Communications Contact Segment is optional
510 1 M ID 2/2 366 Contact Function Code

2 O AN 1/60 93 Name
Not
3 R ID 2/2 365 Used Communication Number Qualifier

4 R AN 1/80 364 Communication Number

TAX (610) Tax Reference

FOB F.O.B. Related Instructions Segment is optional


710 1 M AN 2/2 146 Shipment Method of Payment
2 O AN 1/2 309 Location Qualifier
3 O AN 1/80 352 Description

CSH Sales Requirements


1010 1 O ID 1/ 2 563 Sales Requirement Code

SAC Service, Promotion, Allowance, or Charge Information


1210 1 M ID 1/1 248 Allowance or Charge Indicator
2 R ID 4/4 1300 Allowance, or Charge Code
3 R ID 2/2 559 Agency Qualifier Code
4 R AN 1/10 1301 Allowance, or Charge Code
5 O N2 1/15 610 Amount
6 R ID 1/1 378 Allowance/Charge Percent Qualifier
7 R R 1/6 332 Percent
Not
8 to 11 Used
12 O ID 2/2 331 Allowance or Charge Method of Handling

ITD Terms of Sale/Deferred Terms of Sale


1410 1 O ID 2/2 336 Terms Type Code
2 O ID 1/ 2 333 Terms Basis Date Code
3 O R 1/6 338 Terms Discount Percent
4 R DT 8/8 370 Terms Discount Due Date
Not
5 to 6 Used
7 O N0 1/3 386 Terms Net Days
Not
8 to 11 Used
12 O AN 1/80 352 Description

DTM Date/Time Reference 1-7 Occurrences

1710 1 M AN 3/3 374 Date/time Qualifier

2 O DT 8/8 373 Date


3 R TM 4/8 337 Time

Not
PID (2110) Product/Item Description Used

TD5 Carrier Details (Routing Sequence/Transit Time)


2610 1 O ID 1/ 2 133 Routing Sequence Code
2 R ID 1/ 2 66 Identification Code Qualifier
3 R AN 2/80 67 Identification Code
4 R ID 1/ 2 91 Transportation Method/Type Code

Not
MAN (2910) Marks and Numbers Used

Not
CTB (3110) Restrictions/Conditions Used

N9 Reference Identification
3910 1 M ID 2/3 128 Reference Identification Qualifier
2 R AN 1/30 127 Reference Identification
3 R AN 1/45 369 Free-form Description

MSG Message Text


4110 1 M AN 1/264 933 Free-Form Message Text

N1 Loop             Segment is optional

N1 Name Ship From Loop


4210 1 M AN 2/3 98 Entity Identifier Code
Not
2 R AN 1/60 93 Used Name
3 R ID 1/2 66 Identification Code Qualifier
4 R AN 2/80 67 ID Code

N3 Address Information Segment is optional


4410 1 M AN 1/55 166 Address Information
Not
2 M AN 1/55 166 Used Address Information

N4 Geographic Location Segment is optional


4510 1 O AN 2/30 19 City Name
2 O AN 2/2 156 State or Province code
3 O AN 3/15 116 Postal Code

N1 Name BUYER
4210 1 M AN 2/3 98 Entity Identifier Code
2 R AN 1/60 93 Name
3 R ID 1/2 66 Identification Code Qualifier

4 R AN 2/80 67 ID Code

N2 Additional Name Information Segment is optional


4310 1 M AN 1/60 93 Name
2 O AN 1/60 93 Name

N3 Address Information Segment is optional


4410 1 M AN 1/55 166 Address Information
2 M AN 1/55 166 Address Information

N4 Geographic Location Segment is optional


4510 1 O AN 2/30 19 City Name
2 O AN 2/2 156 State or Province code
3 O AN 3/15 116 Postal Code

               
REF (4710) Reference Identification     Not Used
               
PER (4810) Administrative Communications Contact Not Used
               
TD5 (5210) Carrier Details (Routing Sequence/Transit Time)  
               
End of N1 Loop            
               
SPI (5810) Specification Identifier        
               
PO1 Loop              

PO1 Baseline Item Data Loop is Mandatory


7710 1 O AN 1/20 350 Assigned Identification
2 O R 1/15 330 Quantity Ordered
3 O ID 2/2 355 Unit or Basis for Measurement
4 O R 1/17 212 Unit price
5 O AN 2/2 639 Basis of Unit Price Code
6 R ID 2/2 235 Product/Service ID Qualifier

7 R AN 1/48 234 Product/Service ID


8 R ID 2/2 235 Product/Service ID Qualifier
9 R AN 1/48 234 Product/Service ID
10 R ID 2/2 235 Product/Service ID Qualifier
11 R AN 1/48 234 Product/Service ID
12 R ID 2/2 235 Product/Service ID Qualifier
13 R AN 1/48 234 Product/Service ID
14 R ID 2/2 235 Product/Service ID Qualifier
15 R AN 1/48 234 Product/Service ID
16 R ID 2/2 235 Product/Service ID Qualifier
17 R AN 1/48 234 Product/Service ID
18 R ID 2/2 235 Product/Service ID Qualifier
19 R AN 1/48 234 Product/Service ID
20 R ID 2/2 235 Product/Service ID Qualifier
21 R AN 1/48 234 Product/Service ID
22 R ID 2/2 235 Product/Service ID Qualifier
23 R AN 1/48 234:9 Product/Service ID
24 R ID 2/2 235 Product/Service ID Qualifier
25 R AN 1/48 234 Product/Service ID
CTP Pricing Information
8310 1 O ID 2/2 687 Class of Trade Code
2 R ID 3/3 236 Price Identifier Code
3 R R 1/17 212 Unit Price

PID Product/Item Description


8710 1 M ID 1/1 349 Item Description Type
2 O ID 2/3 750 Product/Process Characteristic Code
Not
3 to 4 Used
5 R AN 1/80 352 Description

PO4 Item Physical Details


9010 1 O N0 1/6 356 Pack
2 R R 1/8 357 Size
3 R ID 2/2 355 Unit or Basis for Measurement Code
Not
4 R AN 3/5 103 Used Packaging Code
Not
5 O ID 1/ 2 187 Used Weight Qualifier
6 R R 1/9 384 Gross Weight per Pack
7 R ID 2/2 355 Unit or Basis for Measurement Code
8 R R 1/9 385 Gross Volume per Pack
9 R ID 2/2 355 Unit or Basis for Measurement Code

Not
REF (9110) Reference Identification Used

SAC Service, Promotion, Allowance, or Charge Information


9310 1 M ID 1/1 248 Allowance or Charge Indicator
2 R ID 4/4 1300 Service, Promotion, Allowance, or Charge
3 R ID 2/2 559 Agency Qualifier Code
4 R AN 1/10 1301 Agency Service, Promotion, Allowance, o
5 O N2 1/15 610 Amount
Not
6 R ID 1/1 378 Used Allowance/Charge Percent Qualifier
Not
7 R R 1/6 332 Used Percent
8 O R 1/9 118 Rate
9 R ID 2/2 355 Unit or Basis for Measurement Code
10 R R 1/15 380 Quantity
Not
11 O R 1/15 380 Used Quantity
12 O ID 2/2 331 Allowance or Charge Method of Handling
13 R AN 1/30 127 Reference Identification
Not
IT8 (9610) Conditions of Sale Used

Not
TAX (10110) Tax Reference Used

SDQ Destination Quantity


10310 1 M ID 2/2 355 Unit or Basis for Measurement Code
2 O ID 1/ 2 66 Identification Code Qualifier
3 M AN 2/80 67 Identification Code
4 M R 1/15 380 Quantity
5 R AN 2/80 67 Identification Code
6 R R 1/15 380 Quantity
7 R AN 2/80 67 Identification Code
8 R R 1/15 380 Quantity
9 R AN 2/80 67 Identification Code
10 R R 1/15 380 Quantity
11 R AN 2/80 67 Identification Code
12 R R 1/15 380 Quantity
13 R AN 2/80 67 Identification Code
14 R R 1/15 380 Quantity
15 R AN 2/80 67 Identification Code
16 R R 1/15 380 Quantity
17 R AN 2/80 67 Identification Code
18 R R 1/15 380 Quantity
19 R AN 2/80 67 Identification Code
20 R R 1/15 380 Quantity
21 R AN 2/80 67 Identification Code
22 R R 1/15 380 Quantity

Not
DTM (10510) Date/Time Reference Used

Not
MSG (11310) Message Text Used

Not
SCH (11910) Line Item Schedule Used

Not
PKG (12510) Marking Used

Not
N9 (13510) Reference Identification Used
MSG (13810) Message Text

AMT Monetary Amount


18910 1 M ID 1/3 522 Amount Qualifier Code
2 M R 1/18 782 Monetary Amount

Summary Details            
CTT Transaction Totals
19410 1 M N 1/6 354 Number of Line Items
2 O R 1/10 347 Hash Total
3 O R 1/10 81 Weight
4 O S 2/2 355 Unit or Basis for Measurement Code

5 O R 1/8 183 Volume


6 O AN 2/2 355 Unit or Basis for Measurement Code

AMT (19510) Monetary Amount Not Used

Envelope Trailer Section          

810 mandatory segments

BIG Beginning Segment for Invoice Segment is Mandatory


210 1 M DT 6/6 373 Date
2 M AN 1/22 76 Invoice Number
3 O DT 8/8 373 Date

4 O AN 1/22 324 Purchase Order Number

5 O AN 1/30 328 Release Number


6 O AN 1/8 327 NU Change Order Sequence Number
7 O ID 2/2 640 Transaction Type Code
NTE Note/Special Instruction Segment is optional
310 1 O AN 3/3 363 Note Reference Code

2 O AN 1/60 3 Free Form Message

CUR Currency

410 1 M ID 2/3 98 Entity Identifier Code

2 M ID 3/3 100 Currency Code


REF Reference Identification Segment is Optional - can occur multiple times

510 1 M ID 2/3 128 Reference Identification Qualifier

2 R AN 1/30 127 Reference Identification

REF Reference Identification

510 1 M ID 2/3 128 Reference Identification Qualifier


2 R AN 1/30 127 Reference Identification
N1 Loop - Address Information       Loop is Mandatory -
N1 Name ST Segment

810 1 M AN 2/3 98 Entity Identifier Code

2 R AN 1/60 93 Name
3 R ID 1/2 66 Identification Code Qualifier
4 R AN 2/80 67 Identification Code
N3 Address Information
1010 1 M AN 1/55 166 Address Information
2 R AN 1/60 166 Address Information

N4 Geographic Location
1110 1 O AN 2/30 19 City Name
2 O ID 2/2 156 State or Province Code
3 O ID 3/15 116 Postal Code
4 O ID 2/3 26 Country Code
ITD Terms of Sale/Deferred Terms of Sale Can occur 1 time

1510 1 O ID 2/2 336 Terms Type Code

2 O ID 1/2 333 Terms Basis Date Code

3 O R 1/6 338 Terms Discount Percent

4 R DT 6/6 379 Terms Discount Due Date

5 R N0 1/3 351 Terms Discount Days Due

6 O DT 6/6 446 Terms Net Due Date

7 O N0 1/3 386 Terms Net Days Due

8 O N2 1/10 362 Terms Discount Amount

9 O DT 6/6 388 NU Terms Deferred Due Date


10 R N2 1/10 389 NU Deferred Amount Due
11 R R 1/5 342 NU Percent of Invoice Payable

12 O AN 1/80 352 Description

13 - 15 not used

DTM Date/Time Can occur 1 time


1610 1 M ID 3/3 374 Date/Time Qualifier
2 R DT 6/6 373 Date
3 - 6 not used

FOB F.O.B. Related Instructions

1710 1 M ID 2/2 146 Shipment Method of Payment

Detail Section            
IT1 Loop
            Loop is Optional
-

IT1 Baseline Item Data Invoice Segment is Mandatory

3510 1 O AN 1/20 350 Assigned Identification


2 R R 1/10 358 Quantity Invoiced

3 R ID 2/2 355 Unit or Basis for Measurement Code

4 O R 1/17 212 Unit Price

5 R ID 2/2 639 Basis of Unit price Code

6 R ID 2/2 235 Product/Service ID Qualifier

7 R AN 1/48 234 Product/Service ID

8 R ID 2/2 235 Product/Service ID Qualifier

9 R AN 1/48 234 Product/Service ID

10 R ID 2/2 235 Product/Service ID Qualifier

11 R AN 1/48 234 Product/Service ID

12 R ID 2/2 235 NU Product/Service ID Qualifier


13 R AN 1/48 234 NU Product/Service ID
CTP Pricing Information
4110 1 O ID 2/2 687 Class of Trade Code

2 R ID 3/3 236 Price Identifier Code

3 R R 1/17 212 Unit Price

4 R R 1/15 380 Quantity

5 M ID 2/2 C001/355 Unit or Basis for Measurement Code

PID Product/Item Description Segment is Optional


4410 1 M ID 1/1 349 Item Description Type
2 O ID 2/3 750 NU Product/Process Characteristic Code
3 R ID 2/2 559 NU Agency Qualifier Code
4 R AN 1/12 751 NU Product Description Code
5 R AN 1/80 352 Description

Summary Section            

TDS Total Monetary Value Summary Segment is Mandatory


8110 1 M N2 1/15 610 Amount

2 O N2 1/15 610 Amount

3 O N2 1/15 610 NU Amount


4 O N2 1/15 610 NU Amount

CAD Carrier Detail Segment is Optional


8310 1 O ID 1/2 91 Transportation Method/Type Code
2 O AN 1/4 206 Equipment Initial
3 O AN 1/10 207 Equipment Number
4 R ID 2/4 140 Standard Carrier Alpha Code
5 R AN 1/35 387 Routing
6 O ID 2/2 368 Shipment/Order Status Code
7 O ID 2/3 128 Reference Identification Qualifier
8 R AN 1/30 127 Reference Identification

Service, Promotion, Allowance, or Charge


SAC Segment is Optional
Information

8510 1 M ID 1/1 248 Allowance or Charge Indicator


2 X ID 1/1 1300 Service, Promotion, Allowance, or Charge
Code
3 X AN 1/10 559 NU Agency Qualifier Code
Agency Service, Promotion, Allowance or
4 X AN 1/10 1301 NU
Charge Code

5 O N2 1/15 610 Amount

6 X ID 1/1 378 NU Allowance or Charge Percent Qualifier


7 X ID 1/6 332 NU Percent
8 X ID 1/9 118 NU Rate
9 O ID 2/2 355 NU Unit or Basis of Measure Code
10 X ID 1/15 380 NU Quantity
11 O R 1/15 380 NU Quantity
12 X ID 2/2 331 Allowance or Charge Method of handling Code
13 X AN 1/30 127 NU Reference Identification
14 O AN 1/20 770 NU Option Number

15 X ID 1/80 352 Description

CTT Transaction Totals segment is optional


8910 1 M N0 1/6 354 Number of Line Items

2 O R 1/10 347 Hash Total

3 R R 1/10 81 Weight
Unit or Basis for Measurement Code
4 R ID 2/2 355

856 Mandatory segments and elements

BSN Beginning Segment for Ship Notice Segment is Mandatory

210 1 M ID 2/2 353 Transaction Set Purpose Code


A 2/3
2 M 396 Shipment Identification
N 0
3 M DT 8/8 373 Date
T
4 M 4/8 337 Time
M

5 O ID 4/4 1005 Hierarchical Structure Code

Shipment Level           Loop is Mandatory -


HL Hierarchical Level Can occur 1 time
A 1/1
410 1 M 628 Hierarchical ID Number
N 2
A 1/1
2 O 734 Hierarchical Parent ID Number
N 2
3 M ID 1/2 735 Hierarchical Level Code

TD1 Carrier Details (Quantity and Weight)


A
1410 1 O 5 103 packaging code
N
2 O N0 7 80 lading quantity

Carrier Details (Routing Sequence/Transit


TD5 Can occur 1 time
Time)
1510 1 O ID 1/2 133 Routing Sequence Code
2 R ID 1/2 66 Identification Code Qualifier
A 2/8
3 R 67 Identification Code
N 0

4 R ID 1/2 91 Transportation Method/Type Code

TD3 Carrier Details (Equipment)


A
1610 1 O 2 40 equipment description code
N
A
2 O 4 206 equipment initial
N
A
3 O 10 207 equipment number
N

REF Reference Identification Can occur 1 time


1910 1 M ID 2/3 128 Reference Identification Qualifier
A 1/3
2 R 127 Reference Identification
N 0

DTM DATE/TIME REFERENCE Segment is optional


A
3510 1 M 3 374 date/time qualifier
N
2 O DT 8 373 Date

3 O DT 8 337 Time
4 O A 2 623 Time Code
N

FOB F.O.B. RELATED INSTRUCTIONS Can occur 1 time


3610 1 M ID 2/2 146 Shipment Method of Payment

N1 Loop - Address Information     Loop is Mandatory -


N1 Name Ship to Name and Address
A
3810 1 M 2/3 98 Entity Identifier Code
N
A 1/6
2 R 93 Name
N 0

N3 Address Information Segment is Optional


A 1/5
4010 1 M 166 Address information
N 5
A 1/5
1 M 166 Address information
N 5

N4 Geographic Information Segment is Optional


A 2/3
4110 1 O 19 City Name
N 0
2 O ID 2/2 156 State or Province Code
3/1
3 O ID 116 postal code
5

Order Level            
HL Hierarchical Level Can occur 1 time
A 1/1
410 1 M 628 Hierarchical ID Number
N 2
A 1/1
2 O 734 Hierarchical Parent ID Number
N 2
3 M ID 1/2 735 Hierarchical Level Code

PRF Purchase Order Reference


A 1/2
810 1 M 324 Purchase Order Number
N 2
A 1/3
2 O 328 Release Number
N 0
A
3 O 1/8 327 Change Order Sequence Number
N
4 O DT 8/8 373 Date

REF Reference Identification Can occur 1 time


1910 1 M ID 2/3 128 Reference Identification Qualifier
A 1/3
2 R 127 Reference Identification
N 0

REF Reference Identification Can occur 1 time


1910 1 M ID 2/3 128 Reference Identification Qualifier
A 1/3
2 R 127 Reference Identification
N 0

REF Reference Identification Can occur 1 time


1910 1 M ID 2/3 128 Reference Identification Qualifier
A 1/3
2 R 127 Reference Identification
N 0

DTM DATE/TIME REFERENCE Segment is optional


A
3510 1 M 3 374 date/time qualifier
N
2 O DT 8 373 date

N1 Name Supplier to Name and Address


A
3810 1 M 2/3 98 Entity Identifier Code
N
A 1/6
2 R 93 Name
N 0
3 R ID 1/2 66 Identification Code Qualifier
A 2/8
4 R 67 ID Code
N 0

Item Level            
HL Hierarchical Level Can occur 1 time
A 1/1
410 1 M 628 Hierarchical ID Number
N 2
A 1/1
2 O 734 Hierarchical Parent ID Number
N 2
3 M ID 1/2 735 Hierarchical Level Code

LIN Item Identification


A 1/2
510 1 O 350 Assigned Identification
N 0
2 M R 2/2 235 Product/Service ID Qualifier
A 1/4
3 M 234 Product/Service ID
N 8

SN1 Item Detail


A 1/2
610 1 O 350 Assigned Identfication
N 0
1/1
2 M R 382 Number of items shipped
0

A
3 M 1/2 355 Unit or Basis for Measurement Code
N

CTT
             
Loop
CTT Transaction Totals segment is optional

5710 1 M N0 1/6 354 Number of Line Items


856 mandatory segments for idoc

BSN Beginning Segment for Ship Notice Segment is Mandatory

210 1 M ID 2/2 353 Transaction Set Purpose Code

2 M AN 2/30 396 Shipment Identification

3 M DT 8/8 373 Date


4 M TM 4/8 337 Time
5 O ID 4/4 1005 Hierarchical Structure Code
6 O ID 2/2 640 Not Used Transaction Type Code

Shipment Level           Loop is Mandatory -

HL Hierarchical Level Can occur 1 time

410 1 M AN 1/12 628 Hierarchical ID Number


2 O AN 1/12 734 Hierarchical Parent ID Number
3 M ID 1/2 735 Hierarchical Level Code

TD5 Carrier Details (Routing Sequence/Transit Time) Can occur 1 time


1510 1 O ID 1/2 133 Not Used Routing Sequence Code
2 O ID 1/2 66 Not Used Identification Code Qualifier
3 O AN 2/80 67 Not Used Identification Code
4 O ID 1/2 91 Not Used Transportation Method/Type Code
5 O AN 1/35 387 Not Used Routing
6 O ID 2/2 368 Shipment/Order Status Code
7 O ID 1 /2 309 Not Used Location Qualifier

DTM DATE/TIME REFERENCE Segment is optional


3510 1 M AN 3/3 374 Date/time Qualifier
2 O DT 8/8 373 Date
3 O TM 4/8 337 Not Used Time

N1 Loop - Address Information       Loop is Mandatory -

N1 Name SHIP To Name and Address


3810 1 M AN 2/3 98 Entity Identifier Code
2 O AN 1/60 93 Name
3 O ID 1/2 66 Identification Code Qualifier
4 O AN 2/80 67 ID Code

N1 Loop - Address Information       Loop is Mandatory -

N1 Name SHIP FROM Name and Address


3810 1 M AN 2/3 98 Entity Identifier Code

2 O AN 1/60 93 Name

3 O ID 1/2 66 Identification Code Qualifier


4 O AN 2/80 67 ID Code

N3 Address Information Segment is Optional


4010 1 M AN 1/55 166 Address information
2 M AN 1/55 166:2 Not Used Address information

N4 Geographic Information Segment is Optional


4110 1 O AN 2/30 19 City Name
2 O ID 2/2 156 State or Province Code
3 O ID 3/15 116 Postal Code
4 O ID 2/3 26 Not Used Country Code

Order Level            

HL Hierarchical Level Can occur 1 time

410 1 M AN 1/12 628 Hierarchical ID Number


2 O AN 1/12 734 Hierarchical Parent ID Number
3 M ID 1/2 735 Hierarchical Level Code
4 O ID 1/1 736 Not Used Hierarchical Child Code

PRF Purchase Order Reference


810 1 M AN 1/22 324 Purchase Order Number
2 O AN 1/30 328 Not Used Release Number
3 O AN 1/8 327 Not Used Change Order Sequence Number

4 O DT 8/8 373 Not Used Date

Item Level              

HL Hierarchical Level Can occur 1 time

410 1 M AN 1/12 628 Hierarchical ID Number


2 O AN 1/12 734 Hierarchical Parent ID Number
3 M ID 1/2 735 Hierarchical Level Code
4 O ID 1/1 736 Hierarchical Child Code

LIN Item Identification


510 1 O AN 1/20 350 Assigned Identification
2 M R 2/2 235 Product/Service ID Qualifier
3 M AN 1/48 234 Product/Service ID
4 M R 2/2 235 Product/Service ID Qualifier
5 M AN 1/48 234 Product/Service ID

6 M R 2/2 235 Not Used Product/Service ID Qualifier

7 M AN 1/48 234 Not Used Product/Service ID

SN1 Measurements
610 1 O AN 1/20 350 Not Used Assigned Identification
2 M R 1/10 382 Number of Units Shipped

3 M ID 2/2 355 Unit or Basis for Measurement Code

4 O R 1/15 646 Not used Quantity Shipped to Date

PO4 Item Physical Details


910 1 O N0 1/6 356 Pack
2 O R 1/8 357 Size
3 O ID 2/2 355 Unit or Basis for Measurement Code

CTT Loop              

CTT Transaction Totals


5710 1 M N0 1/6 354 Number of Line Items
2 O R 1/10 347 Hash Total

You might also like