Skip to content
Gatebold

OCI Examples

OCI PunchOut payloads ready to copy.

7 curated examples - cart return and setup request - illustrating both clean configurations (OCI 4.0, OCI 5.0 attachments) and classic traps (PRICEUNIT x1000, [0] indexing, ~Target=_self, etc.). Copy, download, or test directly in the validator.

Test data only - never use in production.

All values (VENDOR, VENDORMAT, product codes, HOOK_URL, credentials) are fictional. Use these examples as a reference structure then replace each value with your own.

Setup request

OCI session opening URL - built by the buyer (SAP SRM, S/4HANA, etc.) to enter the supplier catalogue. Parameters USERNAME, PASSWORD, HOOK_URL, ~OkCode, ~Target, etc.

Clean setup request - HTTPS, ~Target=_top, ~OkCode=ADDI

The recommended configuration for an OCI call to a supplier catalogue in production.

Setup RequestClean

OCI session opening URL following best practices: HTTPS for the tunnel, distinct USERNAME and PASSWORD, absolute HTTPS HOOK_URL, ~OkCode=ADDI (add to current SAP shopping cart), ~Target=_top (escapes all iframes so the cart return bubbles up to the SRM window level), ~Caller=CTLG, and LANGU=FR to serve the catalogue in French. This is exactly the pattern a SAP SRM buyer configures on the supplier side in the OCI connection table.

Setup URL181 chars
https://catalogue.example.com/punchout?USERNAME=buyer-acme&PASSWORD=demoSecret&HOOK_URL=https%3A%2F%2Fsrm.acme.fr%2Fpunchout%2Freturn&~OkCode=ADDI&~Target=_top&~Caller=CTLG&LANGU=FR

Setup request with warnings - frame trap, HTTP, PASSWORD in query

Three common bad practices that silently break punchout in production.

Setup RequestWarnings

Three traps to avoid, all present in this URL: (1) HOOK_URL over HTTP - silently blocked by Chrome as mixed-content from an HTTPS catalogue. (2) ~Target=_self traps the return form in the current frame (classic SRM-behind-reverse-proxy case: HOOK_URL never fires). (3) PASSWORD passed in the GET query string instead of a POST form-urlencoded body - the password ends up in every reverse proxy log and browser history. The Gatebold validator raises a warning on each point without blocking validation.

Setup URL172 chars
https://catalogue.example.com/punchout?USERNAME=buyer-acme&PASSWORD=demoSecret&HOOK_URL=http%3A%2F%2Fsrm.acme.fr%2Fpunchout%2Freturn&~OkCode=ADDI&~Target=_self&~Caller=CTLG

Cart return

application/x-www-form-urlencoded body POSTed by the supplier catalogue to the buyer's HOOK_URL, containing the NEW_ITEM-*[i] lines.

Minimal cart return - 1 line, required fields only

The smallest valid OCI cart return that passes with no error or warning.

Cart ReturnOCI 4.0Minimal

The smallest technically valid OCI 4.0 cart return: a single line with the five required fields (DESCRIPTION, QUANTITY, UNIT, PRICE, CURRENCY). No VENDOR, no MATGROUP, no DELIVERYDATE. Useful to start an integration from scratch and verify that the HOOK_URL tunnel works before enriching the mapping. Note: without MATGROUP (UNSPSC), many SAP buyers will auto-recategorise the line into a default group - it is deliberately omitted here to show the strict minimum.

Form-urlencoded body144 chars
NEW_ITEM-DESCRIPTION[1]=Crayon%20HB%20lot%20de%2012&NEW_ITEM-QUANTITY[1]=10&NEW_ITEM-UNIT[1]=PCE&NEW_ITEM-PRICE[1]=1.50&NEW_ITEM-CURRENCY[1]=EUR

Complete OCI 4.0 cart return - 3 mixed lines

Three varied lines with VENDOR, UNSPSC MATGROUP, DELIVERYDATE and a service line.

Cart ReturnOCI 4.0Complet

A realistic B2B catalogue return over OCI 4.0. Three lines: Cat6a cable (network hardware, UNSPSC 43222600), an IEC power cord (UNSPSC 39121600), and a service line (NEW_ITEM-SERVICE=X, unit HUR = hour). Each line carries its vendor reference (VENDOR + VENDORMAT), its UNSPSC code (MATGROUP) and the first line pushes a requested delivery date. This is the richness level a SAP buyer expects in production - the technical minimum is never enough beyond a POC.

