ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

ORDRSP — Purchase Order Response Message (D.96A)

The ORDRSP message carries the seller's response to a received order: full confirmation, partial change, rejection, or counter-proposal.

Purpose

Per the official UN/CEFACT definition, ORDRSP is "intended to specify details for goods or services ordered on conditions agreed between the seller and the buyer", and to notify the buyer of the seller's actions. The message covers all four cases: clean acceptance, acceptance with change (delivery date, quantity, price), partial rejection, full rejection. The BGM[1] function code (231 = response to order, 232 = order confirmation, etc.) signals the intent.

Segment structure

A D.96A ORDRSP message has three sections: a Header, a Detail (repeatable SG26 group, up to 200,000 lines per interchange), and a Summary. The structure mirrors ORDERS, enriched with the AJT (Adjustment Details) segment to make changes explicit.

Mandatory header segments: UNH M , BGM M , and DTM M . Other header segments are conditional: PAI C , ALI C , IMD C , FTX C .

Then segment groups SG1 through SG25, in this exact order: SG1 RFF+DTM (references — including the original buyer order number), SG2 AJT+FTX (adjustment reason), SG3 NAD+LOC+FII (parties), SG4 RFF+DTM, SG5 DOC+DTM, SG6 CTA+COM, SG7 TAX+MOA+LOC, SG8 CUX+PCD+DTM (currencies), SG9 PAT+DTM+PCD+MOA (payment terms), SG10 TDT (transport), SG11 LOC+DTM, SG12 TOD+LOC, SG13 PAC+MEA, SG14 PCI+RFF+DTM+GIN, SG15 EQD+HAN+MEA+FTX, SG16 SCC+FTX+RFF, SG17 QTY+DTM, SG18 APR+DTM+RNG, SG19 ALC+ALI+DTM with its nested SG20-SG24 (QTY+RNG, PCD+RNG, MOA+RNG, RTE+RNG, TAX+MOA), SG25 RCS+RFF+DTM+FTX.

Detail (line item)

The Detail section sits entirely inside SG26, a loop built around the LIN M segment. Each line can carry PIA , IMD , MEA , QTY , PCD , ALI , DTM , MOA , GIN , GIR , QVR , DOC , PAI , and FTX .

Beyond LIN itself, 30 nested groups describe line-level concerns: classifications (SG27 CCI+CAV+MEA), line-specific payment terms (SG28 PAT+DTM+PCD+MOA), adjustment reason (SG29 AJT+FTX), pricing (SG30 PRI+CUX+APR+RNG+DTM), references (SG31 RFF+DTM), packaging (SG32 PAC+MEA+QTY+DTM) and its nested SG33-SG34 (RFF+DTM, PCI+RFF+DTM+GIN), location/quantity per site (SG35 LOC+QTY+DTM), line taxes (SG36 TAX+MOA+LOC), line-specific parties (SG37 NAD+LOC) with their nested SG38-SG40 (RFF+DTM, DOC+DTM, CTA+COM), line allowances/charges (SG41 ALC+ALI+DTM) with their nested SG42-SG46 (QTY+RNG, PCD+RNG, MOA+RNG, RTE+RNG, TAX+MOA), line transport (SG47 TDT) and SG48 LOC+DTM, SG49 TOD+LOC, line equipment (SG50 EQD+HAN+MEA+FTX), scheduling (SG51 SCC+FTX+RFF) and SG52 QTY+DTM, line requirements (SG53 RCS+RFF+DTM+FTX), manufacturing stages (SG54 STG) and SG55 QTY+MOA.

The spec permits up to 200,000 repetitions of the SG26 loop per interchange.

Summary

The Summary section contains: UNS M , MOA , CNT , then group SG56 ( ALC + ALI + MOA ) for global allowances/charges, and finally UNT M .

Mandatory / conditional

Four segments are strictly mandatory in every D.96A ORDRSP:

  • UNH — opens the message, carries the reference and the version.
  • BGM — gives the function code (231 = response to order, 232 = order confirmation), the response number, and the document status.
  • UNS+S — separates Detail from Summary.
  • UNT — closes the message, declares the segment count and the reference.

