EDI-X12 EDI-X12 by datax3.com
Transaction set guide

EDI 850 Purchase Order

The 850 is the most common X12 transaction. The retailer (buyer) sends it to the supplier (seller). It says: "Here is what I want, in what quantity, where to ship it, and when I want it."

The 850 envelope hierarchy

  1. ISA — interchange envelope.
  2. GS — function group, qualifier PO for purchase orders.
  3. ST — transaction set, ID 850.
  4. BEG — beginning of purchase order. Required.
  5. REF loop — references (vendor, customer, contract).
  6. DTM loop — dates (ship-by, deliver-by, cancel-after).
  7. N1 loop — names and addresses (ship-to, bill-to).
  8. PO1 loop — line items (one PO1 per item).
  9. CTT — line item total count.
  10. SE / GE / IEA — trailers.

Required segments (X12 baseline)

SegmentPurposeRequired by X12?Often required by partners?
BEGPO type, purpose, PO number, dateYesYes
REFVendor / contract / department referencesNoOften (REF*VR, REF*DP)
DTMDates (ship-by, deliver-by, cancel)NoOften (DTM*002, DTM*010)
N1 / N3 / N4Ship-to addressNo (loop)Almost always (N1*ST)
PO1Line itemYesYes
PIDItem descriptionNoOften
CTTTotal line countYesYes
SETransaction trailerYesYes

BEG segment — the PO header

BEG*00*SA*PO12345**20250506~

PO1 segment — line items

PO1*1*5*EA*12.50**VC*ABC123*UP*012345678905~

The five most common 850 rejections

  1. Missing REF*VR (vendor number). Most large retailers require their vendor number on every PO.
  2. Wrong N1 qualifier. N1*ST = ship-to, N1*BT = bill-to, N1*BY = buyer. Mixing them up rejects.
  3. UPC mismatch. Retailer expects UP qualifier; you sent VC. Or the UPC checksum is wrong.
  4. CTT line count off-by-one. CTT must equal the count of PO1 segments, not the SE segment count.
  5. SE segment count wrong. SE-01 must equal the number of segments from ST to SE inclusive.

How to validate an 850 in EDI-X12

  1. Open the validator.
  2. Paste your 850, or click Load sample 850.
  3. Click Validate. Window 2 shows structural issues.
  4. Click Explain with AI. Window 3 walks through every segment.

Related

Got an 850 that's getting rejected?

Paste it into the validator with the rejection text. The AI will walk through what to fix.

Open the validator