SAP Commerce Cloud
The SAP Commerce Cloud integration brings product data from SAP Commerce Cloud into Uniform. Authors pick products or build product queries in data resources, and Uniform fetches the products when it resolves the composition or entry.
Pick the data source type that matches your SAP product:
| Data source type | SAP product | API |
|---|---|---|
| SAP Commerce Cloud (OCC v2) | SAP Commerce Cloud | OCC v2 (/occ/v2) with anonymous access or OAuth2 client credentials |
| SAP Commerce Cloud, Cloud ERP Edition | SAP Commerce Cloud, Cloud ERP Edition | Storefront Product API (/api/storefront/product/v1), anonymous |
Both types have the same archetypes and editors.
Prerequisites
You must have access to a Uniform team with the ability to create new projects. If you are an active customer or a partner, please get in touch with your Uniform team administrator colleague and ask for an invite.
If you are not sure or your company does not have a Uniform team, you can request a sandbox here.
What it supports#
- Select one product, or a list of products in the order you choose.
- Get a product by its ID from a route parameter, for product detail pages.
- Query products by keyword and SAP facets, such as category and price. Set a sort order and the maximum number of results.
- Bind the keyword, facet values, sort, maximum results, and product ID to dynamic inputs.
- Set the locale for each data resource, for example from the page's locale.
Before you start#
- OCC v2: the URL of your SAP Commerce Cloud instance and the base site ID of your storefront. A base site that requires authentication also needs an OAuth2 client with the client credentials grant.
- Cloud ERP Edition: the URL of your storefront and its sales channel ID.
- The SAP API must be reachable from the internet over HTTPS. For OCC v2, the integration calls SAP from a Uniform-hosted service.
Install the integration#
- In Uniform, open your project.
- Go to Settings > Integrations.
- Under Browse integrations, select SAP Commerce Cloud.
- Select Add to project.
Add a data source#
A data source stores the connection settings for one SAP storefront.
Go to Experience > Data types.
Select Add data type.
Open the Data Source list.
Under SAP Commerce Cloud (OCC v2) or SAP Commerce Cloud, Cloud ERP Edition, select Create new.
Each SAP product has its own data source type.Fill in the settings. See Data source settings.
Select Test connection. If the connection works, a message shows how many products the catalog returned.
Enter a Name and a Public ID. You can't change the public ID later.
Select Save.
Data source settings#
| Setting | Description |
|---|---|
| API Endpoint | The base URL of the SAP Commerce Cloud instance, without /occ/v2. For example: https://api.yourinstance.commerce.ondemand.com |
| Base Site ID | The base site ID from the OCC API paths (/occ/v2/{baseSiteId}/...), for example electronics-spa. |
| Media Base URL | The base URL for product images. Relative image paths from SAP, such as /medias/..., are resolved against it. |
| Mode (under Authentication) | None (anonymous) or OAuth2 client credentials. Select None (anonymous) only if your base site allows anonymous requests. |
| Client ID | The ID of the OAuth2 client. Required for OAuth2. |
| Client Secret | The secret of the OAuth2 client. Uniform stores it encrypted. Leave it empty if your client has no secret. |
| Token URL (optional override) | The OAuth2 token endpoint. If you leave it empty, the integration uses {API Endpoint}/authorizationserver/oauth/token. |
| Locale | The language sent to SAP. Data resources use it unless they set their own locale. Default: en. |
| Currency | The currency sent to SAP. Default: USD. |
| Integration public URL (under Proxy) | The URL of the Uniform-hosted service that calls OCC v2 for this data source. Uniform fills it in. |
| Setting | Description |
|---|---|
| API Endpoint | The base URL of the storefront, without /api/storefront. For example: https://yourtenant.storefront.eu1.saas.commerce.cloud.sap |
| Sales Channel ID | The sales channel ID from the Storefront Product API paths (/api/storefront/product/v1/{salesChannelId}/...). |
| Media Base URL | The base URL for product images. Relative image paths from SAP are resolved against it. |
| Locale | The language sent to SAP. Data resources use it unless they set their own locale. Default: en. |
| Currency | The currency sent to SAP. Default: USD. |
Add data types#
- On the Data types page, select Add data type.
- In Data Source, select your SAP data source.
- In Archetype, select an archetype. See Archetypes.
- To let authors set a locale on each data resource, turn on Allow filtering by locale.
- Enter a Name and a Public ID.
- Select Save.
When Allow filtering by locale is on, the data resource editor shows a Locale field. By default, it's bound to the locale dynamic input, so SAP gets the page's locale. If the SAP locale codes differ from your Uniform locales, set up locale mapping on the data source. To use the data source's Locale instead, remove the binding and leave the field empty.
Archetypes#
| Archetype | What authors do | Result |
|---|---|---|
| Single Product | Search the catalog by keyword and facets and select one product. | The product object. If SAP no longer has the product, the data resource returns an error. |
| Multiple Products | Select products and drag them into order. | An array of products, in the order the author set. Products that SAP no longer has are left out. |
| Product by ID | Get one product by its ID, usually from a route parameter. | An array with the matching product, or an empty array if no product matches. |
| Product Query | Build a query from a keyword, facet conditions, Sort by, and Max results, with a preview of the matching products. | The search result: results, facets, sort, and pagination. |
Add products to compositions and entries#
Add a data resource of one of your SAP data types to a composition, a pattern, or an entry. Then connect its fields to component parameters or entry fields. The general steps are in Data resources.
Select products#
In a Single Product or Multiple Products data resource:
- Enter a keyword in the search box.
- To filter by facets such as category, select Filter/Sort and add conditions.
- In Matching products, select a product.
- In Multiple Products, drag the selected products to change their order.

Get a product from the route#
In a Product by ID data resource:
- Bind Product ID to a dynamic input from the route, for example
productId. - Under Current preview resolves to, check the product for the current preview value.
- To try another ID, enter it in Check the binding. Uniform doesn't save this value.

Query products#
In a Product Query data resource:
- Enter a keyword, or leave it empty to query the whole catalog.
- Select Filter/Sort.
- Under Show results, set a condition: a facet, an operator, and a value. The facets are the ones SAP returns for your catalog, such as categories and price.
- To filter by more facets, select add condition.
- Select Sort by.
- Enter Max results, up to 100. The default is 12.
Match and All next to the search box set which facets the conditions offer. Match offers only the facets of the products the query matches, and All offers every facet in the catalog. Matching products shows a preview of the result.

You can bind the keyword, each condition value, Sort by, and Max results to dynamic inputs. A bound condition value must hold SAP's facet value, not the name shown in the list. For example, a category condition needs the SAP category code. If a bound value resolves to an empty value, Uniform leaves that condition out of the query.
Limits#
- Multiple Products holds up to 100 products, and Product Query returns up to 100 products.
- Cloud ERP Edition data sources support anonymous access only.