close

Filter

loading table of contents...

Connector for SAP Commerce Cloud Manual / Version 2307

Table Of Contents

4.4 Configuring Custom Entity Parameters

Custom entity parameters can be used to transport additional information from the client to the commerce adapter.

Let's say you want to transmit the environment type (Dev, UAT, Prod) of your client with every request. This way you want to resolve certain host names on the adapter side for different environments. Out of the box there is no dedicated field "environment" available in the EntityParams, which are sent along with every request from the client to the commerce system. The custom entity parameters enable you to provide this information to the adapter side without API changes. You can do this by simple configuration.

Example:

This example shows a configuration for an environment entity parameter:

Adapter Configuration

Configure on the adapter side metadata.custom-entity-param-names=environment to tell the connected clients, to send the custom parameter named "environment" alongside with every client request.

Client Configuration

Configure a global variable on the client side, using the property commerce.hub.data.customEntityParams. Simply add the name of the variable to the property name:

commerce.hub.data.customEntityParams.environment=UAT

You can also configure custom entity params in Studio via commerce settings. This way, it is possible to transmit site specific environment parameters to the commerce adapter.

commerce (Struct)
  customEntityParams (Struct)
    environment=UAT (String)
  
Note

Note

If the same parameter is defined via property and via Studio commerce settings, the site specific commerce settings configuration has precedence over the global property based configuration.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.