~
, \n
, etc.). For example, here is a snippet of an 850 Purchase Order that contains a BEG
and CUR
segment.
Party Identification
segment has the ID N1
, the Tax Reference
segment has the ID TAX
, and the Date/Time
segment has the ID G62
. Sometimes, the segment ID is referred to as the segment name or tag.
ACK
segment is Line Item Acknowledgement
, the name of the AT1
segment is Bill of Lading Line Item Number
, and the name of the ITA
is Allowance, Charge or Service
. While each segment is given a name, in practice, the segment ID is used for identifying the segment, not the name.
BEG
segment (Beginning Segment for Purchase Order) has the following description:
To indicate the beginning of the Purchase Order Transaction Set and transmit identifying numbers and dates.
ST
segment (Transaction Set Header) is the first segment that indicates a new transaction is being sent and so it is given the 0100 position of the transaction. The BGN
segment is next up in the sequence, and has the 0200
position. RDR
has 0300
, PRF
has 0400
, and so on. The position number has no semantic meaning, it is purely to indicate where a segment goes in the context of its neighbors. Even if a segment is not used or sent, the position of the following segments do not change.
Depending on the transaction set, the same segment can be used multiple times in different positions. The sequence number is useful here because it can help disambiguate which iteration of the segment a trading partner is referring to.
For example, the DTM
(Date/Time Reference) segment is found four times in the 180
transaction; once at the 0500
position, again at the 0520
position, again at the 1300
position, and finally at the 1900
position. On the other hand, the 252
Insurance Producer Administration transaction only contains one DTM
segment at the 0040
position.
While segment positions are useful for validation and debugging, in practice they are rarely used to describe a segment. For example, it’s rare to hear someone refer to the DTM
as “the DTM at the 140 position.” Moreover, these positions are not always correctly calculated in the implementation guides so you shouldn’t rely on them. Instead, use the logical structure of the transaction set (e.g., heading, detail, summary, and/or loops) to explain the position.
For example, the implementation guide of the 810
invoice below defines three REF
segments with positions 050
, 110
and 120
. So, instead of using the positions (050, 110, or 120) you can refer to them as:
M
) must be present in the EDI transaction.O
) may be present in the EDI transaction.Max Use
of a segment.
The repetition of a segment in a transaction set can be indicated by one of the following:
1
, which means this segment cannot be repeated.>1
, which means that this segment can be repeated an infinite number of times