You are on page 1of 25

3/5/2020

Integrations and Data Management


Generated on: 2020-03-05

SAP Commerce | 1905

PUBLIC

Original content: https://help.sap.com/viewer/50c996852b32456c96d3161a95544cdb/1905/en-US

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the https://help.sap.com/viewer/disclaimer.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 1/25
3/5/2020

Context-Driven Merchandising Module


Context-Driven Merchandising is a part of SAP Commerce Cloud, Context-Driven Services. It provides a range of features related
to displaying Merchandising data on your web site.

Features Architecture Implementation

Merchandising Integration Context-Driven Merchandising Module Merchandising Con guration Setup


Con guration Architecture
Catalog Synchronization
merchandisingservices Extension Con guration

merchandisingaddon Extension Verify SmartEdit Settings

merchandisingsmartedit Extension

Context-Driven Merchandising Module


Features
The Context-Driven Merchandising module provides a range of features related to de ning the integration con guration. For
example, it allows you to de ne the cloud platform services and product catalog synchronization.

Merchandising Integration Con guration


Setting up the Merchandising integration con guration allows you to integrate functionality provided by SAP Commerce with the
cloud platform.

Use Case
A user wants to create a con guration facilitating cooperation between SAP Commerce and the cloud platform to be able to use
Merchandising to the fullest extent.

Features
Catalog Synchronization

De ne catalog synchronization to populate the carousel with the products.

SmartEdit Integration

Use SmartEdit functionality provided by the merchandisingsmartedit extension to display the carousel component on the
storefront.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 2/25
3/5/2020

Dependencies
This feature depends on SmartEdit, Backoffice, and Context-Driven Services cloud platform functionality.

Context-Driven Merchandising Module


Architecture
Context-Driven Merchandising module includes a set of extensions providing the necessary functionality to make Merchandising
data available on your website. It also allows you to de ne Backoffice con guration and use SmartEdit features to make
Merchandising run smoothly.

Dependencies
The diagram presents the extensions of the Context-Driven Merchandising module.

Recipes
The following recipes contain the Context-Driven Merchandising module:

b2c_acc_plus

Extensions
The Context-Driven Merchandising module contains the following extensions:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 3/25
3/5/2020

merchandisingaddon Extension
The merchandisingaddon is a storefront extension. It contains the carousel component and is used to collect the
context in which the carousel is used, for example the current category.
merchandisingservices Extension
The merchandisingservices extension contains the con guration used to synchronize the products from the SAP
Commerce catalog to Merchandising. This con guration is used both for initial synchronization and when the indexes are
rebuilt.
merchandisingservicebackoffice Extension
The merchandisingservicebackoffice extension contains the Backoffice con guration which allows you to
con gure the product synchronization between SAP Commerce and Merchandising.
merchandisingsmartedit Extension
The merchandisingsmartedit extension allows you to use the SmartEdit application to con gure carousel
components and add them to web pages.
merchandisingcmswebservices Extension
The merchandisingcmswebservices extension cooperates with SmartEdit APIs to support the carousel component.
merchandisingstorefrontsampledataaddon Extension
The merchandisingstorefrontsampledataaddon extension is a storefront addon. It contains sample product
and category data (also metadata) in the form of an impex le, to use with sample storefronts such as electronics or
apparel.

merchandisingaddon Extension
The merchandisingaddon is a storefront extension. It contains the carousel component and is used to collect the context in
which the carousel is used, for example the current category.

merchandisingservices Extension
The merchandisingservices extension contains the con guration used to synchronize the products from the SAP
Commerce catalog to Merchandising. This con guration is used both for initial synchronization and when the indexes are rebuilt.

merchandisingservicebackoffice Extension
The merchandisingservicebackoffice extension contains the Backoffice con guration which allows you to con gure the
product synchronization between SAP Commerce and Merchandising.

SAP Commerce gives you a lot of exibility when it comes to storing product details and attribute naming convention.
Merchandising uses a predetermined set of names, so you may be required to map your attribute names to those used by
Merchandising as part of the con guration.

merchandisingsmartedit Extension
The merchandisingsmartedit extension allows you to use the SmartEdit application to con gure carousel components and
add them to web pages.

merchandisingcmswebservices Extension
The merchandisingcmswebservices extension cooperates with SmartEdit APIs to support the carousel component.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 4/25
3/5/2020

