Info
This concept is valid for ICM version 7.10.17 and higher. For previous versions see Concept - OCI Punchout (7.8 - 7.10.16).
With the OCI Punchout feature, the Commerce Management application offers an external catalog interface (OCI) for B2B customers. This allows external systems to access product data from an Intershop server or a selection of products. It uses the official OCI transfer format. The Punchout format can be configured at the application level or individually at runtime with customer-specific settings.
Term | Description |
---|---|
OCI | Open Catalog Interface (OCI) is one of the standard formats used by ERP/Purchasing Systems when connecting to external Punchout catalogs. |
The following documentation is related to the OCI Punchout feature:
Concept - OCI Punchout (valid from 7.10.17) - Basic concepts, OCI Punchout functionality (this document)
Guide - B2B Storefront Functionality (valid from 7.10.17) - See chapters "OCI Punchout" and "OCI Punchout Configuration"
Cookbook - OCI Punchout - Recipes on frequently asked questions
Overview - Configuration Framework - Reference when customizing placeholders or formatters
To understand the OCI Punchout, a list of features for storefront and account administration is given below.
Feature | Description |
---|---|
OCI Checkout | An external (procurement) system can log on to an Intershop Commerce Management storefront as an OCI Punchout user, browse the storefront, add products to the cart, and transfer a cart back to the caller (initially identified by the HOOK_URL). Certain parts of the storefront (e.g., footer) are hidden to enhance the shopping experience coming from an external system (e.g., procurement). |
Product Details | Log in to the storefront as OCI Punchout user and display product details in the OCI Punchout format for a given PRODUCTID. |
Validate Product | Log in to the storefront as OCI Punchout user and automatically transfer back product details in the OCI Punchout format for a given PRODUCTID and QUANTITY. |
Background Search | Log in to the storefront as OCI Punchout user and have all products displayed in the OCI Punchout format that match a given SEARCHSTRING. |
Feature | Description |
---|---|
User Creation | Account admins can create an OCI Punchout user. |
Edit User | Account admins may update the OCI Punchout users' e-mail and password. |
Punchout Configuration | Account admins are able to configure given fields of the Punchout format by defining their content (transform) and optionally providing a formatting. |
Feature | Description |
---|---|
List Punchout Users | Shows all customer- and Punchout-specific users. |
User Creation | Account admins can create Punchout users. |
Edit User | Account admins may update a Punchout user's email or password and set them active/inactive. |
Punchout Configuration | Account admins are able to configure given fields of the Punchout format by defining their content (transform) and optionally providing a formatting. |
Delete User | Account admins can delete a Punchout user. |
OCI Punchout Data | Retrieve basket line item or product data depending on customer-specific Punchout configuration. |
This chapter describes technical insights of the OCI Punchout standard.
The OCI data is transferred using hidden input fields of an HTML form with a defined field name including an index starting with 1
.
<form name="form" method="post" action="123" data-testing-id="oci-basket"> <input type="hidden" name="NEW_ITEM-DESCRIPTION[1]" value="Sony VPL-SW225"> <input type="hidden" name="NEW_ITEM-MATNR[1]" value=""> <input type="hidden" name="NEW_ITEM-QUANTITY[1]" value="1"> <input type="hidden" name="NEW_ITEM-UNIT[1]" value=""> <input type="hidden" name="NEW_ITEM-PRICE[1]" value="988.01"> <input type="hidden" name="NEW_ITEM-CURRENCY[1]" value="USD"> <input type="hidden" name="NEW_ITEM-PRICEUNIT[1]" value=""> <input type="hidden" name="NEW_ITEM-LONGTEXT_1:132[]" value="Sony VPL-SW225, 2600 ANSI lumens, 3LCD, WXGA (1280x800), 6000h, 210W, UHP"> <input type="hidden" name="NEW_ITEM-VENDOR[1]" value="IQ"> <input type="hidden" name="NEW_ITEM-VENDORMAT[1]" value=""> <input type="hidden" name="NEW_ITEM-MANUFACTCODE[1]" value="Sony"> <input type="hidden" name="NEW_ITEM-MANUFACTMAT[1]" value="VPL-SW225+TM-ST2"> <input type="hidden" name="NEW_ITEM-EXT_PRODUCT_ID[1]" value="0027242869158"> </form>
Technically, we reuse the product, basket product line item, and/or customer information to display one or more products.
Note
BasketLineitems which are either gifts or hidden gifts are not part of the OCI Punchout transfer format, since they would get added automatically when it comes to an order.
Intershop Commerce Management allows to log on to a storefront as OCI Punchout user. A reduced storefront (e.g. no footer, reduced header, no checkout process) is then available. An OCI Punchout user can still search or add products to a shopping cart that can be transferred back to a referenced (procurement) system (see HOOK_URL).
The OCI Punchout URL is publicly available and can be accessed by any OCI Punchout user with valid credentials. The URL pattern is described below:
https://<HOST>/INTERSHOP/web/WFS/inSPIRED-inTRONICS_Business-Site/en_US/-/USD/ViewOCICatalog-Start?USERNAME=<USERNAME>&PASSWORD=<PASSWORD>&HOOK_URL=<HOOK_URL>
The following parameters are required for the default OCI Punchout storefront browsing:
Parameter | Description |
---|---|
USERNAME | Login name of a storefront user with the role OCI Punchout user |
PASSWORD | Password of the OCI Punchout user |
HOOK_URL | Transfer the OCI Punchout data back to this URL. Usually a reference to the external (procurement) system. |
<CUSTOM_NAME> | Optional; for customization purposes any additional URL parameter is stored in the storefront session and can be accessed later if required. |
Example:
https://www.example.com/INTERSHOP/web/WFS/inSPIRED-inTRONICS_Business-Site/en_US/-/USD/ViewOCICatalog-Start?USERNAME=ociuser@test.intershop.de&PASSWORD=!InterShop00!&HOOK_URL=www.my-procurements-provider.com
Besides the OCI Punchout catalog browsing on the storefront, several other specialized OCI Punchout functions are available. Each function has its own parameters.
Log on to the storefront as OCI Punchout user and display product details in the OCI Punchout format for a given PRODUCTID
.
Besides USERNAME
, PASSWORD
and HOOK_URL
, the following parameters must be provided:
Parameter | Description |
---|---|
FUNCTION | This parameter must be set to DETAIL . |
PRODUCTID | A unique product identifier as returned by the OCI Punchout transfer format |
Example:
https://www.example.com/INTERSHOP/web/WFS/inSPIRED-inTRONICS_Business-Site/en_US/-/USD/ViewOCICatalog-Start?USERNAME=ociuser@test.intershop.de&PASSWORD=!InterShop00!&HOOK_URL=www.my-procurements-provider.com&FUNCTION=DETAIL&PRODUCTID=0027242869158
The validate function allows to retrieve up-to-date information for a specific product with a given quantity from Intershop Commerce Management. A possible use-case is the update of product data in external systems. Intershop Commerce Management returns a single (or no) product record in the OCI format which is automatically sent back to the caller's HOOK_URL
.
Besides USERNAME
, PASSWORD
, and HOOK_URL
, the following parameters must be provided.
Parameter | Description |
---|---|
FUNCTION | This parameter must be set to VALIDATE . |
PRODUCTID | A unique product identifier as returned by the OCI Punchout transfer format. |
QUANTITY | Optional; defines the requested quantity. This setting may have influence on the returned price. |
AUTOSUBMIT | Optional; this parameter is not part of the official specification. For testing purposes, AUTOSUBMIT can be set to false to suppress the automatic redirect to the provided HOOK_URL . |
Example:
https://www.example.com/INTERSHOP/web/WFS/inSPIRED-inTRONICS_Business-Site/en_US/-/USD/ViewOCICatalog-Start?USERNAME=ociuser@test.intershop.de&PASSWORD=!InterShop00!&HOOK_URL=www.my-procurements-provider.com&FUNCTION=VALIDATE&PRODUCTID=0027242869158&QUANTITY=3
Internally, the OCI Punchout validate utilizes the cart (basket) functionality. This allows you to have the correct price for a given quantity.
The Background Search functionality can be used for cross-catalog searches of the procurement system. The search results are returned in an OCI-compliant format that is not automatically sent (as required by the standard).
Besides USERNAME
, PASSWORD
, and HOOK_URL
, the following parameters must be provided.
Parameter | Description |
---|---|
FUNCTION | BACKGROUND_SEARCH must be set |
SEARCHSTRING | Provide a search term |
Example:
https://www.example.com/INTERSHOP/web/WFS/inSPIRED-inTRONICS_Business-Site/en_US/-/USD/ViewOCICatalog-Start?USERNAME=ociuser@test.intershop.de&PASSWORD=!InterShop00!&HOOK_URL=www.my-procurements-provider.com&FUNCTION=BACKGROUND_SEARCH&SEARCHSTRING=Sony
Internally, the OCI Punchout Background Search reuses the standard product search that returns ProductBOs. Each product comes with a quantity of one. Unlike the other functionalities, no cart (basket) functionality is used. The values of the response are retrieved from the ProductBOs of the search result.
This function is not implemented.
A new basket is created for each outbound connection from the external system to the Intershop system. The lifetime of the basket is limited to the session. Therefore, each OCI Punchout connection, even with the same user, creates a new session with an empty basket. Typically, only a single OCI Punchout user is configured per customer, which is then used for multiple employees in the connected external system. A customer account administrator can configure a single OCI Punchout user. Using the REST API, more than one OCI Punchout user can be configured.
The following artifacts are of interest when developing in the area of Punchout.
The following cartridges contain code artifacts:
Cartridge | Description |
---|---|
bc_punchout | Interfaces for Punchout-related extensions, services and providers |
bc_punchout_orm | Extensions and factories |
app_sf_responsive_b2b | OCI-Punchout-related functionality in the My Account section |
app_sf_rest_b2b | Punchout WebShop REST API |
app_sf_headless_b2b | OCI-Punchout functionality for the PWA (since version 7.10.41.3, 11.11.1 and 12.2.0; see section Storefront Integration for details) |
init_b2b | Roles and permissions |
demo_responsive | Initialize demo content (CMS) for OCI Punchout, and roles and permissions |
CustomerBO
Each customer can have their own Punchout users and Punchout field configuration.
Extension ID | Interface | Comment |
---|---|---|
PunchoutConfiguration | com.intershop.component.punchout.capi.CustomerBOPunchoutConfigurationExtension | Responsible for saving and retrieving the customer-specific configuration |
Punchout | com.intershop.component.punchout.capiCustomerBOPunchoutExtension | Responsible for handling OCI users of the customer |
BasketPLIBO
Retrieve punchout conform values from a basket (cart) for a given product line item (PLI).
Extension ID | Interface | Comment |
---|---|---|
Punchout | com.intershop.component.punchout.capi.configuration.extensions.BasketPLIBOPunchoutExtension | Responsible for getting the basket-related values based on the customer-specific Punchout configuration |
ProductBO
Acquire Punchout conform values from a single product.
Extension ID | Interface | Comment |
---|---|---|
Punchout | com.intershop.component.punchout.capi.configuration.extensions.ProductBOPunchoutExtension | Responsible for getting the product-related values based on the customer-specific Punchout configuration |
For OCI Punchout, new roles and new permissions have been introduced.
Role | Description |
---|---|
APP_B2B_OCI_USER | The B2B OCI user. |
Permission | Description |
---|---|
APP_B2B_MANAGE_PUNCHOUT | The permission to manage Punchout settings. This permission is assigned to the role APP_B2B_ACCOUNT_OWNER. |
APP_B2B_VIEW_PUNCHOUT | The permission to view Punchout settings. This permission is assigned to the role APP_B2B_ACCOUNT_OWNER. |
APP_B2B_SEND_OCI_BASKET | Permission to send the basket to the OCI backend. This permission is assigned to the new role APP_B2B_OCI_USER. |
The Punchout user may have Punchout-standard-specific roles. Currently in the punchoutconfiguration.properties there is APP_B2B_OCI_USER
set for the OCI Punchout.
The OCI user has limited access to storefront functionality like quotes. Therefore the storefront user's role is checked.
Note
Some functionality is disabled on pages which are intended to be cached. To prevent page caching issues, a special user group is used. Other B2B user roles still do not own a dedicated user group.
A Punchout standard can be configured in the punchoutconfiguration.properties (see bc_punchout). The Punchout user roles and also individual fields can be specified per Punchout standard here.
Currently Intershop Commerce System comes with the OCI Punchout standard. Each standard has a set of fields and user roles defined.
# e.g., punchout.configuration.standards=oci,<punchout-type> punchout.configuration.standard=oci
For the existing OCI Punchout standard, the role APP_B2B_OCI_USER
is set by default in the Intershop Commerce System for specific Punchout users.
# Define the users related to a given punchout type # e.g., <punchout-standard>.users.roles=<my-custom-role>,<another-custom-role> oci.users.roles=APP_B2B_OCI_USER
By default, the following fields are returned for the OCI Punchout standard. Additional fields can be added, but will require your custom field configuration.
oci.ver5.punchout.configuration.fields=NEW_ITEM-PRICE, NEW_ITEM-UNIT, NEW_ITEM-MATNR, NEW_ITEM-DESCRIPTION, NEW_ITEM-QUANTITY, NEW_ITEM-CURRENCY, NEW_ITEM-PRICEUNIT, NEW_ITEM-LEADTIME, NEW_ITEM-LONGTEXT, NEW_ITEM-VENDOR, NEW_ITEM-VENDORMAT, NEW_ITEM-MANUFACTCODE, NEW_ITEM-MANUFACTMAT, NEW_ITEM-MATGROUP, NEW_ITEM-CONTRACT, NEW_ITEM-CONTRACT_ITEM, NEW_ITEM-CUST_FIELD1, NEW_ITEM-CUST_FIELD2, NEW_ITEM-CUST_FIELD3, NEW_ITEM-CUST_FIELD4, NEW_ITEM-CUST_FIELD5, NEW_ITEM-EXT_PRODUCT_ID
The following set of properties has to be defined per Punchout standard (see <punchout-standard>
) and per field (see <fieldId>
).
Property Key | Description |
---|---|
<punchout-standard>.ver5.punchout.configuration.fields | A comma-separated list of field IDs to be returned |
<punchout-standard>.ver5.punchout.configuration.<fieldId>.fieldname | The name of the field |
<punchout-standard>.ver5.punchout.configuration.<fieldId>.length | The length of the value to be returned (-1 for unlimited length of the value to return) |
<punchout-standard>.ver5.punchout.configuration.<fieldId>.configurable | True if the field can be configured by the customer |
<punchout-standard>.ver5.punchout.configuration.<fieldId>.transform | The transformation rule for retrieving the values |
<punchout-standard>.ver5.punchout.configuration.<fieldId>.formatter | A formatter to be applied to the value |
A new placeholder for product custom attributes has been created. The placeholder name for the transform configuration is simply the case-sensitive name of the custom attribute (e.g.: {MyColor}). To control the access to the custom attributes of the product, the following property key has been introduced: <punchout-standard>.ver5.punchout.configuration.custom.attributes.with.access=MyColor,MySize
. Only custom attributes with access will be resolved. All others are ignored.
The punchoutconfiguration.properties file is loaded by the configuration framework. This allows to overwrite the default Punchout configuration, e.g., in a custom cartridge.
The return value of a Punchout field is determined by the transform
value and the following formatter
.
The transformation may contain constants and/or placeholders (e.g., "EN_{sku}
"). Each placeholder is surrounded by curly brackets and returns a specific value. The return value of a placeholder is defined by a backing PunchoutPlaceholder implementation. The following standard placeholders are available:
Currency
Description
ManufacturerName
ManufacturerSku
ProductName
Quantity
Sku
SupplierName
SupplierSku
Using the placeholder Discarded
prevents the field from being sent to the external system.
The placeholders are handled case-insensitive.
A new placeholder has been implemented that now handles custom attributes. This placeholder does not appear in the list of available placeholders because it is used implicitly if no explicit placeholder name matches the list above.
There is now a new property key for custom attributes. This key contains a list of custom attribute names that can be accessed. The list of custom attribute names is automatically appended to the list of available placeholders in the UI. See Guide - B2B Storefront Functionality (valid from 7.10.17) | OCI_Punchout_Configuration for details and see the custom attributes configuration above for the required property configuration.
The placeholders for custom attributes are case-sensitive.
To apply a custom formatting to the by transform
generated value, use formatters. The available formatters can be extended. The following standard formatters are available:
LowerCase
Trim
UpperCase
The formatters are handled case-sensitive. For adding new formatters and placeholders see Cookbook - OCI Punchout.
Mapping allows the string resolved by a placeholder during the transformation step to be converted to another configurable value. The mapping configuration is only stored with the customer and is not part of the properties described in section Field Configuration above. The mapping configuration of the map-from value allows a wildcard '*' at the end to match any string. (e.g.: from: 210* - to: 2100000; a text like 21089365 will be mapped to 2100000).
The mapping step occurs between the placeholder transformation part and the formatter that converts strings to uppercase, for example. Details on how to configure the mapping is documented in Guide - B2B Storefront Functionality (valid from 7.10.17) | OCI_Punchout_Configuration.
The following fields have a default return value specified by the property <punchout-standard>.ver5.punchout.configuration.<fieldId>.transform in punchoutconfiguration.properties:
Field | Default |
---|---|
NEW_ITEM-PRICE | {Price} |
NEW_ITEM-DESCRIPTION | {ProductName} |
NEW_ITEM-QUANTITY | {Quantity} |
NEW_ITEM-CURRENCY | {Currency} |
NEW_ITEM-LONGTEXT | {Description} |
NEW_ITEM-VENDORMAT | {SupplierSku} |
NEW_ITEM-MANUFACTCODE | {ManufacturerName} |
NEW_ITEM-MANUFACTMAT | {ManufacturerSku} |
NEW_ITEM-EXT_PRODUCT_ID | {Sku} |
The Punchout configuration of a customer is stored in custom attributes. This makes it easy to import and export the configuration (see below).
<?xml version="1.0" encoding="UTF-8"?> <enfinity xmlns="http://www.intershop.com/xml/ns/intershop/customer/impex/7.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dt="http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt" xsi:schemaLocation="http://www.intershop.com/xml/ns/intershop/customer/impex/7.3 b2b_customer.xsd http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt dt.xsd" major="6" minor="1" family="enfinity" branch="enterprise" build="build"> <customer id="OilCorp"> <customer-type>SMB</customer-type> <company-name>Oil Corp</company-name> <description>Oil Corp is one of the world&apos;s leading oil companies.</description> <taxation-id>89548681508155</taxation-id> <enabled>1</enabled> <custom-attributes> <custom-attribute name="oci.ver5.punchout.configuration.NEW_ITEM-UN2IT.formatter" dt:dt="string"></custom-attribute> <custom-attribute name="oci.ver5.punchout.configuration.NEW_ITEM-MATGROUP.transform" dt:dt="string">{ManufacturerName}</custom-attribute> <custom-attribute name="oci.ver5.punchout.configuration.NEW_ITEM-UNIT.formatter" dt:dt="string">uppercase</custom-attribute> <custom-attribute name="oci.ver5.punchout.configuration.NEW_ITEM-MATGROU2P.formatter" dt:dt="string">UpperCase</custom-attribute> <custom-attribute name="oci.ver5.punchout.configuration.NEW_ITEM-UN2IT.transform" dt:dt="string">box</custom-attribute> <custom-attribute name="oci.ver5.punchout.configuration.NEW_ITEM-MATGROUP.formatter" dt:dt="string">uppercase</custom-attribute> <custom-attribute name="oci.ver5.punchout.configuration.NEW_ITEM-UNIT.transform" dt:dt="string">{box}</custom-attribute> <custom-attribute name="oci.ver5.punchout.configuration.NEW_ITEM-MATGROU2P.transform" dt:dt="string">{ManufacturerName}</custom-attribute> </custom-attributes> ... </customer> </enfinity>
Depending on your ICM version, the Punchout REST API is documented, for example, in Reference - Punchout REST API 2.3.0. Refer Overview - Intershop Commerce Management REST API to find the correct REST API reference for your ICM version.
The following use-cases are supported:
Depending on the storefront you are using, PWA or Responsive Starter Store, the Punchout URL and the underlying process of the Punchout functions will be different.
The following sections explain the different integrations that are available and include some sequence diagrams of how they work. The diagrams do not show the entire process, but only include key elements to better illustrate the differences in the overall processes.
To perform a Punchout request in the Responsive Starter Store, a URL with following pattern is used:
https://<ICM-HOST>/INTERSHOP/web/<servergroup>/<site>/<locale>/<application>/<currency>/ViewOCICatalog-Start?USERNAME=<USERNAME>&PASSWORD=<PASSWORD>&HOOK_URL=<HOOK_URL>
When a Punchout request is sent to the ICM for catalog browsing or details, ICM logs in the OCI user and returns a redirect link to the appropriate storefront page. This is either the home page or the product details page, depending on the function. The sequence diagram below illustrates this process for catalog browsing.
If a background search or validate is triggered, ICM will return the functions result in OCI format.
The PWA supports OCI Punchout by providing a route that is called directly from the external procurement system. The URL for this route is (the parameters are the same as in the Responsive Starter Store URL):
https://<PWA-HOST>/punchout?USERNAME=<USERNAME>&PASSWORD=<PASSWORD>&HOOK_URL=<HOOK_URL>
The PWA interacts with the ICM based on the Punchout REST API described in a previous section. The data provided by the ICM is processed by the PWA and sent back to the client according to the OCI standard.
The PWA is a heavyweight JavaScript client that is only required for browsing the storefront catalog and product details.
Up to ICM 7.10.41.2, the background search and validate functions were loading the PWA JavaScripts and returning the results asynchronously when calling the PWA Punchout route from an external system. Instead, a direct response with a search result was expected.
As a result, the PWA Punchout integration in ICM has been updated and is available in ICM versions 7.10.41.3, 11.11.1, and 12.2.0.
The new approach is that all incoming OCI Punchout requests are first routed to ICM, where it is decided whether a direct response is possible (e.g. for background search) or whether the PWA client needs to be opened.
The URL for this new approach is (the parameters remain the same as before):
https://<ICM-HOST>/INTERSHOP/web/<servergroup>/<site>/<locale>/<application>/<currency>/ViewOCICatalogPWA-Start?USERNAME=<USERNAME>&PASSWORD=<PASSWORD>&HOOK_URL=<HOOK_URL>
For catalog browsing and the detail function, the two approaches are mostly identical. The Punchout request sent to the ICM simply returns a redirect to the existing PWA Punchout route.
It uses the configuration value of the "ExternalApplicationBaseURL" configuration of the application to create the redirect URL. In the back office, this is called "External Base URL". Therefore, the new approach is only available by default for applications of type intershop.REST and those that extend it, as other application types do not have this configuration.
The PWA Punchout works by first retrieving the main PWA source and in a second step loading further required JavaScript files. Next, the PWA uses the information provided in the initial request to automatically perform the actions of the given OCI function. This means logging in the OCI user and displaying a storefront page.
The catalog browsing process is shown in the diagrams below:
Old Approach | New Approach |
---|---|
The background search and validate functions performed with the old approach consist largely of the same steps as catalog browsing and the detail function. The difference is that after login, a REST request is sent to the ICM to perform the search or validation, and the result returned by the ICM is used to dynamically build the HTML results page. However, as mentioned above, this approach can lead to a problem as it expects the external system to load the entire PWA application and execute JavaScript to perform the function. If the external system does not meet this expectation, because it expects a direct response with a search result, it will stick with the main source file of the PWA. Since this is an HTML file, as required by the OCI Punchout specification, it appears that the search did not return any results.
The new approach returns a direct result for the requested OCI function without first loading the entire PWA application. The functions background search (FUNCTION=BACKGROUND_SEARCH
) and validate (FUNCTION=VALIDATE
) should therefore no longer be called via the PWA route (https://<PWA-HOST>/punchout
) and are expected to be removed from the PWA in a future version after they were previously deprecated.
The diagrams below show the process for background search:
Old Approach | New Approach |
---|---|
With the current implementation you should be aware of the following limitations: