# EDI for distributors

> The X12 documents a distributor exchanges most, VANs versus AS2 versus APIs, partner onboarding, ASN and label chargebacks and how EDI lands in the ERP.

Source: https://docs.lumina-erp.com/distribution/edi-for-distributors/

**In short.** EDI is a fixed, agreed format for business documents such as purchase orders, ship notices and invoices, sent computer to computer between trading partners. For a distributor the hard part is not the format but the rules each partner layers on top, and the chargebacks that follow when an order, ship notice or label does not match them.

Electronic data interchange (EDI) is how large customers and suppliers send purchase orders, ship notices and invoices to each other without anyone keying them. For a distributor, EDI is often a condition of doing business with retailers, national accounts, buying groups and big manufacturers.

## What EDI is

EDI is a structured, agreed format for a business document, exchanged between two companies' systems. Each document is a string of segments and data elements in a fixed order, so the receiving system can read it without a person interpreting it. The two companies are called **trading partners**.

In North America the dominant standard is ANSI ASC X12, maintained by X12. Each document type is a numbered **transaction set**, such as the 850 purchase order. Outside North America, and in some industries, partners use UN/EDIFACT, the United Nations standard maintained by UN/CEFACT, where the same purchase order is a message called ORDERS.

The standard defines what a document can contain. Each trading partner then publishes an **implementation guide** that says which segments and codes it uses, which are mandatory and what it will reject. Two customers can both send an 850 and still need different maps.

## The transaction sets a distributor meets most

| Set | Name | With customers | What it does |
|---|---|---|---|
| 850 | Purchase Order | In | The order |
| 855 | Purchase Order Acknowledgment | Out | Accepts, changes or rejects the order lines |
| 856 | Ship Notice/Manifest | Out | The advance ship notice (ASN): what shipped, in which cartons and pallets, on which carrier |
| 810 | Invoice | Out | The bill |
| 820 | Payment Order/Remittance Advice | In | Tells you which invoices a payment covers, and any deductions |
| 832 | Price/Sales Catalog | Out | Item and price data for the partner's catalog |
| 846 | Inventory Inquiry/Advice | Out | Stock availability, often sent daily |
| 997 | Functional Acknowledgment | Both | Confirms a document arrived and passed syntax checks |

The third column is the direction when you sell to a customer. With your suppliers each set runs the other way. The names and numbers are from X12's public transaction set list and supply chain flow, retrieved 2026-09-28. Other sets appear often enough to know by name: 860 (Purchase Order Change Request, Buyer Initiated), 865 (the seller's change acknowledgment), 812 (Credit/Debit Adjustment) and 864 (Text Message).

:::note[A 997 is not a business answer]
A 997 says the document was received and parsed. It does not say the order was accepted, priced correctly or will ship. That is the 855's job. Many partners require the 997 within a set number of hours and the 855 within a day or two, and treat a missing one as a compliance failure.
:::

### The order-to-cash flow

For a distributor selling to an EDI customer, the usual sequence is:

1. The customer sends an **850**. You return a **997** within hours.
2. You check price, item and availability, then send an **855** accepting or changing each line.
3. You pick, pack and label the cartons, then send an **856** before the truck arrives.
4. You send an **810** for what shipped.
5. The customer pays and sends an **820** listing the invoices paid and any deductions taken.

The same flow runs in reverse with your EDI suppliers, which is why an ERP that handles EDI well handles both directions.

## How EDI travels

The format and the transport are separate choices. The same X12 document can move over any of these.

| Transport | How it works | Fits when | Watch for |
|---|---|---|---|
| Value-added network (VAN) | A provider runs mailboxes. You send to your mailbox, the VAN delivers to the partner's, even if the partner uses a different VAN | Many partners, little IT staff, partners that require a VAN | Charges per document or per kilocharacter, and interconnect fees between VANs |
| AS2 | A direct, encrypted and signed connection over HTTPS between your server and the partner's, defined in IETF RFC 4130 | Large partners that require it, high document volume | You run and monitor the server and renew certificates before they expire |
| SFTP | Files dropped into an agreed folder over secure FTP | Partners that batch documents, simple setups | No built-in receipt like AS2's signed acknowledgment |
| API | The partner exposes a web API, often with JSON instead of X12 | Marketplaces, newer platforms, near real-time stock and order status | Every API differs, and you build and maintain each connection |

Most mid-size distributors buy EDI as a service, where a provider hosts the translator, keeps the maps for each partner and handles VAN or AS2 connections. The alternative is an in-house translator, which trades monthly fees for staff who can write and test maps.

## Onboarding a trading partner

A new EDI customer is a small project, not a setting. These steps decide whether it goes smoothly.

- **Get the implementation guides** for every document the partner requires, and read the compliance section. It lists the fines.
- **Exchange identifiers.** Each side has an interchange ID and qualifier, plus the partner's own vendor number for you.
- **Map item numbers.** The partner orders by its own item number, a GTIN or your part number. Build and test the cross-reference before the first live order.
- **Agree units of measure.** A partner ordering in cases when you sell in eaches is the most common first-order error. [Units of measure](/distribution/units-of-measure/) covers why.
- **Load pricing.** EDI orders arrive with the partner's expected price. Decide what happens when it differs from yours.
- **Test in stages.** Most partners run a test phase: syntax tests, then sample documents checked against their rules, then a short parallel period. Budget several weeks.
- **Do a label test.** Retailers usually want sample carton labels scanned and approved before live shipments.