Form-urlencoded body759 chars
NEW_ITEM-DESCRIPTION[1]=Cable%20RJ45%20Cat6a%201m%20gris&NEW_ITEM-MATNR[1]=NET-C6A-1M&NEW_ITEM-QUANTITY[1]=50&NEW_ITEM-UNIT[1]=PCE&NEW_ITEM-PRICE[1]=2.40&NEW_ITEM-CURRENCY[1]=EUR&NEW_ITEM-VENDOR[1]=ACME01&NEW_ITEM-VENDORMAT[1]=ACME-RJ45-C6A-1M&NEW_ITEM-MATGROUP[1]=43222600&NEW_ITEM-DELIVERYDATE[1]=2026-06-15&NEW_ITEM-DESCRIPTION[2]=Cordon%20alimentation%20IEC%20C13%201.8m&NEW_ITEM-QUANTITY[2]=20&NEW_ITEM-UNIT[2]=PCE&NEW_ITEM-PRICE[2]=4.20&NEW_ITEM-CURRENCY[2]=EUR&NEW_ITEM-VENDOR[2]=ACME01&NEW_ITEM-VENDORMAT[2]=ACME-PWR-C13&NEW_ITEM-MATGROUP[2]=39121600&NEW_ITEM-DESCRIPTION[3]=Service%20installation%20sur%20site&NEW_ITEM-QUANTITY[3]=2&NEW_ITEM-UNIT[3]=HUR&NEW_ITEM-PRICE[3]=85.00&NEW_ITEM-CURRENCY[3]=EUR&NEW_ITEM-SERVICE[3]=X&NEW_ITEM-VENDOR[3]=ACME01

PRICEUNIT trap - the silent x1000 pricing killer

Demonstrates the #1 source of pricing errors in OCI integration: PRICEUNIT misinterpreted by the buyer.

Cart ReturnOCI 4.0Piège

The supplier sends a unit price of 12.50 EUR... for 1000 units (PRICEUNIT=1000) on screws. The actual per-piece price is 0.0125 EUR. If the SAP buyer does not map PRICEUNIT in MM-PUR, they will bill 12.50 EUR per piece - a factor-1000 error. This is the most expensive and most silent bug in the OCI protocol: no validation error, no encoding warning, just a cart that lands in SAP with an astronomical amount. The Gatebold validator computes the effective price and explicitly flags this line.

Form-urlencoded body281 chars
NEW_ITEM-DESCRIPTION[1]=Vis%20tete%20plate%20M4x16%20(lot%201000)&NEW_ITEM-QUANTITY[1]=2500&NEW_ITEM-UNIT[1]=PCE&NEW_ITEM-PRICE[1]=12.50&NEW_ITEM-PRICEUNIT[1]=1000&NEW_ITEM-CURRENCY[1]=EUR&NEW_ITEM-VENDOR[1]=ACME01&NEW_ITEM-VENDORMAT[1]=ACME-VIS-M4-16&NEW_ITEM-MATGROUP[1]=31161700

Errors demo - the validator in action

A deliberately broken cart to see what the validator actually catches.

Cart ReturnDémo erreurs

Four lines, four error categories: (1) A line on the forbidden index [0] per OCI 4.0 spec, plus a non-existent currency (XXX). (2) A line [2] where the required PRICE field is missing. (3) A line [3] with an invalid delivery date (2026-13-45). (4) Indices [0], [2], [3] non-contiguous, the validator will also flag the index gap. This is the perfect payload to understand which checks the validator runs before you send your real production cart return.

Form-urlencoded body469 chars
NEW_ITEM-DESCRIPTION[0]=Article%20sur%20index%200%20-%20interdit&NEW_ITEM-QUANTITY[0]=1&NEW_ITEM-UNIT[0]=PCE&NEW_ITEM-PRICE[0]=10&NEW_ITEM-CURRENCY[0]=XXX&NEW_ITEM-DESCRIPTION[2]=PRICE%20manquant%20sur%20cette%20ligne&NEW_ITEM-QUANTITY[2]=5&NEW_ITEM-UNIT[2]=PCE&NEW_ITEM-CURRENCY[2]=EUR&NEW_ITEM-DESCRIPTION[3]=Date%20de%20livraison%20invalide&NEW_ITEM-QUANTITY[3]=1&NEW_ITEM-UNIT[3]=PCE&NEW_ITEM-PRICE[3]=15&NEW_ITEM-CURRENCY[3]=EUR&NEW_ITEM-DELIVERYDATE[3]=2026-13-45

