Professional Documents
Culture Documents
PUBLIC
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.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 1/25
3/5/2020
merchandisingsmartedit Extension
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
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.
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.
To ensure successful communication between the platforms, use the Context-Driven Services and the dedicated ImpEx le to set
up the con guration.
To install Merchandising Integration with B2C Accelerator, choose one of these methods:
Use the installer. For more details, see Install Merchandising Using the Installer.
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.
For more information, see Installing SAP Commerce Using Installer Recipes.
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.
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.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e045606… 6/25
3/5/2020
3. Start the SAP Commerce server and update or initialize the running system.
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.
3. Start the SAP Commerce server and update or initialize the running system.
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
$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.
$baseSite The ID of your SAP Commerce base site, such as apparel- Used for mapping a tenant to a base site.
uk.
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.
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.
Procedure
1. Sign in to the Context-Driven Services.
3. Click + 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).
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.
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 .
$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
$client Your client with the Commerce Cloud integration client Used for authentication purposes.
role.
$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.
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.
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 .
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.
4. Use the Indexed Property Mapping section to de ne the details of your con guration.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 13/25
3/5/2020
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
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.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 15/25
3/5/2020
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.
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.
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.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 17/25
3/5/2020
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.
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.
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
Depending on your preference, con gure Product Directories in one of the following ways:
Through Backoffice
With ImpEx
Procedure
1. In Backoffice, go to Merchandising Merchandising con guration Merchandising Product Directory .
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 20/25
3/5/2020
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.
Variant Rollup
This attribute allows you to con gure variant product handling in Context-Driven Services. Select one of these available options:
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.
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.
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.
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.
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:
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.
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
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.
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.
Procedure
1. Navigate to SmartEdit.
2. In the top-right corner of the page, select the Advanced Edit mode.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=3bf7fa520667450499d3e04560… 25/25