merchandisingstorefrontsampledataaddon
Extension
The merchandisingstorefrontsampledataaddon extension is a storefront addon. It contains sample product and
category data (also metadata) in the form of an impex le, to use with sample storefronts such as electronics or apparel.

Context-Driven Merchandising Module


Implementation
Context-Driven Merchandising is a part of SAP Commerce Cloud, Context-Driven Services running on a cloud platform. For the
Merchandising data to display on your website, the functionality provided by Context-Driven Services, the website, and the set of
extensions and addons needs to communicate with the cloud platform.

To ensure successful communication between the platforms, use the Context-Driven Services and the dedicated ImpEx le to set
up the con guration.

Installation of Context-Driven Merchandising with B2C Accelerator


The Context-Driven Merchandising integration can be installed with Commerce B2C Accelerator for a development
environment or for demonstration purposes.
Upgrade Context-Driven Merchandising with B2C Accelerator
Upgrade Merchandising to the latest version to enable localized titles for Merchandising carousels.
Merchandising Con guration Setup
To provide successful communication between the module functionality and the cloud platform, create a client in the
Context-Driven Services.
Catalog Synchronization Con guration
Merchandising requires SAP Commerce con guration to send the current product catalog data and catalog structure to
the Merchandising catalog.
SmartEdit Con guration
To use Merchandising, set up SmartEdit con guration.
Verify SmartEdit Settings
Before you start working with the Merchandising carousel, verify if SmartEdit is set up properly.

Installation of Context-Driven Merchandising


with B2C Accelerator
The Context-Driven Merchandising integration can be installed with Commerce B2C Accelerator for a development environment
or for demonstration purposes.

To install Merchandising Integration with B2C Accelerator, choose one of these methods:

Use the installer. For more details, see Install Merchandising Using the Installer.

Install manually. For more details, see Install Merchandising Manually.

Install Merchandising Using the Installer


https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 5/25
3/5/2020
You can install Merchandising with B2C Accelerator for a development environment or for demonstration purposes using the
b2c_acc_plus recipe.

Prerequisites
It is recommended that you install Context-Driven Services Foundation.

 Note
Merchandising requires Context-Driven Services Foundation to start calculating product metrics based on user behavior.

Procedure
Execute the following commands from the installer subfolder.

./install.sh -r b2c_acc_plus setup


./install.sh -r b2c_acc_plus initialize
./install.sh -r b2c_acc_plus start

For more information, see Installing SAP Commerce Using Installer Recipes.

Install Merchandising Manually


You can manually install the Merchandising integration with B2C Accelerator by adding the required extensions and add-ons to the
localextensions.xml le.

Prerequisites
It is recommended that you install Context-Driven Services Foundation.

 Note
Merchandising requires Context-Driven Services Foundation to start calculating product metrics based on user behavior.

Procedure
1. Add the following extensions to localextensions.xml.

<extension name='merchandisingaddon' />


<extension name='merchandisingcmswebservices' />
<extension name='merchandisingsmartedit' />
<extension name='merchandisingservices' />
<extension name='merchandisingservicesbackoffice' />
<extension name='merchandisingstorefrontsampledataaddon' />
<extension name='profiletagaddon' />

 Note
Install the profiletagaddon extension even if you do not plan to collect data from SAP Commerce. This extension
indicates the architectural dependency of Merchandising on Context-Driven Services Foundation.

2. Install the add-on by executing ant addoninstall.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 6/25
3/5/2020

ant addoninstall -Daddonnames="merchandisingaddon" -DaddonStorefront.yacceleratorstorefront="yac

ant clean all

3. Start the SAP Commerce server and update or initialize the running system.

Install Merchandising without Context-


Driven Services Foundation
You can use B2C Accelerator to manually install the Merchandising integration without Context-Driven Services Foundation.

Prerequisites
Although these instructions explain how to install Merchandising in isolation, it is recommended that you install Context-Driven
Services Foundation as well, to use Merchandising to its fullest extent.

 Note
Merchandising requires Context-Driven Services Foundation to start calculating product metrics based on user behavior.

Procedure
1. Add the following extensions to localextensions.xml.