OCI 5.0 - attachments and external product references

A line enriched with ATTACHMENT, EXT_PRODUCT_ID (GTIN) and EXT_CATEGORY_ID (UNSPSC), specific to OCI 5.0.

Cart ReturnOCI 5.0

Demonstration of fields introduced by OCI 5.0: NEW_ITEM-ATTACHMENT (URL of a datasheet PDF), NEW_ITEM-ATTACHMENT_TITLE + PURPOSE, NEW_ITEM-EXT_PRODUCT_ID (GTIN/EAN code), NEW_ITEM-EXT_SCHEMA_TYPE (GTIN here), and NEW_ITEM-EXT_CATEGORY_ID/EXT_CATEGORY to push an external classification on top of MATGROUP. The validator recognises these fields and tags them as OCI 5.0 in the report. In practice, few SAP buyers will accept these fields without specific configuration - start in OCI 4.0 and negotiate the addition with the buyer.

Form-urlencoded body671 chars
NEW_ITEM-DESCRIPTION[1]=Onduleur%20APC%20Smart-UPS%201500VA&NEW_ITEM-MATNR[1]=UPS-APC-1500&NEW_ITEM-QUANTITY[1]=2&NEW_ITEM-UNIT[1]=PCE&NEW_ITEM-PRICE[1]=489.00&NEW_ITEM-CURRENCY[1]=EUR&NEW_ITEM-VENDOR[1]=ACME01&NEW_ITEM-VENDORMAT[1]=APC-SMT1500IC&NEW_ITEM-MANUFACTCODE[1]=APC&NEW_ITEM-MANUFACTMAT[1]=SMT1500IC&NEW_ITEM-MATGROUP[1]=39121011&NEW_ITEM-ATTACHMENT[1]=https%3A%2F%2Fdocs.acme.fr%2Fdatasheets%2Fapc-smt1500ic.pdf&NEW_ITEM-ATTACHMENT_TITLE[1]=Fiche%20technique%20APC%20SMT1500IC&NEW_ITEM-ATTACHMENT_PURPOSE[1]=DATASHEET&NEW_ITEM-EXT_PRODUCT_ID[1]=0731304304463&NEW_ITEM-EXT_SCHEMA_TYPE[1]=GTIN&NEW_ITEM-EXT_CATEGORY_ID[1]=39121011&NEW_ITEM-EXT_CATEGORY[1]=UNSPSC

Going further

  • OCI Validator - test your OCI payloads against the documented rules (PRICEUNIT, indexing, SAP T006 units, encoding, etc.).
  • OCI Fields reference - all 38 documented fields (cart return + setup request), with format, length, version 4.0/5.0 and descriptions.
  • cXML Validator - equivalent for the cXML 1.2.070 protocol (official DTD).
  • cXML vs OCI - full protocol comparison.
  • UNSPSC Codes - the product/service referential for the NEW_ITEM-MATGROUP field.

Frequently asked questions

What are these examples for?
Each example is a realistic OCI payload ready to paste into the validator or to use as a starting point on the supplier side. Some illustrate clean configurations, others are deliberately broken to demonstrate classic errors (misread PRICEUNIT, forbidden [0] index, ~Target=_self, Latin-1 encoding, etc.) that the Gatebold validator detects.
Can I use these examples in production?
No, never directly. Values are fictional (VENDOR=ACME01, realistic UNSPSC codes paired with demo products, etc.). Use them as a reference structure and replace each value with the ones from your own catalogue and buyer.
How does the "Test in the validator" button work?
The button stores the payload in your browser's sessionStorage (key 'gatebold-oci-prefill') then redirects you to the OCI validator, which detects the prefill on load and automatically inserts the payload into the input. The data never leaves your browser.
What is the difference between cart return and setup request?
The setup request is the session opening URL that the buyer (ERP/SRM) opens to enter the supplier catalogue. The cart return is the POST body that the supplier catalogue sends back to HOOK_URL once the buyer has validated their cart. The two flows together make a complete OCI PunchOut.