Guide
Getting started with EDI X12
A 30-minute primer. By the end, you'll be able to read an X12 file, explain it to a non-technical colleague, and tell a retailer's EDI team what they actually need from you.
What EDI X12 actually is
X12 is a fixed-grammar text format. Every business document — purchase order, invoice, ship notice — is written as a sequence of segments. Each segment starts with a 2- or 3-character code (BEG, REF, PO1) and ends with a terminator (typically ~). Segments group into transactions, transactions group into function groups, function groups go inside an interchange envelope.
A minimal 850 looks like this:
ISA*00* *00* *ZZ*SENDERID *ZZ*RECEIVERID *250506*1200*U*00401*000000001*0*P*>~ GS*PO*SENDERID*RECEIVERID*20250506*1200*1*X*004010~ ST*850*0001~ BEG*00*SA*PO12345**20250506~ REF*VR*VENDOR1~ N1*ST*WAREHOUSE A~ N3*123 MAIN ST~ N4*DALLAS*TX*75201*US~ PO1*1*5*EA*12.50**VC*ABC123~ CTT*1~ SE*8*0001~ GE*1*1~ IEA*1*000000001~
How to read it
- ISA says "from SENDERID to RECEIVERID, on 2025-05-06 at 12:00, this is interchange #1, version 00401."
- GS says "this is a group of POs (PO), one transaction, version 004010."
- ST says "this is an 850 (purchase order), transaction control number 0001."
- BEG is the PO header: PO type "00" (original), purpose "SA" (stand-alone), PO number PO12345, date 2025-05-06.
- REF*VR is the vendor reference: "VR" qualifier means vendor ID, value VENDOR1.
- N1*ST / N3 / N4 is the ship-to address.
- PO1 is line 1: 5 each of vendor part ABC123 at $12.50.
- CTT is the line count.
- SE / GE / IEA close everything in reverse, with control numbers that must match.
The five things that go wrong
- Mismatched control numbers. The number in IEA must equal the number in ISA. Same for GE/GS and SE/ST.
- Wrong delimiters. The ISA segment declares the delimiters. If the rest of the file uses different ones, every segment is wrong.
- Missing required segments. Partners often require REF, DTM, or N1 segments the X12 baseline doesn't.
- Bad qualifier codes. REF*VR vs REF*IA vs REF*PO — each means something different. The implementation guide lists which qualifiers your partner accepts.
- Wrong envelope IDs. ISA sender/receiver IDs are partner-assigned. If they don't match what the partner expects, the file is rejected before it's even parsed.
Your first hour
- Open the validator. Click Load sample 850 to populate Window 1.
- Click Validate. You'll see a clean structural report.
- Change the
SE*8*0001toSE*9*0001. Re-validate. You'll get an "SE segment count mismatch" error. This is the kind of error retailers reject for. - Click Explain with AI. The AI walks through the file segment by segment.
- Get your partner's implementation guide PDF. Compare each required segment to the sample.
What you still need
- Trading partner profile. Sender ID, receiver ID, AS2 URL or VAN address, encryption certificate.
- Implementation guide. The partner's specific rules.
- Transport. AS2, SFTP, or a VAN. EDI-X12 doesn't move files.
- Test cycle. Most retailers require 2–10 successful test transactions before going live.
Next steps
- 850 Purchase Order — segment-by-segment guide
- 856 Advance Ship Notice — the chargeback minefield
- 810 Invoice — getting paid
- 997 Functional Acknowledgement — what the receipts mean
- Glossary of every X12 term you'll see
Ready?
Open the validator, paste a file, and start reading.
Open the validator