Glossary

HOOK_URL

HOOK_URL is the parameter SAP passes when it opens an OCI catalogue, giving the address in the buyer’s SAP system where the supplier must post the shopping cart back as HTML form fields.

An OCI session starts with the buyer’s browser calling your catalogue URL, with login parameters such as USERNAME and PASSWORD and the HOOK_URL. You keep it against the session. When the buyer transfers the cart, your page submits an HTML form by POST to that address, with one set of NEW_ITEM-*[n] fields per line and every parameter that arrived with a ~ prefix echoed back.

HOOK_URL does the job BrowserFormPost does in cXML, but there is no XML and no setup request from the buyer’s server: the call comes from the browser, and the return is plain form fields that SAP reads into a shopping cart or requisition.

Use the value from each call. It can differ per user, per SAP client or per system, so a hook URL copied into configuration during testing breaks in production. Dropping the ~ parameters, such as ~OkCode and ~TARGET, is the other common fault: the cart can land in the wrong frame or not be added at all.

The OCI call that opens a catalogue (decoded for reading), and the start of the cart posted back to HOOK_URL.
GET https://punchout.example.com/oci?USERNAME=nordwind-supplies&PASSWORD=change-me
    &HOOK_URL=https://srm.buyer.example/oci/return?sap-client=100
    &~OkCode=ADDI&~TARGET=_top&~CALLER=CTLG

POST https://srm.buyer.example/oci/return?sap-client=100
NEW_ITEM-DESCRIPTION[1]=Nitrile gloves, size L
NEW_ITEM-QUANTITY[1]=10
NEW_ITEM-UNIT[1]=BX
~OkCode=ADDI
~TARGET=_top
~CALLER=CTLG

Go deeper

Related terms

All glossary terms

Has a buyer asked you for PunchOut?

Reading up on HOOK_URL because of it? A free PunchOut shop gets you a catalogue your buyer can test: upload it from Excel, run a cXML or OCI round trip yourself and invite them. Free until they go live.

Start free Talk to us instead