X12 characters
There are three important components found within an X12 document: Segments, Elements, and Loops.
Segments
Each line of an X12 document is a Segment, which starts with the Segment ID and ends with a ~.
Elements
Within each Segment there are multiple Elements, separated by Element separators: *.
There are also Component Element separators > which can be used within Elements to separate sections of the Element.
Loops
Loops are Segments or Elements that are grouped together because they are all related to a similar piece of information.
For example, in an 850 Purchase Order, there is an Address loop, which in this example contains information about:
- Party Identification in the
N1Segment - Party Location in the
N3Segment - Geographic Location in the
N4Segment

Updated 29 days ago
