← All guides
EDI reference · July 21, 2026

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

TagNameCarries
ISAInterchange control headerSender/receiver IDs, date, time, control number, test/production flag. Wraps the whole interchange
GSFunctional group headerGroups transactions of one type (PO = "PO"); sender/receiver app codes
GE / IEAGroup / interchange trailersClose what GS and ISA opened, with counts

Transaction segments (the 850 itself)

TagNameRequired?Carries
STTransaction set headerYesTransaction code (850) and a control number that must match SE
BEGBeginning segmentYesPurpose (00 original), type (NE, SA, RL), PO number, PO date
REFReference identificationOptionalQualified reference numbers: DP department, VN vendor order, CT contract
DTMDate/time referenceOptionalDates by qualifier: 002 delivery requested, 010 requested ship, 037/038 ship no earlier/later
N1Name (loop start)OptionalParty role (BY buyer, ST ship-to, VN vendor) + name + ID qualifier
N3AddressOptionalStreet address lines
N4Geographic locationOptionalCity, state, ZIP, country
PO1Baseline item dataYes (1+)Line number, quantity, unit, price, basis, and product-ID pairs (VP, BP, UP, SK)
PIDProduct/item descriptionOptionalFree-text description for the PO1 line above it
CTTTransaction totalsYesNumber of PO1 lines, optional quantity hash total
SETransaction set trailerYesSegment 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

WhereQualifierMeans
BEG02 (type)NE / SA / RLNew order / stand-alone / release against blanket
DTM01 (date)002 / 010 / 037 / 038Delivery requested / requested ship / ship no earlier / no later
N101 (party)BY / ST / VN / BTBuyer / ship-to / vendor / bill-to
PO1 product IDVP / BP / UP / SKVendor 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.

Getting POs as PDFs, not 850s?

SideQuest reads the emailed PO and drafts the matched QuickBooks Estimate, no EDI required. Free for 25 POs a month.

Start free →