On top of those, at least one header DTM (document date) and at least one RFF+ON reference to the original buyer order. The line-level QTY segment is technically conditional, but in practice every line carries at least two occurrences — ordered (qualifier 21) and confirmed (qualifier 185 or similar).

Real-world example

A typical retail order response: full confirmation, no variance on the two lines ordered through the reference ORDERS message:

edifact ordrsp-d96a-example.edi
UNB+UNOC:3+5410000000456:14+5410000000123:14+260514:0915+CTRL000002'
UNH+1+ORDRSP:D:96A:UN:EAN008'
BGM+231+RESP-ORDER789+4'
DTM+137:20260514:102'
DTM+171:20260520:102'
RFF+ON:ORDER789'
NAD+SU+5410000000456::9'
NAD+BY+5410000000123::9'
LIN+1++3520000001234:EN'
QTY+21:2'
QTY+185:2'
PRI+AAA:849.00'
LIN+2++3520000005678:EN'
QTY+21:5'
QTY+185:5'
PRI+AAA:19.50'
UNS+S'
MOA+128:1795.50'
CNT+2:2'
UNT+18+1'
UNZ+1+CTRL000002'
  • BGM+231+RESP-ORDER789+4 — type 231 (response to order), response number, status 4 (Original with acceptance).
  • DTM+137 — document date. DTM+171 — confirmed delivery date.
  • RFF+ON:ORDER789 — mandatory reference to the buyer order number (ON = Order Number).
  • NAD+SU / NAD+BY — Supplier and Buyer, identified by GLN.
  • Two LIN with their QTY+21 (ordered) and QTY+185 (already received / confirmed).
  • MOA+128 — total billable amount of the confirmed order.
  • UNT+18+1 — 18 segments in the message, reference "1" matching UNH.

Common errors

  • Missing reference to the original order — an ORDRSP must reference the order it acknowledges via RFF+ON in the header. Without it, the buyer cannot match the response back to the order pipeline.
  • Confusion between QTY+21 and QTY+185 — the ordered quantity (21) must mirror what was sent in ORDERS. Only the confirmed quantity (185, or 21 re-used by convention) or the variance (QVR) should differ when there's a change.
  • Wrong BGM function code — 231 = response to order, 232 = order confirmation, 230 = delivery order response. Picking the wrong code creates a semantic mismatch on the buyer's ERP side.
  • Wrong UNT segment count — the value after UNT+ must include UNH and UNT themselves.
  • Incompatible delivery dateDTM+171 (delivery date confirmed) must not be earlier than the document date DTM+137.

ORDRSP is part of the order-to-cash cycle:

JSON equivalent

JSON projection that matches the example above. This mapping is not normative — it's an ediverse convention to ease integration in TypeScript / Python environments.

json ordrsp-d96a-equivalent.json
{
  "interchange": {
    "controlRef": "CTRL000002",
    "from": { "id": "5410000000456", "qualifier": "14" },
    "to": { "id": "5410000000123", "qualifier": "14" },
    "datetime": "2026-05-14T09:15:00Z",
    "syntax": { "id": "UNOC", "version": "3" }
  },
  "message": {
    "ref": "1",
    "type": "ORDRSP",
    "version": { "syntax": "D", "release": "96A", "agency": "UN", "association": "EAN008" }
  },
  "orderResponse": {
    "number": "RESP-ORDER789",
    "function": "231",
    "status": "4",
    "responseDate": "2026-05-14",
    "confirmedDelivery": "2026-05-20",
    "references": { "buyerOrder": "ORDER789" },
    "parties": {
      "supplier": { "gln": "5410000000456" },
      "buyer": { "gln": "5410000000123" }
    },
    "lines": [
      { "ref": 1, "gtin": "3520000001234", "quantity": { "ordered": 2, "confirmed": 2 }, "price": { "net": 849.00 } },
      { "ref": 2, "gtin": "3520000005678", "quantity": { "ordered": 5, "confirmed": 5 }, "price": { "net": 19.50 } }
    ],
    "totals": { "lineCount": 2, "totalNet": 1795.50 }
  }
}