<extension name='apiregistryservices'/>
<extension name='apiregistrybackoffice'/>
<extension name='profileservices'/>
<extension name='deltadetection'/>
<extension name='merchandisingaddon' />
<extension name='merchandisingcmswebservices' />
<extension name='merchandisingsmartedit' />
<extension name='merchandisingservices' />
<extension name='merchandisingservicesbackoffice' />
<extension name='merchandisingstorefrontsampledataaddon' />
<extension name='profiletagaddon' />

 Note
Install the profiletagaddon extension even if you do not plan to collect data from SAP Commerce. This extension
indicates the architectural dependency of Merchandising on Context-Driven Services Foundation.

2. Install the add-on by executing ant addoninstall.

ant addoninstall -Daddonnames="merchandisingaddon" -DaddonStorefront.yacceleratorstorefront="yac

ant clean all

3. Start the SAP Commerce server and update or initialize the running system.

4. Create an integration client.

For instructions, see Create an Integration Client.

5. In the SAP Commerce Administration Console, go to Console ImpEx Import .

6. Import the following con guration:

$client = <YOUR CLIENT>


$clientsecret = <YOUR CLIENT SECRET>

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 7/25
3/5/2020
$region = <THE REGION OF YOUR TENANT: EU OR US>
$projectid = <YOUR PROJECT ID>
$basesite = <YOUR BASE SITE ID>

$oauthservice = https://$projectid.api.$region.context.cloud.sap/uaa/oauth
$strategyservice = https://$projectid.api.$region.context.cloud.sap/strategy
$catalogservice = https://$projectid.api.$region.context.cloud.sap/catalog

INSERT_UPDATE DestinationTarget;id[unique=true];destinationChannel(code)[default=CDS]
;$projectid;CDS

INSERT_UPDATE ConsumedOAuthCredential;id[unique=true];clientId;clientSecret;oAuthUrl
;$projectid.$client;$projectid.$client;$clientsecret;$oauthservice

INSERT_UPDATE Endpoint;id[unique=true];version[unique=true];specUrl;name
;MerchStrategyServiceClient;v1;"empty";"MerchStrategyServiceClient"
;MerchCatalogServiceClient;v1;"empty";"MerchCatalogServiceClient"