## ASN and label compliance, and chargebacks

The 856 ship notice is the document that costs distributors the most money. A customer's receiving dock scans the carton or pallet label, looks up the matching ASN and receives everything on it without opening a box. If the ASN is late, missing or does not match what arrived, the dock has to receive by hand, and many retailers bill the supplier for it.

These bills are called **chargebacks** (or deductions or compliance fines). They are usually taken as a deduction from a payment, so they show up on the 820 remittance, not as a separate bill. The table lists common triggers.

| Failure | Why the customer charges for it |
|---|---|
| ASN not sent, or sent after the truck arrived | Dock cannot receive by scanning |
| ASN contents do not match the shipment | Quantities, items or carton contents must be checked by hand |
| Carton or pallet label missing, unreadable or wrong | Scanner cannot tie the carton to the ASN |
| Ship window missed | Late or early deliveries disrupt the dock schedule |
| Wrong item, unit of measure or price on the invoice | Accounts payable has to resolve the mismatch |

Fine amounts are set in each partner's vendor compliance manual, so we do not quote them here. Track deductions by reason code and partner. A chargeback that repeats is a process or mapping problem you can fix once.

### GS1-128 labels and the SSCC

Retail and many industrial partners require a GS1 logistics label on each carton or pallet. At its core is the **Serial Shipping Container Code (SSCC)**: an 18-digit number that identifies one logistic unit, such as a carton or a pallet, and is never reused. GS1 US describes it as built from an extension digit, your GS1 Company Prefix, a serial reference and a check digit, and usually printed as a GS1-128 barcode (GS1 US, retrieved 2026-09-28).

The SSCC on the label is the key the customer scans, and the same SSCC appears in the 856 against the contents of that carton. Label printing and ASN creation therefore have to share one source of truth. If they are generated separately, they will eventually disagree. To issue SSCCs you need a GS1 Company Prefix, licensed from GS1 US.

## How EDI maps into the ERP

EDI only saves time when documents flow into and out of the ERP without rekeying. The usual inbound path is: partner document, translator and map, an import staging area in the ERP, validation and then either a sales order or an exceptions queue.

- Inbound orders land in a staging area before they become sales orders. The import checks the customer, ship-to, items, units and prices, then creates the order.
- Anything that fails validation, such as an unknown item, a price mismatch or a closed ship-to, goes to an exceptions queue. Someone must own that queue every day, because an order in exceptions has not been acknowledged and will not ship.
- Outbound documents (855, 856, 810) are generated from ERP events such as order acceptance, shipment confirmation and invoicing. The 856 needs carton-level pack data, so packing has to record which items went into which carton.
- Cross-references such as customer item numbers, partner-specific units and ship-to codes belong in the ERP where possible. Maps that hold business data are hard to audit and easy to break.

When comparing systems, ask whether EDI is built in or a third-party add-on, and whether the ERP can record carton contents at packing. [Choosing an ERP for distribution](/erp-projects/choosing-an-erp-for-distribution/) lists EDI among the capabilities to test with your own documents.

## What to monitor

| Check | How often | What it catches |
|---|---|---|
| Missing 997s, both directions | Hourly or daily | Documents that never arrived, or maps that broke |
| Orders in the exceptions queue, by age | Daily | Orders that will miss their ship window |
| 850s without an 855 inside the partner's deadline | Daily | Compliance failures before they become fines |
| Shipments without an 856 | Daily, before trucks leave | The most common chargeback |
| Invoices without a 997 from the partner | Daily | Invoices the customer never received, which delays payment |
| Chargebacks by reason code and partner | Monthly | Repeating process or mapping problems |
| AS2 certificate expiry dates | Monthly | An outage on the day a certificate lapses |

## Getting EDI under control

1. List every trading partner and the documents each one requires, with the transport and who maintains the map.
2. Pull the last 12 months of EDI chargebacks by reason. The top two reasons usually point to one fix each.
3. Name an owner for the exceptions queue and a daily time to clear it.
4. Make label printing and ASN creation use the same carton data, so the SSCC on the box always matches the 856.
5. Before signing a new EDI customer, read its compliance manual and budget the onboarding and testing time.

## Sources

- [X12 Transaction Sets (X12)](https://x12.org/products/transaction-sets)
- [Supply Chain Transaction Flow (X12)](https://x12.org/flow/supply-chain)
- [846 Inventory Inquiry/Advice (X12)](https://x12.org/node/4388)
- [832 Price/Sales Catalog (X12)](https://x12.org/node/4374)
- [RFC 4130, MIME-Based Secure Peer-to-Peer Business Data Interchange Using HTTP, Applicability Statement 2 (AS2) (IETF)](https://www.rfc-editor.org/rfc/rfc4130)
- [Serialized Shipping Container Codes (SSCC) (GS1 US)](https://www.gs1us.org/upcs-barcodes-prefixes/serialized-shipping-container-codes)
- [What is a GS1-128 barcode? (GS1 US)](https://gs1us.org/upcs-barcodes-prefixes/gs1-128)

---

Epicor, Prophet 21, P21 and DynaChange are trademarks or registered trademarks of Epicor Software Corporation registered in the United States and other countries. Kinetic is a trademark of Epicor Software Corporation. Lumina ERP is an independent consultancy and is not affiliated with, sponsored by or endorsed by Epicor.
