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 typeSAP productAPI
SAP Commerce Cloud (OCC v2)SAP Commerce CloudOCC v2 (/occ/v2) with anonymous access or OAuth2 client credentials
SAP Commerce Cloud, Cloud ERP EditionSAP Commerce Cloud, Cloud ERP EditionStorefront 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.

  • 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.
  • 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.
  1. In Uniform, open your project.
  2. Go to Settings > Integrations.
  3. Under Browse integrations, select SAP Commerce Cloud.
  4. Select Add to project.

A data source stores the connection settings for one SAP storefront.

  1. Go to Experience > Data types.

  2. Select Add data type.

  3. Open the Data Source list.

  4. Under SAP Commerce Cloud (OCC v2) or SAP Commerce Cloud, Cloud ERP Edition, select Create new.

    The Data Source list in Create data type, with a Create new option under each data source type, including both SAP Commerce Cloud types
    Each SAP product has its own data source type.
  5. Fill in the settings. See Data source settings.

  6. Select Test connection. If the connection works, a message shows how many products the catalog returned.

  7. Enter a Name and a Public ID. You can't change the public ID later.

  8. Select Save.

SettingDescription
API EndpointThe base URL of the SAP Commerce Cloud instance, without /occ/v2. For example: https://api.yourinstance.commerce.ondemand.com
Base Site IDThe base site ID from the OCC API paths (/occ/v2/{baseSiteId}/...), for example electronics-spa.
Media Base URLThe 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 IDThe ID of the OAuth2 client. Required for OAuth2.
Client SecretThe 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.
LocaleThe language sent to SAP. Data resources use it unless they set their own locale. Default: en.
CurrencyThe 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.
SettingDescription
API EndpointThe base URL of the storefront, without /api/storefront. For example: https://yourtenant.storefront.eu1.saas.commerce.cloud.sap
Sales Channel IDThe sales channel ID from the Storefront Product API paths (/api/storefront/product/v1/{salesChannelId}/...).
Media Base URLThe base URL for product images. Relative image paths from SAP are resolved against it.
LocaleThe language sent to SAP. Data resources use it unless they set their own locale. Default: en.
CurrencyThe currency sent to SAP. Default: USD.
  1. On the Data types page, select Add data type.
  2. In Data Source, select your SAP data source.
  3. In Archetype, select an archetype. See Archetypes.
  4. To let authors set a locale on each data resource, turn on Allow filtering by locale.
  5. Enter a Name and a Public ID.
  6. 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.

ArchetypeWhat authors doResult
Single ProductSearch 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 ProductsSelect 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 IDGet 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 QueryBuild 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 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.

In a Single Product or Multiple Products data resource:

  1. Enter a keyword in the search box.
  2. To filter by facets such as category, select Filter/Sort and add conditions.
  3. In Matching products, select a product.
  4. In Multiple Products, drag the selected products to change their order.
A Multiple Products data resource with matching products and three selected products in drag-and-drop order
Selected products keep the order you drag them into.

In a Product by ID data resource:

  1. Bind Product ID to a dynamic input from the route, for example productId.
  2. Under Current preview resolves to, check the product for the current preview value.
  3. To try another ID, enter it in Check the binding. Uniform doesn't save this value.
A Product by ID data resource with Product ID bound to a dynamic input, the Check the binding field, and the product the current preview resolves to
The editor shows the product for the current preview value.

In a Product Query data resource:

  1. Enter a keyword, or leave it empty to query the whole catalog.
  2. Select Filter/Sort.
  3. 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.
  4. To filter by more facets, select add condition.
  5. Select Sort by.
  6. 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.

A Product Query data resource with the keyword camera, a category condition, Sort by, Max results, and the matching products
The preview shows the products the query returns.

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.

  • Multiple Products holds up to 100 products, and Product Query returns up to 100 products.
  • Cloud ERP Edition data sources support anonymous access only.