From order to invoice: the EDI message flow
A single EDI message rarely means much on its own. The value lies in the messages forming a chain, each step referencing the one before it. A typical retail transaction passes through six messages.
The chain
BUYER SUPPLIER
| |
|------------ ORDERS ----------->| order
|<----------- ORDRSP ------------| order response
|<----------- DESADV ------------| despatch advice (goods on the way)
|------------ RECADV ----------->| receiving advice
|<----------- INVOIC ------------| invoice
|------------ REMADV ----------->| remittance advice
Every arrow is a document, and each is tied to the step before it.
1. ORDERS — the order
The buyer states what is wanted: product, quantity, price, delivery date. The document is given a number, and that number is referenced throughout the chain:
BGM+220+PO-2026-0042+9'
2. ORDRSP — the order response
The supplier confirms, partially confirms or rejects. The critical point is that the answer can be given line by line: three items may ship while the fourth is out of stock.
The response is tied to the order with an RFF:
RFF+ON:PO-2026-0042'
The ON qualifier means "order number". Without this link there is no way to tell which order is being answered.
3. DESADV — the despatch advice
Sent as the goods leave, it arrives before them. The warehouse knows the contents of the incoming shipment in advance, with SSCC numbers saying what sits on which pallet.
This turns goods-in from a counting exercise into a scanning one.
4. RECADV — the receiving advice
The buyer reports what was actually received. It carries two quantities for the same line: despatched (QTY 12) and received (QTY 194). The difference exposes short, over or damaged deliveries.
5. INVOIC — the invoice
The supplier bills. Here the buyer's system performs a three-way match:
- what the order said (ORDERS)
- what was actually received (RECADV)
- what is being billed (INVOIC)
If all three agree, the invoice is approved automatically and goes to payment. If they do not, it goes to a human. This is where EDI actually saves money: matching invoices pass without anyone touching them.
6. REMADV — the remittance advice
The buyer states which invoices were paid and for how much. Where a deduction was made, the reason travels in an AJT segment. The supplier uses this message to close open invoices automatically.
The links in summary
The whole chain rests on two mechanisms:
- BGM gives every document its own number
- RFF says which earlier document it belongs to
A message without an RFF cannot be matched automatically and falls back to manual handling. A large share of integration problems come down to a missing or wrong RFF reference.
Not every chain runs in full
Not all trading partners use all six messages. Low-volume relationships often exchange only ORDERS and INVOIC; DESADV and RECADV pay off where the buyer has warehouse automation. Which messages are mandatory is set out in the EDI specification your partner gives you.