Skip to content

How It Works in OrderSync

  1. Step 1

    Read the XML

    Parse the order with your own XML tooling or an integration platform.

  2. Step 2

    Map the fields

    Header fields to BEG, DTM and N1 loops; each item to a PO1 line.

  3. Step 3

    Build the envelope

    ISA, GS and ST/SE with matching control numbers and correct counts.

  4. Step 4

    Validate before sending

    Run the file through the EDI viewer with your trading partner selected.

How XML Order Fields Map to an 850

XML names every field; X12 identifies it by segment and position. Tag names vary by system (cXML, a custom ERP export, a marketplace feed), but the purchase order content is the same. A typical mapping:

XML element (example)X12 850
<OrderID> / <PONumber>BEG03
<OrderDate>BEG05 (CCYYMMDD)
<ShipTo><Name>N1*ST, N102
<ShipTo><Address>N3 and N4
<Item><Quantity>PO102
<Item><UnitOfMeasure>PO103 (EA, CA, PK)
<Item><UnitPrice>PO104
<Item><SupplierPartID>PO106 = VN, PO107
<Item><Description>PID05

What Usually Goes Wrong

Hand-built X12 tends to fail on the envelope, not the content: ISA fields that are not padded to fixed width, an SE01 count that forgets the ST and SE segments, control numbers that do not match between ISA and IEA, or a CTT01 that counts the wrong thing. The EDI viewer and validator checks all of these and tells you which segment to fix. The 850 guide covers each segment.

When It Is More Than One Feed

OrderSync reads orders from EDI partners, PDFs, email and spreadsheets, checks them against your catalog and pricing, and puts clean orders in one queue for your team to approve. If you have XML order feeds as well, bring a sample to an intro call and we will tell you how we would handle them. Developers can also look at the extraction API.

Frequently Asked Questions

How do I convert XML to EDI?

Map each XML field to its X12 segment and element, build the ISA, GS and ST envelopes with matching control numbers and counts, then validate the file. For a one-off purchase order, export the lines as CSV and use the free CSV to EDI converter, which handles the envelope for you.

Is cXML the same as EDI?

No. cXML is an XML format used mainly by procurement networks and punchout catalogs, while X12 EDI uses delimited segments. Both carry purchase orders, and many suppliers receive one and must send the other, so mapping between them is common.

How can I check the EDI I generated?

Paste it into the free EDI viewer and validator. It checks the envelopes, segment counts, control numbers, CTT line counts and GS1 check digits, and can run checks for 34 retailers.

See it run on your own documents

Bring a few real orders to a 15-minute call and watch them become checked orders ready to approve.

Book My Intro Call