INSERT_UPDATE ConsumedDestination;id[unique=true];url;active;additionalProperties(key,value)[map
;StrategyClient$basesite;$strategyservice;true;baseSite->$basesite|clientClassName->MerchStrateg
;CatalogClient$basesite;$catalogservice;true;baseSite->$basesite|clientClassName->MerchCatalogSe

Include the following values in your ImpEx con guration:

Field Value Remarks

$client Your client with the Commerce Cloud integration client Used for authentication purposes.
role.

clientSecret The client secret created with the scopes for Context- Used for authentication purposes.
Driven Services Foundation.

$region The region in which your tenant was created, either EU or Used for authentication purposes.
US.

$projectid The ID of your tenant. Used for authentication purposes.

$baseSite The ID of your SAP Commerce base site, such as apparel- Used for mapping a tenant to a base site.
uk.

Upgrade Context-Driven Merchandising with


B2C Accelerator
Upgrade Merchandising to the latest version to enable localized titles for Merchandising carousels.

Context

 Note
The following content applies to SAP Commerce patch version 1905.10 and later.

If you have an earlier version of SAP Commerce, take the following steps when upgrading Merchandising to enable localized
titles for Merchandising product carousels.

Procedure
1. Log in to SAP Commerce Administration Console.

2. Run a platform update, making sure to select the merchandisingaddon extension.


https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 8/25
3/5/2020
This updates the SAP Commerce type system to support localized carousels.

3. Log in to SmartEdit.

4. Update the titles of any Merchandising carousel components you are using, adding the localized versions of the titles
where required.

Merchandising Con guration Setup


To provide successful communication between the module functionality and the cloud platform, create a client in the Context-
Driven Services.

Create an Integration Client


Create a client to be able to interact with the services.

Procedure
1. Sign in to the Context-Driven Services.

2. From the left-hand menu, select Clients and Extensions.

3. Click + CLIENT .

The Add new client dialog box appears.

4. Provide the following details:

Client ID: Enter the ID of your client.

 Note
The Client ID must begin with a lowercase letter (a-z) and must be 2-47 characters long. It can contain lowercase
letters (a-z), numbers (0-9), and dashes (except at the end of the name).

Client name: Enter a meaningful name for your client.

Roles: Select a role for your client.

 Note
To provide successful communication between the Merchandising module functionality and the cloud platform,
select the Commerce Cloud integration client role.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 9/25
3/5/2020

5. Click ADD .

A pop-up window with the client details appears. It displays all information you entered in the previous step, and
additionally provides you with the client secret.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 10/25
3/5/2020

 Caution
Save your client secret before closing the pop-up window, or else it will be lost. Client secret retrieval is impossible. If the
system forgets your client secret, you can only generate a new one.

Con gure Merchandising Service Clients


Create and con gure the Merchandising Strategy service client to retrieve strategies, and the Merchandising Catalog service
client to send catalog information.

Prerequisites
Create an integration client.

Con gure Context-Driven Services Foundation. For more details, see Context-Driven Services Foundation Integration.

Procedure
1. In the SAP Commerce Administration Console, go to Console ImpEx Import .

2. Import the following con guration:

$client = <YOUR CLIENT>


$projectid = <YOUR PROJECT ID>
$region = <THE REGION OF YOUR TENANT: EU OR US>
$baseSite = <YOUR BASE SITE ID>

$strategyservice = https://$projectid.api.$region.context.cloud.sap/strategy
$catalogservice = https://$projectid.api.$region.context.cloud.sap/catalog

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 11/25
3/5/2020

INSERT_UPDATE Endpoint;id[unique=true];version[unique=true];specUrl;name
;MerchStrategyServiceClient;v1;"empty";"MerchStrategyServiceClient"
;MerchCatalogServiceClient;v1;"empty";"MerchCatalogServiceClient"

INSERT_UPDATE ConsumedDestination;id[unique=true];url;additionalProperties(key,value)[map-delimi
;StrategyClient$basesite;$strategyservice;baseSite->$basesite|clientClassName->MerchStrategyServ
;CatalogClient$basesite;$catalogservice;baseSite->$basesite|clientClassName->MerchCatalogService

Include the following values in your ImpEx con guration:

Field Value Remarks

$client Your client with the Commerce Cloud integration client Used for authentication purposes.
role.

$projectid The ID of your tenant. Used for authentication purposes.

$region The region in which your tenant was created, either EU or Used for authentication purposes.
US.

$baseSite The ID of your SAP Commerce base site, such as apparel- Used for mapping a tenant to a base site.
uk.

Catalog Synchronization Con guration


Merchandising requires SAP Commerce con guration to send the current product catalog data and catalog structure to the
Merchandising catalog.

To be able to work with Merchandising product data you need to de ne which data should be sent and how it should be mapped.
Additionally, you need to ensure that the catalog structure in SAP Commerce is re ected in Merchandising. You can do it easily
using the Backoffice Administration Cockpit user interface.

 Note
Alternatively, you can use the ImpEx les shipped with the merchandisingstorefrontsampledataaddon. The les
provide the con guration for indexing and category mapping con guration.

Product Catalog Synchronization


Product data used in Merchandising is collected during full and partial Solr indexing. When indexing is completed, the product
data is exported using API calls to the Merchandising Catalog service, creating a copy of the product catalog.

Prerequisites
You have created the Merchandising service clients.

Context
Use Backoffice Administration Cockpit to de ne the main indexing con guration and the mapping of the properties.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 12/25
3/5/2020

Procedure
1. In Backoffice, go to Merchandising Merchandising con guration Merchandising indexing con guration .

A list of con gurations is displayed unless none are available.

2. Click + in the top left corner of the editor to start the wizard for Merchandising indexing con guration.

3. In the Essentials section, defne the basic settings for your con guration.

Field Sample Value Description

Indexed type electronicsProductType Indexed type used for synchronization.

Enabled True If set to true, the product information retrieved during


indexing will be sent to the service.

4. Use the Indexed Property Mapping section to de ne the details of your con guration.

a. Start with de ning the general settings for indexing.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 13/25
3/5/2020

Field Sample Value Description

Language English Products using this language option will be exported.

Currency Pound Products using this currency option will be exported.

Image URL pre x http://www.myinstallationdomain.com The URL directory to retrieve the image paths. If your
image path is
https://www.sap.com/media/images/123.jpg
and images in SAP Commerce have the
/media/images/123.jpg URL, then the pre x
would be https://www.sap.com, or the URL to your
CDN location.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 14/25
3/5/2020

Field Sample Value Description

Product page URL http://www.myinstallationdomain.com The URL directing to the product description pages.
pre x For example, if your domain is
https://www.sap.com and pages in SAP
Commerce have the /products/123 URL then the
pre x would be https://www.sap.com.

Catalog Version Apparel Product Catalog: Online The con gurable catalog version you export the
products for. You must con gure this eld to export the
products from SAP Commerce to Merchandising.

 Note
The data structure within the product catalog
allows you to use several catalog versions in
multiple Merchandising index con gurations, for
example if two sites share the same product
catalog. You can also associate several catalog
versions with one indexing con guration.

b. Add the mapping for indexed properties.

Field Sample Value Description

Merchandising Name id The eld used in Merchandising.

Indexing property code The eld used in SAP


Commerce.

Other examples for mapping are listed below.

Indexing Property Merchandising Name Description

name name Name of the product.

url pageURL URL to the product description page.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 15/25
3/5/2020

Indexing Property Merchandising Name Description

priceValue price Price of the product.

summary summary Summary for the product.

description description Description of the product.

allCategories categories List of categories including the


product.

 Note
It is recommended that you include brands within the category structure of the catalog. If you use a brand as a
facet, the availability of brand affinity and conditions functionality will be restricted.

c. De ne the image mapping.

Field Sample Value Description

Merchandising Name mainImage The eld used in Merchandising.

Indexing property img-65Wx65H The eld used in SAP


Commerce.

5. Click Save to save the settings.

Category Structure Synchronization


Con gure the synchronization of the category structure to provide a near-real-time copy used by Merchandising. The category
structure is synchronized with a cron job de ned in SAP Commerce. The job detects the changes in the category structure and
sends the entire category hierarchy to the catalog service through the API call.

Prerequisites

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 16/25
3/5/2020
You have created the MerchCatalogServiceClient.

Context
Use Backoffice Administration Cockpit to de ne the catalog synchronization.

Procedure
1. In Backoffice, navigate to Merchandising Merchandising con guration Merchandising synchronization con guration .

2. Click + in the top left corner of the editor to start the wizard for Merchandising synchronization con guration.

3. Enter the details of your con guration.

Field Sample Value Description

Base Site Apparel Site UK The base site you want to export the
category structure for.

Catalog Apparel Product Catalog The product catalog you want to get the
category structure for.

Catalog Version Apparel Product Catalog: Online The product catalog version you want to
get the category structure for. Select the
online version of the catalog.

Enabled True If set to True, the con guration is active.

Category URL pre x http://www.sap.com The domain and scheme to apply to


category URLs.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 17/25
3/5/2020

4. Click Save to save the settings.

Product Directory Con guration


Product Directories support multilanguage and variant handling in Context-Driven Services.

 Note
The following content applies only to patch version 1905.8 and later.

If you have an earlier version of SAP Commerce, update the running system using SAP Commerce Administration Console.
This is to ensure that the SAP Commerce type system is updated with the new types supporting the Product Directory
con guration functionality. When performing the update, select merchandisingservices and
merchandisingservicesbackoffice extensions.

If required, reset Backoffice so that the new menu options for Product Directories appear. To perform a reset, log in, press F4 ,
and select Reset Everything.

A Product Directory is a collection of products and categories, synchronized from a speci ed SAP Commerce Solr indexed type
which is associated with one or more languages and the con guration of how to handle variant products.

Prerequisites
Before starting to use Product Directories, con gure your SAP Commerce instance to communicate with Context-Driven Services.

Synchronize Product Directories and Catalog Content


To work properly, Product Directories require synchronization.

Procedure
1. Enable a Product Directory in Backoffice to synchronize it at the moment of saving the Product Directory.

To check if a Product Directory has been synchronized, view it in Backoffice. If the Unique Identi er eld is populated, the
Product Directory exists in Context-Driven Services.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 18/25
3/5/2020
2. Run a Solr index operation to synchronize the product catalog for the Product Directory.

Catalog synchronization works through hooks into the Solr indexing process (to capture products and their corresponding
facets) and through querying theSAP Commerce database to retrieve the categories used by the current catalog version.

Con gure SAP Commerce to Communicate with Context-Driven


Services
Before starting to use Product Directories, con gure your SAP Commerce instance to communicate with Context-Driven Services.

Procedure
Use the sample ImpEx to con gure API Registry for SAP Commerce.

$client = <YOUR_CLIENT_NAME>
$clientid = <YOUR_CLIENT_ID>
$clientsecret = <YOUR_CLIENT_SECRET>
$region = <THE_REGION_YOU_ARE_PROVISIONED_IN>
$projectid = <YOUR_TENANT_ID>
$profiletagconfigurl = <YOUR_PROFILE_TAG_CONFIG_URL>
$basesiteid = <YOUR_BASESITE_ID>
$profiletagurl = <YOUR_PROFILETAG_URL>
$edgeservice = https://$projectid.api.$region.context.cloud.sap/edge
$oauthservice = https://$projectid.api.$region.context.cloud.sap/uaa/oauth
$consentservice = https://$projectid.api.$region.context.cloud.sap/consent
$identityservice = https://$projectid.api.$region.context.cloud.sap/identity
$profileservice = https://$projectid.api.$region.context.cloud.sap/profile
$strategyservice = https://$projectid.api.$region.context.cloud.sap/strategy
$catalogservice = https://$projectid.api.$region.context.cloud.sap/catalog

INSERT_UPDATE DestinationTarget;id[unique=true];destinationChannel(code)[default=CDS]
;$projectid;CDS
INSERT_UPDATE ConsumedOAuthCredential;id[unique=true];clientId;clientSecret;oAuthUrl
;$projectid.$client;$clientid;$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"
;CxIdentityServiceClient;v1;"empty";"Identity Service v1"
;CxProfileServiceClient;v1;"empty";"Profile Service v1"

INSERT_UPDATE ConsumedDestination;id[unique=true];url;additionalProperties(key,value)[map-delimiter=|]
;ProfileClient$basesite;$edgeservice;baseSite->$basesite|clientClassName->ProfileClient;ProfileClient;
;ConsentServiceClient$basesite;$consentservice;baseSite->$basesite|oauth.scope->cds.roles.customerec|c
;ProfileTagUrl$basesite;$profiletagurl;baseSite->$basesite|clientClassName->ProfileTagUrl;ProfileTagUr
;ProfileTagConfigUrl$basesite;$profiletagconfigurl;baseSite->$basesite|clientClassName->ProfileTagConf
;CxIdentityServiceClient$basesite;$identityservice;oauth.scope->cds.roles.customerec|baseSite->$basesi
;CxProfileServiceClient$basesite;$profileservice;oauth.scope->cds.roles.customerec|baseSite->$basesite

$strategyservice = https://$projectid.api.$region.context.cloud.sap/strategy
$catalogservice = https://$projectid.api.$region.context.cloud.sap/catalog

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 19/25
3/5/2020

INSERT_UPDATE Endpoint;id[unique=true];version[unique=true];specUrl;name
;MerchStrategyServiceClient;v1;"empty";"MerchStrategyServiceClient"
;MerchCatalogServiceClient;v1;"empty";"MerchCatalogServiceClient"
;MerchCatalogServiceProductDirectoryClient;v1;"empty";"MerchCatalogServiceProductDirectoryClient"

INSERT_UPDATE ConsumedDestination;id[unique=true];url;additionalProperties(key,value)[map-delimiter=|]
;StrategyClient$basesite;$strategyservice;baseSite->$basesite|clientClassName->MerchStrategyServiceCli
;CatalogClient$basesite;$catalogservice;baseSite->$basesite|clientClassName->MerchCatalogServiceClient
;CatalogProductDirectoryClient$basesite;$catalogservice;baseSite->$basesite|clientClassName->MerchCata

Con guration of Product Directories


To use Product Directories, perform the required con guration steps.

Depending on your preference, con gure Product Directories in one of the following ways:

Through Backoffice

With ImpEx

Set up Con guration through Backoffice


Con gure Product Directories using Backoffice.

Procedure
1. In Backoffice, go to Merchandising Merchandising con guration Merchandising Product Directory .

2. Click New to create a new Product Directory.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 20/25
3/5/2020

3. Select your indexed type.

This is the indexed type used by Solr.

 Note
Each indexed type can be associated with one Product Category only. If you attempt to create a Product Directory for an
indexed type which is already used by an existing Product Directory, an error will appear.

4. Con gure various attributes of your Product Directory.

Attribute Con guration


Set up the following attributes to complete Product Directory con guration.

Variant Rollup

This attribute allows you to con gure variant product handling in Context-Driven Services. Select one of these available options:

No Rollup: Variants are treated as individual products.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 21/25
3/5/2020
Rollup to Base Product: Variants are grouped depending on the value of the selected variant rollup eld.

Variant Rollup Field

This attribute allows you to choose from the list of indexed properties associated with the SolrIndexedProperty.name and
its SolrPropertiesTypes, which are used for variant rollup.

Default Language

This attribute allows you to con gure what language the metadata is served in if the requested language is not supported.

 Note
The set of languages used for a Product Directory is inherited from the associated indexed type.

Currency

This attribute allows you to con gure the currency in which products are synchronized.

Image URL Pre x

This attribute allows you to con gure the domain from which the images are served. For example, if an image is available on
https://www.example.com, this is the value of the pre x.

 Note
You can leave this eld empty if you are using fully quali ed URLs for images.

Catalog URL Pre x

This attribute allows you to con gure the domain used for links to products and categories.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 22/25
3/5/2020

 Note
You can leave this eld empty if you are using fully quali ed URLs for product and category page links.

Sites

This attribute allows you to con gure which BaseSites are associated with a given Product Directory.

Name

This attribute allows you to provide a descriptive name for the Product Directory.

Catalog Version(s) to Use

This attribute allows you to con gure which catalog versions are used to export categories for the Product Directory.

Merchandising Properties

Use Merchandising Properties to con gure the mapping between the data model used in SAP Commerce and the data model used
in Context-Driven Services. The following table shows a sample mapping which works against the Apparel data:

SAP Commerce Field Context-Driven Services

code id

name name

url pageUrl

baseProductCode baseProductCode

priceValue price

summary summary

description description

allCategories categories

img-65Wx65H thumbnailImage

img515Wx515H mainImage

 Note
You can edit your Product Directories in Backoffice.

Set up Con guration with ImpEx


Con gure Product Directories with ImpEx.

Procedure
To con gure your Product Directory, use the following sample ImpEx.

$solrIndexedType=apparel-ukProductType
$merchCatalogVersions=merchCatalogVersions(catalog(id),version);
$productCatalog=apparelProductCatalog

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 23/25
3/5/2020
$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Online'])[default
INSERT_UPDATE MerchProductDirectoryConfig;indexedType(identifier)[unique=true];rollUpStrategy;rollUpSt
;$solrIndexedType ;No Rollup ;code_str

INSERT_UPDATE MerchProperty;merchProductDirectoryConfig(indexedType(identifier))[unique=true];indexedP
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType
;$solrIndexedType ;$solrIndexedType

SmartEdit Con guration


To use Merchandising, set up SmartEdit con guration.

Con gure SmartEdit to Launch Merchandising Strategy Builder


To allow SmartEdit to launch Merchandising Strategy Builder, specify the link to Strategy Builder in SmartEdit con guration
settings.

Prerequisites
To con gure SmartEdit to launch Strategy Builder, you need the Strategy Builder URL. This tenant-speci c and location-based
URL is provided as part of the tenant provisioning process, and looks as follows:

{TENANT}.{REGION}.context.cloud.sap/lounge#/cds/merchandising-strategies/strategies

For example, if your tenant is mytenant and you are provisioned in the EU, this is your Strategy Builder URL:

mytenant.eu.context.cloud.sap/lounge#/cds/merchandising-strategies/strategies

Procedure
1. Open the Con guration Editor in SmartEdit.

For details, see Con guration Editor.

2. In the Value box under the contextDrivenServicesMerchandisingUrl key, provide your Strategy Builder URL.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 24/25
3/5/2020
To verify the con guration, enter the edit mode from SmartEdit and click Edit Strategy. If the con guration is correct,
Strategy Builder opens.

Verify SmartEdit Settings


Before you start working with the Merchandising carousel, verify if SmartEdit is set up properly.

Procedure
1. Navigate to SmartEdit.

2. In the top-right corner of the page, select the Advanced Edit mode.

3. Click + Add Component .

4. Check if the SAP Context-Driven Merchandising component is present on the list.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 25/25

You might also like