Troubleshooting

The OCI return has nowhere to go

The shopper reaches your catalogue, builds a basket, clicks transfer, and either nothing happens or they land on an error page on your own domain rather than back in SAP.

Short answer

HOOK_URL arrives as a parameter on the inbound call and is the only address your return may post to. Three faults account for nearly all of these: you stored it at setup instead of reading it per session, it arrived percent-encoded and was never decoded, or the buyer sends it on the POST body while your handler reads only the query string.

Causes, most likely first

Ordered by how often each one turns out to be the culprit, not by how interesting it is. Work down the list.

  1. You stored HOOK_URL instead of reading it per session

    How to confirm: It works with the buyer you built against and fails with the next one, or fails intermittently for the same buyer. HOOK_URL is session-specific in exactly the way BrowserFormPost is in cXML.

    Fix: Read HOOK_URL from each inbound call and carry it through the session. Never persist it against the buyer record.

  2. HOOK_URL was never decoded

    How to confirm: Your logs show a return target containing %3A%2F%2F. It is a URL nested inside a query string, so it arrives percent-encoded, and posting to the encoded literal produces a 404 on a host that does not exist.

    Fix: Decode the parameter value once before using it. Once, not twice — double decoding breaks session tokens that legitimately contain percent signs.

  3. The call arrives as a POST and you read only query parameters

    How to confirm: Some buyer configurations POST the inbound punchout call rather than using GET. Your handler finds no HOOK_URL and the rest of the parameters are equally absent, which usually sends people looking for an authentication problem.

    Fix: Read parameters from the query string and the form body on the inbound route, regardless of method.

  4. Parameter name casing

    How to confirm: OCI parameters are conventionally upper case, and not every system honours the convention. A case-sensitive lookup for HOOK_URL misses hook_url entirely.

    Fix: Match parameter names case-insensitively on the way in.

  5. You are appending your own parameters to HOOK_URL

    How to confirm: The return posts to a URL that looks right and the buyer’s system does not recognise the session. HOOK_URL frequently carries a session token of its own, and appending to it or re-ordering its query string invalidates it.

    Fix: Post to HOOK_URL exactly as received. Carry your own state in the form fields, not in the URL.

If it is not on your side

Ask the buyer for the exact inbound call their system makes — the method, the full parameter list and a sample value for HOOK_URL. OCI implementations vary more between buyers than cXML does, and that one sample resolves most of this list without further discussion.

Check the document itself

Before chasing “The OCI return has nowhere to go” further, paste the cXML or OCI payload into our free tester. It runs in your browser and reports the structural problems buyers reject on. The interactive demo plays the whole round trip from the buyer's seat.

Open the tester Play the demo

Related questions

Is HOOK_URL the same thing as BrowserFormPost in cXML?

Functionally yes: it is the session-specific address your basket must be returned to. The mistakes are the same too — storing it rather than reading it per session is the leading cause of failure in both protocols.

Should we validate the HOOK_URL host before posting to it?

Yes. Check it against the hosts you expect for that buyer. An unvalidated redirect target supplied in a request parameter is an open redirect, and the fact that it arrived in an OCI call does not make it trustworthy.

Rather not be the one debugging this?

A free PunchOut shop runs the PunchOut round trip for you: upload from Excel, test it, invite your buyer.

Start free Send us the error