DevToolCase
Sign in Sign in

EDIFACT ORDRSP: the purchase order response message

The EDIFACT ORDRSP order response: how a supplier accepts, changes or rejects an order, its segments, codes and an annotated EANCOM D96A example.

Where ORDRSP fits in the exchanges

What is the ORDRSP message for?

ORDRSP is the supplier’s answer to a purchase order (ORDERS): it accepts the order as it is, accepts it with changes (another quantity, date or price), or rejects it. The buyer updates its order and plans the receipt from it.

The answer is given for the whole order in BGM, then line by line in LIN, which only needs to list the lines that change. The goods then follow with a despatch advice (DESADV).

Sender: Supplier. Recipient: Buyer.

Structure of the ORDRSP message

Its main segments, in the order of the D.96A directory. M means mandatory and C conditional, followed by the maximum number of repetitions; for the first segment of a segment group (SG), they apply to the whole group. Rarely used segments are left out.

SegmentGroupStatusWhat it carries
UNH Message header—M 1Message header: the message reference and its type, ORDRSP:D:96A:UN:EAN005.
BGM Beginning of message—M 1Document type (231 order response), response number and the answer: accepted, changed or rejected.
DTM Date/time/period—M 35Response date, confirmed delivery date.
FTX Free text—C 99Free text: reason of a change or a rejection.
RFF ReferenceSG1C 10Reference of the order answered.
NAD Name and addressSG3C 99Parties: buyer, supplier, delivery point.
CUX CurrenciesSG8C 5Currency.
LIN Line itemSG26C 200000Line answered, with what happens to it: accepted, changed, not accepted.
PIA Additional product idSG26C 25Other item numbers.
QTY QuantitySG26C 10Quantities: ordered, to be delivered.
DTM Date/time/periodSG26C 35Delivery date promised for the line.
FTX Free textSG26C 99Free text about the line.
PRI Price detailsSG26 › SG30C 25Confirmed unit price.
UNS Section control—M 1Separates the lines from the summary section (UNS+S).
CNT Control total—C 10Control totals, such as the number of lines.
UNT Message trailer—M 1Message trailer: number of segments and message reference.

Codes worth knowing

SegmentData elementCodeMeaning
BGM1001231Purchase order response
BGM122529Order accepted without amendment
BGM12254Change: accepted with the changes given on the lines
BGM122527Order not accepted
RFF1153ONOrder number (purchase)
LIN12295Line accepted without amendment
LIN12293Line changed
LIN12297Line not accepted
QTY606321Ordered quantity
QTY6063113Quantity to be delivered
DTM200569Promised delivery date

Example of ORDRSP message

UNA:+.? '
UNB+UNOC:3+8712345000011:14+5412345000013:14+261123:1430+RSP0001'
UNH+1+ORDRSP:D:96A:UN:EAN005'
BGM+231+RSP12345+4'
DTM+137:20261123:102'
DTM+69:20261127:102'
RFF+ON:PO12345'
NAD+BY+5412345000013::9'
NAD+SU+8712345000011::9'
LIN+1+5+8712345100018:EN'
QTY+21:48'
LIN+2+3+8712345100025:EN'
QTY+21:12'
QTY+113:10'
DTM+69:20261130:102'
FTX+AAI+++Only 10 units in stock'
UNS+S'
CNT+2:2'
UNT+17+1'
UNZ+1+RSP0001'
Convert it to JSON

The example, segment by segment

SegmentMeaning
BGM+231+RSP12345+4Order response RSP12345. Function 4 (change): the order is accepted with changes, given on the lines.
RFF+ON:PO12345The order answered, by the number the buyer gave it.
LIN+1+5+8712345100018:ENLine 1 accepted as ordered (5).
LIN+2+3+8712345100025:ENLine 2 changed (3): its quantity and date follow.
QTY+113:10Only 10 units will be delivered, out of the 12 ordered.
DTM+69:20261130:102Delivery of this line promised for 30 November 2026.
UNT+17+1End of the message: the number of segments from UNH to UNT included, then the reference given in UNH.

Related messages

  • ORDERS: Purchase order
  • DESADV: Despatch advice
  • APERAK: Application error and acknowledgement

In the ANSI X12 standard, used mostly in North America, the equivalent of ORDRSP is the 855 transaction set (Purchase Order Acknowledgment), which you can read with the X12 viewer.

Add this browser’s favorites to your account?

This browser has 0 favorites that your account does not have:

Either way, this browser keeps its favorites: you find them again after signing out.