EDI segments reference: the 850 segments and what each one carries
An EDI purchase order is a stack of segments, each one line, each starting with a two- or three-letter tag. This is the lookup table: what every segment in an X12 850 carries, whether it's required, and the qualifiers you'll actually meet. For a full worked transaction see the annotated 850 example; for how the 850 fits with the 855, 856, and 810 see the document flow.
First: segment vs element
A segment is one line, like PO1*1*24*EA*4.85*PE*VP*BR-ELB-050-NPT~. The elements are the values between the delimiters (here *): the line number, quantity, unit, price, and so on. The segment ends with a terminator, usually ~. Everything below is a segment.
Envelope segments
| Tag | Name | Carries |
|---|---|---|
| ISA | Interchange control header | Sender/receiver IDs, date, time, control number, test/production flag. Wraps the whole interchange |
| GS | Functional group header | Groups transactions of one type (PO = "PO"); sender/receiver app codes |
| GE / IEA | Group / interchange trailers | Close what GS and ISA opened, with counts |
Transaction segments (the 850 itself)
| Tag | Name | Required? | Carries |
|---|---|---|---|
| ST | Transaction set header | Yes | Transaction code (850) and a control number that must match SE |
| BEG | Beginning segment | Yes | Purpose (00 original), type (NE, SA, RL), PO number, PO date |
| REF | Reference identification | Optional | Qualified reference numbers: DP department, VN vendor order, CT contract |
| DTM | Date/time reference | Optional | Dates by qualifier: 002 delivery requested, 010 requested ship, 037/038 ship no earlier/later |
| N1 | Name (loop start) | Optional | Party role (BY buyer, ST ship-to, VN vendor) + name + ID qualifier |
| N3 | Address | Optional | Street address lines |
| N4 | Geographic location | Optional | City, state, ZIP, country |
| PO1 | Baseline item data | Yes (1+) | Line number, quantity, unit, price, basis, and product-ID pairs (VP, BP, UP, SK) |
| PID | Product/item description | Optional | Free-text description for the PO1 line above it |
| CTT | Transaction totals | Yes | Number of PO1 lines, optional quantity hash total |
| SE | Transaction set trailer | Yes | Segment count (including ST and SE) and the matching control number |
The two segments people look up most
REF
REF is where the "extra" identifiers live. REF01 is a two-letter qualifier naming what the number is; REF02 is the number. Common ones: DP department, VN vendor order number, CT contract, PO purchase order (when referenced from another document), IA internal vendor number. A buyer's spec tells you which REFs they send and which they require you to echo back.
PO1
The line-item workhorse. After the quantity/unit/price elements, PO1 carries repeating product-ID pairs, a qualifier then a value: VP vendor part, BP buyer part, UP UPC, SK SKU, MG manufacturer part, IN buyer item number. The pairing of your part number and their part number on one line is the cross-reference problem made explicit, which is exactly the translation a human does by hand when the order arrives as a PDF instead.
Common qualifier quick-reference
| Where | Qualifier | Means |
|---|---|---|
| BEG02 (type) | NE / SA / RL | New order / stand-alone / release against blanket |
| DTM01 (date) | 002 / 010 / 037 / 038 | Delivery requested / requested ship / ship no earlier / no later |
| N101 (party) | BY / ST / VN / BT | Buyer / ship-to / vendor / bill-to |
| PO1 product ID | VP / BP / UP / SK | Vendor part / buyer part / UPC / SKU |
When you don't have EDI at all
Every segment above only exists when both trading partners are EDI-mapped. Below that volume, the order arrives as a PDF and someone reads it, translates the part numbers, and keys it into QuickBooks by hand, the manual version of what these segments encode. SideQuest automates that path: it parses the emailed PO, matches lines to your QuickBooks catalog, and drafts the Estimate, no VAN and no per-partner mapping. Background on the fallback in when EDI orders arrive by email.
FAQ
What are the main 850 segments?
ST, BEG, REF, DTM, the N1/N3/N4 loop, PO1 (line items), PID, CTT, and SE, wrapped by ISA/GS envelopes.
What is the REF segment?
Qualified reference identifiers, department, vendor order, contract, tagged by a two-letter code in REF01.
Segment vs element?
A segment is one line (PO1*...); elements are the delimited values inside it. Segments end with a terminator, usually a tilde.
SideQuest reads the emailed PO and drafts the matched QuickBooks Estimate, no EDI required. Free for 25 POs a month.
Start free →