cXML reference

cXML PunchOutOrderMessage: example and element reference

The PunchOutOrderMessage carries the shopping cart from your catalogue back into the buyer’s procurement system. It becomes requisition lines there, not an order: the purchase order comes later, after approval.

Where it fits

  1. The buyer finishes shopping on your site and clicks your transfer button.
  2. Your site renders an HTML form whose action is the BrowserFormPost URL from the PunchOutSetupRequest, with the PunchOutOrderMessage in a hidden field named cxml-urlencoded. The buyer’s browser submits it. Your server never calls the procurement system directly.
  3. The procurement system matches the message to the session by BuyerCookie and turns each ItemIn into a requisition line, which the buyer can still change before submitting.
  4. If operationAllowed is edit, the buyer can later reopen the cart in your site, which arrives as a PunchOutSetupRequest with operation="edit" and the previous lines as ItemOut.

A two-line cart from Nordwind Supplies to Example Buyer GmbH, as QuickPunchOut emits it (cXML 1.2.061).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.061/cXML.dtd">
<cXML payloadID="1793611620.5be21d0c77a1@punchout.example.com" timestamp="2026-11-02T08:27:00.512Z" xml:lang="en-US">
  <Header>
    <From><Credential domain="NetworkID"><Identity>nordwind-supplies</Identity></Credential></From>
    <To><Credential domain="NetworkID"><Identity>AN00000000001</Identity></Credential></To>
    <Sender><Credential domain="NetworkID"><Identity>nordwind-supplies</Identity></Credential><UserAgent>QuickPunchOut</UserAgent></Sender>
  </Header>
  <Message deploymentMode="production">
    <PunchOutOrderMessage>
      <BuyerCookie>8f3c2a91-session-4471</BuyerCookie>
      <PunchOutOrderMessageHeader operationAllowed="edit">
        <Total><Money currency="EUR">161.40</Money></Total>
      </PunchOutOrderMessageHeader>
      <ItemIn quantity="10">
        <ItemID><SupplierPartID>NW-GLV-NIT-L</SupplierPartID></ItemID>
        <ItemDetail>
          <UnitPrice><Money currency="EUR">8.90</Money></UnitPrice>
          <Description xml:lang="en">Nitrile gloves, size L - Powder-free, box of 100<ShortName>Nitrile gloves, size L</ShortName></Description>
          <UnitOfMeasure>BX</UnitOfMeasure>
          <Classification domain="UNSPSC">42132203</Classification>
          <LeadTime>3</LeadTime>
        </ItemDetail>
      </ItemIn>
      <ItemIn quantity="4">
        <ItemID><SupplierPartID>NW-TAPE-50</SupplierPartID></ItemID>
        <ItemDetail>
          <UnitPrice><Money currency="EUR">18.10</Money></UnitPrice>
          <Description xml:lang="en">Packing tape, 50 mm x 66 m</Description>
          <UnitOfMeasure>C62</UnitOfMeasure>
          <Classification domain="UNSPSC">31201517</Classification>
          <LeadTime>2</LeadTime>
        </ItemDetail>
      </ItemIn>
    </PunchOutOrderMessage>
  </Message>
</cXML>

The elements that matter

NameNeeded?Meaning
Header/From, To, SenderRequiredFrom and Sender are you; To is the buyer, using the identity and domain from the From credential of the setup request. No shared secret is sent: the message travels through the buyer’s own browser.
Message/@deploymentModeOptionaltest or production; missing means production. Match the mode of the setup request.
BuyerCookieRequiredExactly the value received in the PunchOutSetupRequest.
PunchOutOrderMessageHeader/@operationAllowedRequiredThe most the buyer may do with the cart later: create, inspect or edit.
Total/MoneyRequiredCart total with a currency attribute (ISO 4217). Should equal the sum of quantity × unit price.
ItemIn/@quantityRequiredQuantity in the line’s unit of measure.
ItemID/SupplierPartIDRequiredYour part number. It comes back on the purchase order.
ItemID/SupplierPartAuxiliaryIDOptionalAny extra key you need to recognise the line later, such as a configuration or quote reference. It is returned on the order and on edit.
UnitPrice/MoneyRequiredPrice per unit of measure, with currency.
DescriptionRequiredLine text with xml:lang. An optional ShortName child gives a short title.
UnitOfMeasureRequiredA UN/CEFACT Recommendation 20 code such as EA, C62 or KGM.
ClassificationRequiredAt least one is required by the DTD. domain="UNSPSC" with the commodity code is what most buyers expect.
ManufacturerPartID, ManufacturerNameOptionalThe maker’s part number and name, when you resell branded goods.
LeadTimeOptionalDays to deliver.
ExtrinsicOptionalNamed extra values per line. Only useful if the buyer has mapped them; otherwise they are ignored.

Mistakes that get it rejected

Posting from your serverThe BrowserFormPost URL is usually only reachable from inside the buyer’s session in their browser. A server-to-server POST typically fails or lands in a session that is not there. Submit a form from the browser.
Encoding the field wronglyThe form field is cxml-urlencoded and holds the XML as a normal form value; the browser URL-encodes it. Pre-encoding it yourself, or HTML-escaping the XML into the field so the procurement system receives &lt; entities, breaks parsing.
Totals that do not add upSome procurement systems recompute quantity × unit price and compare it with Total. Rounding unit prices to two decimals when the real price has more is a common cause of a mismatch.
Units or classifications the buyer does not acceptAn internal unit like PCS, or a missing or outdated UNSPSC code, can make the cart fail on return or leave lines the buyer cannot submit. Map to the buyer’s accepted codes before transfer.

Have a PunchOutOrderMessage that a buyer rejected? Paste it into the free cXML and OCI tester; it checks structure in your browser.

PunchOutOrderMessage questions

Is a PunchOutOrderMessage a purchase order?

No. It is a cart. The buyer can change it, it goes through their approval workflow, and the purchase order arrives later as a cXML OrderRequest, by email or through a portal.

Can I use cxml-base64 instead of cxml-urlencoded?

cXML defines both form fields. cxml-urlencoded is the more widely used; use cxml-base64 only if the buyer asks for it.

What happens if the cart contains a price the buyer did not agree?

The procurement system usually accepts it as a requisition line; whether the requisition is approved is the buyer’s process. Price from the buyer’s contract on the server, not from values the browser sends.

Rather not hand-build this?

The free PunchOut shop handles the PunchOutOrderMessage side of the round trip for you: upload your catalogue from Excel, test a cXML or OCI round trip and invite your buyer. Free until your buyer goes live.

Start free Send us the document