Punchout cXML extension points

concept australia Updated Nov 5, 2026 2 min read punchout-cxml-extension-points.md
Raw file servicenow.com

Use the PunchoutRequestBuilder and PunchoutResponseParser scripted extension points to customize the cXML requests that are sent to a punchout supplier and how the cXML responses from that supplier are parsed.

Each punchout supplier can have its own implementation of an extension point. For a punchout transaction, the system looks for an implementation whose getSupplierId method returns the ID of that punchout supplier. If it finds one, it uses the first matching implementation. If it does not find one, it uses the default implementation.

Extension point

What it controls

Methods to implement

Default implementation

sn_spend_intg.PunchoutRequestBuilder

How the punchout setup request and the punchout order request are built and sent to the supplier.

  • getSupplierId
  • sendPunchoutSetupRequest(payload, sku)
  • sendPunchoutOrderRequest(orderId)

DefaultPunchoutRequestBuilder

sn_spend_intg.PunchoutResponseParser

How the cXML responses and messages from the supplier are parsed.

  • getSupplierId
  • parsePunchoutSetupResponse(xmlResponse)
  • parsePunchoutOrderMessageResponse(params)
  • parsePunchoutOrderConfirmationResponse(xmlResponse)
  • parsePunchoutShippingConfirmationResponse(xmlResponse)

DefaultPunchoutResponseParser

**Note:** The `initialize` method of your implementation must return the object that implements the methods. The system calls the methods on the object that `initialize` returns.

Note: For parsePunchoutOrderMessageResponse, the params argument contains the form fields that the supplier site posts, such as cxml-urlencoded or cxml-base64. The method must return an object that contains the canvas value. SPO uses the canvas value to decide where to redirect the shopper after the return from the supplier site.

To create an implementation, create a script include and an extension instance for the extension point, as described in Create script include for punchout supplier products and Create extension instance for the scripted extension point. Use the default implementation as a starting point.

For the extension point that controls how product details from a punchout supplier are displayed in Shopping Hub, see Configure extension point for Product search API.

Parent Topic:Configure punchout for third-party site purchases

Search documentation
Search document titles and file paths on the australia branch