SAP OCI fields: HOOK_URL and NEW_ITEM reference
OCI (Open Catalog Interface) is SAP’s PunchOut protocol for SRM, ECC and S/4HANA. There is no XML: the buyer arrives with URL parameters, and the cart goes back as HTML form fields named NEW_ITEM-*. These are the NEW_ITEM fields common to OCI 4.0 and 5.0.
Where it fits
- A buyer opens your catalogue from SAP. Their browser calls your OCI URL by GET or POST with login parameters — typically
USERNAME,PASSWORDandHOOK_URL— and any extra parameters configured in the buyer’s catalogue settings. - You check the credentials, keep the
HOOK_URLand any parameters starting with~against a session, and redirect the browser into your shop. - When the buyer transfers the cart, your page submits an HTML form by POST to the
HOOK_URL. Each line is a set ofNEW_ITEM-*[n]fields, numbered from 1, and the~parameters are echoed back unchanged. - SAP turns each line into a shopping cart or requisition item. The order follows later through SAP’s own channels, commonly as IDoc, email, or cXML through a network.
The OCI call from Example Buyer GmbH’s SAP system, then the fields Nordwind Supplies posts back to HOOK_URL, as QuickPunchOut emits them.
# 1. Buyer's browser opens the catalogue (shown decoded; real values are URL-encoded)
GET https://punchout.example.com/oci?USERNAME=nordwind-supplies&PASSWORD=change-me
&HOOK_URL=https://srm.buyer.example/oci/return?sap-client=100
&OCI_VERSION=4.0&~OkCode=ADDI&~TARGET=_top&~CALLER=CTLG&returntarget=_top
# 2. Cart transfer: HTML form, method="post", action = the HOOK_URL above
NEW_ITEM-DESCRIPTION[1]=Nitrile gloves, size L
NEW_ITEM-QUANTITY[1]=10
NEW_ITEM-UNIT[1]=BX
NEW_ITEM-PRICE[1]=8.90
NEW_ITEM-PRICEUNIT[1]=1
NEW_ITEM-CURRENCY[1]=EUR
NEW_ITEM-VENDORMAT[1]=NW-GLV-NIT-L
NEW_ITEM-LEADTIME[1]=3
NEW_ITEM-EXT_SCHEMA_TYPE[1]=UNSPSC
NEW_ITEM-EXT_CATEGORY_ID[1]=42132203
NEW_ITEM-LONGTEXT_1:132[]=Powder-free, box of 100
NEW_ITEM-DESCRIPTION[2]=Packing tape, 50 mm x 66 m
NEW_ITEM-QUANTITY[2]=4
NEW_ITEM-UNIT[2]=PCE
NEW_ITEM-PRICE[2]=18.10
NEW_ITEM-PRICEUNIT[2]=1
NEW_ITEM-CURRENCY[2]=EUR
NEW_ITEM-VENDORMAT[2]=NW-TAPE-50
NEW_ITEM-LEADTIME[2]=2
NEW_ITEM-EXT_SCHEMA_TYPE[2]=UNSPSC
NEW_ITEM-EXT_CATEGORY_ID[2]=31201517
~OkCode=ADDI
~TARGET=_top
~CALLER=CTLG The fields
| Name | Needed? | Meaning |
|---|---|---|
HOOK_URL | Required | Login parameter: the SAP URL the cart is posted back to. Use the value from each call; it can differ per user or system. |
USERNAME, PASSWORD | Optional | Login parameters for your catalogue. The names are whatever you and the buyer configure in SAP; these two are the most common. |
OCI_VERSION | Optional | Login parameter: the OCI version SAP is speaking, such as 4.0. |
~OkCode, ~TARGET, ~CALLER | Conditional | SAP control parameters, usually ADDI, _top and CTLG. Post back every parameter that arrived with a ~ prefix, unchanged. |
NEW_ITEM-DESCRIPTION[n] | Conditional | Short text, up to 40 characters in SAP. Required for a free-text item, that is, when NEW_ITEM-MATNR is not sent. |
NEW_ITEM-MATNR[n] | Optional | The buyer’s own SAP material number, when the buyer has given you their numbers. Most catalogues leave it empty. |
NEW_ITEM-QUANTITY[n] | Required | Quantity, with a full stop as the decimal separator and no thousands separator. |
NEW_ITEM-UNIT[n] | Required | Unit of measure as the ISO code SAP uses, such as PCE for piece or KGM for kilogram. SAP checks it against its unit tables. |
NEW_ITEM-PRICE[n] | Required | Price per price unit, full stop as decimal separator. |
NEW_ITEM-PRICEUNIT[n] | Optional | How many units the price applies to. 1 unless you price per 100 or per 1,000. |
NEW_ITEM-CURRENCY[n] | Required | ISO 4217 currency code such as EUR. |
NEW_ITEM-VENDORMAT[n] | Optional | Your part number. Send it: it is what appears on the purchase order you receive. |
NEW_ITEM-LEADTIME[n] | Optional | Delivery time in days. |
NEW_ITEM-MATGROUP[n] | Optional | The buyer’s own SAP material group. Only send it if the buyer gives you their values; it is not a UNSPSC field. |
NEW_ITEM-VENDOR[n] | Optional | Your vendor number in the buyer’s SAP system, if they ask you to send it. |
NEW_ITEM-MANUFACTMAT[n], NEW_ITEM-MANUFACTCODE[n] | Optional | Manufacturer part number and the buyer’s code for the manufacturer. |
NEW_ITEM-EXT_SCHEMA_TYPE[n] | Conditional | Name of the classification scheme, such as UNSPSC. Required when either external category field is sent. |
NEW_ITEM-EXT_CATEGORY_ID[n] | Optional | The classification code in that scheme, for example the UNSPSC commodity code. |
NEW_ITEM-CONTRACT[n], NEW_ITEM-CONTRACT_ITEM[n] | Optional | The buyer’s contract number and contract item, when prices come from a contract held in SAP. |
NEW_ITEM-LONGTEXT_n:132[] | Optional | Long description. Note the different syntax: the line number goes after an underscore, then :132[]. |
Mistakes that get it rejected
NEW_ITEM-LONGTEXT_n:132[].C62 for piece is a common reason SAP rejects a line; PCE is what most SAP systems expect. Confirm the buyer’s unit list.~OkCode and ~TARGET tell SAP what to do with the posted form and which frame to load. Without them, the cart can arrive in the wrong frame or not be added at all.8.90 into 8,90 produces a wrong price or a rejected line. Format numbers independently of the user’s locale.Have a OCI fields that a buyer rejected? Paste it into the free cXML and OCI tester; it checks structure in your browser.
OCI fields questions
Is OCI the same as cXML PunchOut?
No. Both let a buyer shop on a supplier site and return a cart, but OCI uses URL parameters and HTML form fields, while cXML uses XML documents and a server-to-server setup request. SAP SRM, ECC and S/4HANA speak OCI; Ariba, Coupa and most other platforms speak cXML.
Why does the long text field look different?
The OCI specification defines it as NEW_ITEM-LONGTEXT_n:132[], where n is the line number. The 132 reflects SAP’s long-text line length; the field can hold more than 132 characters.
Does OCI send purchase orders?
No. OCI covers catalogue browsing and cart return only. The purchase order is sent by the buyer’s SAP system separately, by whatever channel they use for that supplier.
Rather not hand-build this?
The free PunchOut shop handles the OCI fields 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