Free tool · EDI viewer
EDI 850 purchase order explained
The 850 is the purchase order in ANSI X12. Below is a complete 850 with every segment explained, a table of the segments you will meet, and the EDIFACT ORDERS message that carries the same order. The viewer shows the sample as an order table; paste your own file to read it the same way.
850 · Purchase order
From HARBORIND to BRIGHTLINE · 2026-11-03 10:15
- Messages
- 1
- Line items
- 3
- Segments
- 24
- Errors / Warnings
- 0 / 0
All checks passed: control numbers match and the segment counts are right.
Annotated sample
An EDI 850, line by line
This 850 orders three items from a tool supplier. Each segment ends with ~, elements are separated by *, and an empty element leaves two * next to each other. The envelope (ISA, GS) wraps the order itself, which runs from ST to SE.
| X12 850 | What it says |
|---|---|
| Envelope | |
ISA*00* *00* *ZZ*HARBORIND *ZZ*BRIGHTLINE *261103*1015*U*00401*000000101*0*T*>~ | Interchange header. Sender HARBORIND, receiver BRIGHTLINE, 3 Nov 2026 at 10:15, version 00401, control number 000000101, T for test data. The character after ISA (*) separates elements, the last one (>) separates components. |
GS*PO*HARBORIND*BRIGHTLINE*20261103*1015*101*X*004010~ | Functional group. PO says the group holds purchase orders; 101 is the group control number, 004010 the X12 version. |
ST*850*0001~ | Start of transaction set 850 with control number 0001. |
| Order header | |
BEG*00*SA*4500012345**20261103~ | Order header. 00 = original order, SA = stand-alone order, PO number 4500012345, PO date 3 Nov 2026. The empty element in between is the release number. |
CUR*BY*USD~ | Currency. BY = the buyer's currency, US dollars. |
REF*DP*038~ | Reference. DP = department, here 038. |
PER*BD*Dana Whitfield*TE*5550142~ | Contact. BD = buyer, Dana Whitfield; TE = telephone number. |
DTM*002*20261117~ | Date for the whole order. 002 = delivery requested, 17 Nov 2026. |
| Parties | |
N1*BY*Harbor Industrial Supply*92*HIS-001~ | Party. BY = buyer. 92 says the ID that follows (HIS-001) is the buyer's own code. |
N1*ST*Harbor Industrial Supply DC 2*92*DC02~ | Party. ST = ship-to, the distribution center DC02. The N3 and N4 below belong to it. |
N3*1200 Example Avenue~ | Street of the ship-to address. |
N4*Springfield*IL*62701*US~ | City, state, ZIP code and country of the ship-to address. |
N1*SE*Brightline Tools Inc.*92*V-20417~ | Party. SE = seller. V-20417 is the supplier number the buyer uses. |
| Order lines | |
PO1*1*120*EA*0.42**VP*BLT-M8-40*BP*100234*UP*012345678905~ | Line 1: 120 EA (each) at 0.42. Then item numbers in pairs of type and value: VP = vendor's part number, BP = buyer's part number, UP = UPC. |
PID*F****Hex bolt M8 x 40 mm, zinc plated~ | Description of line 1. F = free-form text. |
PO1*2*40*BX*11.85**VP*GLV-NIT-L*BP*100871~ | Line 2: 40 BX (boxes) at 11.85, with the vendor's and the buyer's part number. |
PID*F****Nitrile gloves, size L, box of 100~ | Description of line 2. |
PO1*3*6*EA*139.00**VP*DRL-18V-K*BP*104552~ | Line 3: 6 EA at 139.00. |
PID*F****Cordless drill 18 V, kit with 2 batteries~ | Description of line 3. |
DTM*002*20261124~ | A date inside the line loop: line 3 is wanted on 24 Nov 2026, a week after the rest. |
| Totals and envelope end | |
CTT*3*166~ | Totals. 3 lines; 166 is the sum of the ordered quantities (120 + 40 + 6), a check value. |
SE*20*0001~ | End of the transaction set. 20 segments from ST to SE; 0001 matches the ST. |
GE*1*101~ | End of the group: 1 transaction set, control number 101 as in the GS. |
IEA*1*000000101~ | End of the interchange: 1 group, control number 000000101 as in the ISA. |
Segment reference
Segments of the 850
Which segments an 850 carries is set by the trading partner's implementation guide. These are the ones you will see most, described in our own words. Rows marked as not in the sample are common but optional.
| Segment | Name | What it holds |
|---|---|---|
| ISA / IEA | Interchange envelope | Sender and receiver IDs, date and time, version, control number, a test or production flag, and the separators. |
| GS / GE | Functional group | Groups messages of one kind (PO here) with application codes and a group control number. |
| ST / SE | Transaction set | Start and end of one purchase order. SE counts the segments in between. |
| BEG | Order header | Purpose (new, cancellation, change), order type, PO number and PO date. |
| CUR | Currency | Currency code and whose currency it is. |
| REF | Reference | Extra numbers such as department, contract or project. A qualifier says which one. |
| PER | Contact | Name and phone number or email of a contact. |
| FOB | Freight terms not in the sample | Who pays the freight and where responsibility for the goods passes. |
| ITD | Payment terms not in the sample | Discount percentage, discount days and net days. |
| DTM | Date | Requested delivery, ship or cancel-after dates, for the order or one line. |
| TD5 | Carrier not in the sample | Carrier, routing and transport method. |
| N1, N3, N4 | Party loop | One party per N1 (buyer, ship-to, bill-to, seller) with ID, name and address. |
| PO1 | Order line | Line number, quantity, unit, unit price and up to ten pairs of item number type and value. |
| PID | Item description | Description of the line as free text or as a code. |
| SAC | Charges and allowances not in the sample | Freight, handling or discounts for the order or one line. |
| CTT | Totals | Number of lines and, optionally, the sum of the quantities as a check. |
EDIFACT counterpart
The EDIFACT counterpart: ORDERS
Outside North America the same order usually travels as a UN/EDIFACT ORDERS message. It carries the same content in other segments: one NAD instead of the N1 loop, and LIN, QTY and PRI instead of PO1. Elements are separated by + and :, and each segment ends with an apostrophe.
| X12 850 | EDIFACT ORDERS | What it carries |
|---|---|---|
| ISA, GS | UNA, UNB | Envelope: separators, sender, receiver, date and interchange reference. A group level (UNG) is rare in EDIFACT. |
| ST / SE | UNH / UNT | Start and end of the message. UNT counts the segments. |
| BEG | BGM, DTM | BGM carries the document type (220 = order) and the order number, DTM 137 the order date. |
| DTM | DTM | Other dates with their own qualifiers, for example 2 = delivery requested. |
| REF | RFF | References such as a contract number (CT). |
| PER | CTA, COM | Contact and phone number or email. |
| CUR | CUX | Currency. |
| N1, N3, N4 | NAD | One NAD holds the party's role, ID, name and address. BY = buyer, SU = supplier, DP = delivery party. |
| PO1 | LIN, PIA, QTY, PRI | LIN starts the line and carries the GTIN, PIA other item numbers, QTY 21 the ordered quantity and PRI the price. |
| PID | IMD | Item description. |
| MSG, NTE | FTX | Free text, for example delivery instructions. |
| CTT | UNS, CNT | UNS separates the lines from the summary; CNT 2 counts the lines. |
| GE, IEA | UNZ | End of the interchange with the number of messages and the reference from UNB. |
EDIFACT ORDERS sample
UNA:+.? '
UNB+UNOC:3+4012345000009:14+4012345000016:14+261103:1015+ORD0001'
UNH+1+ORDERS:D:96A:UN:EAN008'
BGM+220+PO-88231+9'
DTM+137:20261103:102'
DTM+2:20261117:102'
FTX+AAI+++Please deliver to gate 3?: mornings only'
RFF+CT:RV-2026-07'
NAD+BY+4012345000009::9++Kessler Antriebstechnik GmbH+Industriestrasse 14+Musterstadt++12345+DE'
NAD+SU+4012345000016::9++Weber Fluidtechnik GmbH+Am Hafen 3+Beispielhausen++54321+DE'
NAD+DP+4012345000023::9++Kessler Antriebstechnik GmbH Werk 2+Lagerweg 7+Musterstadt++12347+DE'
CUX+2:EUR:9'
LIN+1++4012345111118:EN'
PIA+5+HS-12-2000:SA+70045:IN'
IMD+F++:::Hydraulic hose DN 12, 2000 mm'
QTY+21:25:PCE'
PRI+AAA:18.40:CA::1:PCE'
LIN+2++4012345222227:EN'
PIA+5+OR-SET-NBR:SA'
IMD+F++:::O-ring set NBR, 382 pieces'
QTY+21:4:SET'
PRI+AAA:46.90:CA::1:SET'
LIN+3++4012345333336:EN'
PIA+5+MAN-100-G14:SA'
IMD+F++:::Pressure gauge 0-100 bar, G 1/4'
QTY+21:10:PCE'
PRI+AAA:23.75:CA::1:PCE'
UNS+S'
CNT+2:3'
UNT+28+1'
UNZ+1+ORD0001'Choose “EDIFACT ORDERS” in the viewer's sample menu above to read this message as a table.
Orders by email and PDF
Not every customer can send EDI.
EDI works for the large accounts that have set it up. Most other customers still send purchase orders by email, as a PDF or as a spreadsheet, and someone types them into the ERP. Mercura reads those orders and creates the sales order in your ERP, so they are processed like the orders that come in over EDI.
FAQ
Questions about EDI files.
An EDI 850 is a purchase order in the ANSI X12 standard. The buyer's system sends it to the supplier's system with the PO number and date, the parties, one PO1 segment per order line and a CTT segment with the number of lines.
The supplier usually answers with a 997 functional acknowledgment (the file arrived and could be read), then an 855 purchase order acknowledgment (what will ship and when), an 856 ship notice when the goods leave, and an 810 invoice.
The 850 is the original order. The 860 changes an order that was already sent, for example a quantity, a date or a cancelled line. An 850 with 01 in BEG01 cancels the whole order.
ORDERS. It holds the same information: BGM and DTM for the order header, NAD for the parties, and LIN, QTY and PRI for each line.
Paste the file into the viewer on this page or open it from your computer. It shows the order as a table and exports the lines to Excel, CSV or JSON. The file is read in your browser and not uploaded.
Many customers still send purchase orders by email or as a PDF. Mercura reads those orders and creates the sales order in your ERP, next to the 850s that come in over EDI.
EDI transactions