← All guides
EDI reference · July 21, 2026

EDI 850 example: a real purchase order, segment by segment

Most EDI 850 explainers stop at "it's the electronic purchase order." This one doesn't. Below is a complete, realistic X12 850 for a plumbing distributor order, then every segment unpacked with the qualifier codes you'll actually meet in trading-partner specs. If you want the concept-level view first, start with what is EDI 850 and come back.

The full example

ST*850*0001~
BEG*00*NE*PO-88421**20260721~
REF*DP*PLUMBING~
DTM*002*20260728~
N1*BY*ACME PLUMBING SUPPLY*92*ACME01~
N3*450 INDUSTRIAL PKWY~
N4*COLUMBUS*OH*43228~
N1*ST*ACME JOBSITE 7*92*ACME01-S7~
N3*1200 W BROAD ST~
N4*COLUMBUS*OH*43223~
PO1*1*24*EA*4.85*PE*VP*BR-ELB-050-NPT*BP*WIX-2214~
PID*F****1/2 IN NPT BRASS 90 ELBOW~
PO1*2*6*CS*31.20*PE*VP*SEAL-PTFE-050*BP*ACME-PT50~
PID*F****PTFE SEAL 1/2 IN, CASE OF 24~
CTT*2*30~
SE*16*0001~

Sixteen segments, two order lines, one ship-to that differs from the buyer's billing address. The ISA/GS envelope segments that wrap this in transit are interchange plumbing, the same for every document type, so they're left off here.

Header segments

ST — transaction set header

ST*850*0001~ says: this transaction is an 850 (purchase order), control number 0001. The control number must match the SE trailer at the bottom.

BEG — beginning segment

BEG*00*NE*PO-88421**20260721~ carries the order's identity. BEG01 00 means original (versus 07 duplicate). BEG02 is the order type: NE new order, SA stand-alone, RL release against a blanket. BEG03 is the PO number your customer expects on every document you send back. BEG05 is the PO date.

REF and DTM

REF adds reference identifiers; DP here is a department code. DTM carries dates with a qualifier: 002 delivery requested, 010 requested ship, 037 ship no earlier, 038 ship no later. Trading-partner specs pick which ones they require.

N1 loop — who and where

Each N1 starts a name loop: BY buying party, ST ship-to, VN vendor, BT bill-to. N101 is the role, N102 the name, N103/N104 an ID qualifier and value (92 means buyer-assigned, 1 means DUNS). N3 is street, N4 is city, state, ZIP. The example's second loop is why the freight lands at the jobsite, not the billing office.

The line items: PO1 loops

PO1*1*24*EA*4.85*PE*VP*BR-ELB-050-NPT*BP*WIX-2214~ reads: line 1, quantity 24, each, at $4.85, price per each (PE), then product IDs in qualifier/value pairs: VP your vendor part number, BP the buyer's part number. Other qualifiers you'll meet: UP UPC, SK SKU, MG manufacturer part, IN buyer's item number. The PID segment after each line carries the free-text description.

Notice the two part numbers on one line. That pair is the whole cross-reference problem in miniature: the buyer orders in their numbering, you fulfill in yours, and something has to translate. EDI makes the pair explicit; an emailed PDF makes a human do it. More on that in where part numbers fall through.

Trailer segments

CTT*2*30~: two PO1 lines, hash total 30 (24 + 6). SE*16*0001~: sixteen segments including ST and SE, control number matching the ST. If either count disagrees with the contents, the receiver rejects the file before it ever reaches order entry.

When there's no 850

All of the structure above only flows when both sides are EDI-mapped. When a customer isn't, the same order arrives as a PDF on email, structure gone, and someone retypes it. The follow-up documents (the acknowledgment, ship notice, and invoice) are covered in the 850/855/856/810 flow guide, and the email fallback in when EDI orders arrive by email.

FAQ

What are the required segments in an EDI 850?

ST, BEG, at least one PO1 loop, CTT, and SE. REF, DTM, and the N1 loop are formally optional but effectively universal in real trading-partner specs.

What does the PO1 segment contain?

One order line: quantity, unit of measure, unit price, price basis, and qualifier/value product ID pairs (UP, VP, SK, BP, MG).

What is CTT for?

Totals verification: line count and optionally a quantity hash. A mismatch gets the file rejected before order entry.

Orders arriving as PDFs instead of 850s?

SideQuest reads emailed POs, matches part numbers to your QuickBooks catalog, and drafts the Estimate. 25 POs a month free.

Start free →