OCI reference

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

  1. A buyer opens your catalogue from SAP. Their browser calls your OCI URL by GET or POST with login parameters — typically USERNAME, PASSWORD and HOOK_URL — and any extra parameters configured in the buyer’s catalogue settings.
  2. You check the credentials, keep the HOOK_URL and any parameters starting with ~ against a session, and redirect the browser into your shop.
  3. When the buyer transfers the cart, your page submits an HTML form by POST to the HOOK_URL. Each line is a set of NEW_ITEM-*[n] fields, numbered from 1, and the ~ parameters are echoed back unchanged.
  4. 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

NameNeeded?Meaning
HOOK_URLRequiredLogin parameter: the SAP URL the cart is posted back to. Use the value from each call; it can differ per user or system.
USERNAME, PASSWORDOptionalLogin parameters for your catalogue. The names are whatever you and the buyer configure in SAP; these two are the most common.
OCI_VERSIONOptionalLogin parameter: the OCI version SAP is speaking, such as 4.0.
~OkCode, ~TARGET, ~CALLERConditionalSAP control parameters, usually ADDI, _top and CTLG. Post back every parameter that arrived with a ~ prefix, unchanged.
NEW_ITEM-DESCRIPTION[n]ConditionalShort 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]OptionalThe buyer’s own SAP material number, when the buyer has given you their numbers. Most catalogues leave it empty.
NEW_ITEM-QUANTITY[n]RequiredQuantity, with a full stop as the decimal separator and no thousands separator.
NEW_ITEM-UNIT[n]RequiredUnit 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]RequiredPrice per price unit, full stop as decimal separator.
NEW_ITEM-PRICEUNIT[n]OptionalHow many units the price applies to. 1 unless you price per 100 or per 1,000.
NEW_ITEM-CURRENCY[n]RequiredISO 4217 currency code such as EUR.
NEW_ITEM-VENDORMAT[n]OptionalYour part number. Send it: it is what appears on the purchase order you receive.
NEW_ITEM-LEADTIME[n]OptionalDelivery time in days.
NEW_ITEM-MATGROUP[n]OptionalThe 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]OptionalYour vendor number in the buyer’s SAP system, if they ask you to send it.
NEW_ITEM-MANUFACTMAT[n], NEW_ITEM-MANUFACTCODE[n]OptionalManufacturer part number and the buyer’s code for the manufacturer.
NEW_ITEM-EXT_SCHEMA_TYPE[n]ConditionalName of the classification scheme, such as UNSPSC. Required when either external category field is sent.
NEW_ITEM-EXT_CATEGORY_ID[n]OptionalThe classification code in that scheme, for example the UNSPSC commodity code.
NEW_ITEM-CONTRACT[n], NEW_ITEM-CONTRACT_ITEM[n]OptionalThe buyer’s contract number and contract item, when prices come from a contract held in SAP.
NEW_ITEM-LONGTEXT_n:132[]OptionalLong description. Note the different syntax: the line number goes after an underscore, then :132[].

Mistakes that get it rejected

Long descriptions in the short-text fieldSAP’s item short text is 40 characters. Longer values are cut off or refused depending on the system; put the rest in NEW_ITEM-LONGTEXT_n:132[].
cXML unit codes in OCISAP maps OCI units through its own ISO code table, which is not identical to UN/CEFACT Recommendation 20. C62 for piece is a common reason SAP rejects a line; PCE is what most SAP systems expect. Confirm the buyer’s unit list.
Dropping the ~ parametersParameters such as ~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.
Decimal commasA German or French locale turning 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