Setting up SAP Commerce Cloud

The configurations performed on the SAP Commerce Cloud side can be done using ImpEx.

Importing the Configuration with ImpEx

Context

The following procedure uses the example values shown in the prerequisites.

Procedure

  1. In the SAP Commerce Cloud Administration Console, go to Start of the navigation pathConsole Next navigation step ImpEx ImportEnd of the navigation path.
  2. Adapt the following ImpEx to your specific settings and import it:
    $client = <the ID of your SAP Commerce client which you created in ISS lounge. Use your clientId without the tenant ID>
    $clientsecret = <the secret you got for this client in ISS lounge>
    $region = <the region in which this tenant is created, e.g. us or eu>
    $tenantid = <the tenant ID, e.g. htv730339940>
    $site = <the ISS site ID, e.g. siteOne>
    $profiletagconfigurl = <the URL of your Profile Tag configuration JSON, e.g. https://tag.static.us.context.cloud.sap/config/htv730339940-siteOne-default>
    $basesite = <the site within your SAP Commerce instance, which shall be configured for ISS, e.g. "electronics">
    
    # No changes necessary below this point
    $profiletagurl   = https://tag.static.$region.context.cloud.sap/js/profile-tag.min.js
    $edgeservice     = https://$tenantid-$site.api.$region.context.cloud.sap/edge
    $oauthservice    = https://$tenantid-$site.api.$region.context.cloud.sap/uaa/oauth
    $consentservice  = https://$tenantid-$site.api.$region.context.cloud.sap/consent
    
    INSERT_UPDATE DestinationTarget;id[unique=true];destinationChannel(code)[default=CDS]
    ;$tenantid;CDS
    INSERT_UPDATE ConsumedOAuthCredential;id[unique=true];clientId;clientSecret;oAuthUrl
    ;$tenantid.$client;$tenantid.$client;$clientsecret;$oauthservice
    
    INSERT_UPDATE Endpoint;id[unique=true];version[unique=true];specUrl;name
    ;ProfileClient;v1;"empty";"Profile Client v1"
    ;ConsentServiceClient;v1;"empty";"Consent Service Client v1"
    ;ProfileTagUrl;v1;"empty";"Profile Tag Url v1"
    ;ProfileTagConfigUrl;v1;"empty";"Profile Tag Config Url v1"
    
    INSERT_UPDATE ConsumedDestination;id[unique=true];url;additionalProperties(key,value)[map-delimiter=|];endpoint(id);destinationTarget(id)[default=$tenantid];credential(id)
    ;ProfileClient$basesite;$edgeservice;baseSite->$basesite|clientClassName->ProfileClient;ProfileClient;$tenantid;$tenantid.$client
    ;ConsentServiceClient$basesite;$consentservice;baseSite->$basesite|oauth.scope->cds.roles.customerec|clientClassName->ConsentServiceClient;ConsentServiceClient;$tenantid;$tenantid.$client
    ;ProfileTagUrl$basesite;$profiletagurl;baseSite->$basesite|clientClassName->ProfileTagUrl;ProfileTagUrl;$tenantid;$tenantid.$client
    ;ProfileTagConfigUrl$basesite;$profiletagconfigurl;baseSite->$basesite|clientClassName->ProfileTagConfigUrl;ProfileTagConfigUrl;$tenantid;$tenantid.$client
    
  3. Include the following values in your ImpEx configuration:
    Field Value Remarks
    $client Your client with the Commerce Cloud integration client role. Used for authentication purposes.
    $clientsecret The client secret created with the scopes for Intelligent Selling Services Foundation. Used for authentication purposes.
    $region The region of your tenant. Used for authentication purposes.
    $tenantid The ID of your tenant, usually starting with htp or htv. Used for authentication purposes.
    $profiletagconfigurl The URL of your Profile Tag configuration JSON. Used for enabling the Profile Tag feature.
    $basesite The ID of your SAP Commerce Cloud base site, such as apparel-uk. Used for mapping a tenant to a base site.
  4. Configure the browser events by adding the tracking script to your storefront page templates. See Profile Tag.

    For more information, see SAP Commerce Cloud Configuration page.

Configuring the Back End for SAP Commerce Cloud

The following steps describe how to add custom headers to your CORS settings.

Procedure

Add the x-profile-tag-debug and x-consent-reference custom headers to corsfilter.commercewebservices.allowedHeaders.

If you are using Assisted Service Module, add these custom headers to corsfilter.assistedservicewebservices.allowedHeaders as well.