close

Filter

Connector for Salesforce Commerce Cloud Manual / Version 2406.0

Table Of Contents

9. Commerce Adapter Properties

cache.capacities
Type Map<String,Long>
Description

Number of cache entries per cache class until cache eviction takes place. The keys must match the cache classes as defined by the cache keys. Please refer to javadoc of com.coremedia.cache.CacheKey.

cache.timeout-seconds
Type Map<String,Long>
Description

TTL in seconds until certain cache entries are invalidated.

entities.circuit-breaker-names
Type Map<String,String>
Description

Mapping of data lookup keys (cache classes) to circuit breaker names. Mapping to 'none' disables circuit breakers for the mapped data lookup keys.

Example: Mapping 'product' to 'products' will use a separate circuit breaker named 'products' for product calls. The new circuit breaker can have its own configuration via 'resilience4j.circuitbreaker.configs.products'. Mapping 'product' to 'none' will disable the circuit breaker for product requests.

entities.default-circuit-breaker-name
Type String
Default base
Description

The default breaker name.

entities.disable-circuit-breakers
Type Boolean
Default false
Description

Disable circuit breakers and cache failed calls in cache class failed.

entities.exponential-backoff.factor
Type Double
Default 1.5
Description

The factor to be applied to the delay to compute the next delay.

entities.exponential-backoff.initial-delay
Type Duration
Default 2s
Description

The initial delay of the backoff.

entities.message-store.files
Type Map<String,Long>
Description

The number of request/response pairs to cache persistently. The keys must be valid cache classes as configured for the data lookup service, e.g., catalog, catalogs, category, categories, etc.

entities.message-store.root
Type org.​springframework.​core.​io.​Resource
Description

Root resource to persistently store messages. If this property is not set, no messages will be persisted. Configure a value to enable persistent caching of messages.

entities.products.register-parent-dependency
Type Boolean
Default true
Description

Controls if a parent dependency is registered for a non-base product so that it is invalidated together with its base product.

entities.recompute-on-invalidation
Type Boolean
Default false
Description

Whether to recompute entities proactively on invalidation.

entities.send-invalidations
Type Boolean
Default true
Description

Whether or not to propagate invalidations of entities to the clients.

metadata.additional-metadata
Type Map<String,String>
Description

Map of additional metadata.

Can be used as customization hook. All properties starting with "metadata.additional-metadata.*" are transmitted to the generic client on the CMS side.

metadata.custom-attributes-format
Type com.​coremedia.​commerce.​adapter.​base.​entities.​CustomAttributesFormat
Description

Format of the custom attribute values.

The keys are always plain strings.

Used to identify the deserialization format on the CMS side.

metadata.custom-entity-param-names
Type Collection<String>
Description

List of parameter names, which values need to be transmitted with every entity request from the CMS side.

metadata.replacement-tokens
Type Map<String,String>
Description

Map of key value pairs.

Used as replacement map for example for link building in the generic client on the CMS side.

metadata.vendor
Type String
Description

Name of the vendor.

Used to identify the connected vendor on the CMS side.

sfcc.default-locale
Type Locale
Description

The default locale for accessing the commerce system if no locale parameter was passed into request.

sfcc.image-view-type-large
Type String
Default large
Description

Configure the view type name of image groups used for large product images.

sfcc.image-view-type-small
Type String
Default medium
Description

Configure the view type name of image groups used for small product images.

sfcc.link.link-templates
Type Map<String,String>
Description

Map of link templates. Only lookup keys lowercase and without "_" are valid.

Known default lookup keys are defined in StorefrontRefKeysCommerceLed.

These patterns can include tokens which will be replaced. These tokens must be well known. The following tokens are predefined:

  • {storefrontUrl} ... the current store front URL

  • {storeId} ... the current store id

  • {locale} ... the current locale in java format, eg. en_US

  • {language} ... the current language in java format, eg. en

  • {catalogId} ... the current catalog id

  • {categoryId} ... the current category id

  • {productId} ... the current product id

  • {seoSegment} ... the current seo segment path (can contain path delimiters)

  • {storefrontUrl} ... the current store front URL

  • {customerGroup} ... the current user group, if available

  • {previewDate} ... the preview date, if available

sfcc.link.link-templates.categorylinkfragment
Type String
Default <!--VTL $include.url('Search-Show','cgid','{categoryId}') VTL-->
Description

Used to generate category page links into CoreMedia fragments.

sfcc.link.link-templates.categorypreviewurl
Type String
Default {storefrontUrl}/Sites-{storeId}-Site/{locale}/CM-RedirectUrl?link=Search-Show,cgid,{categoryId},preview,true&__siteDate={previewDate}&__customerGroup={customerGroup}
Description

Used to build the preview URL to a category page.

sfcc.link.link-templates.cmajaxlinkfragment
Type String
Default <!--VTL $include.url('CM-Dynamic','url','{url}') VTL-->
Description

Used to generate ajax urls to CoreMedia contents into CoreMedia fragments.

sfcc.link.link-templates.cmcontentlinkfragment
Type String
Default <!--VTL $include.url('CM-Content','contentId','{seoPath}') VTL-->
Description

Used to build links to shop pages displaying CoreMedia Articles and Channels into CoreMedia fragments.

sfcc.link.link-templates.cmcontentpreviewurl
Type String
Default {storefrontUrl}/Sites-{storeId}-Site/{locale}/CM-RedirectUrl?link=CM-Content,contentId,{seoSegment},preview,true&__siteDate={previewDate}&__customerGroup={customerGroup}
Description

Used to build the preview URL to a shop page which displays a CoreMedia content.

sfcc.link.link-templates.externalpagepreviewurl
Type String
Default {storefrontUrl}/Sites-{storeId}-Site/{locale}/CM-RedirectUrl?link=Page-Show,cid,{pageId},preview,true&__siteDate={previewDate}&__customerGroup={customerGroup}
Description

Used to build the preview URL to a shop page.

sfcc.link.link-templates.homepagelinkfragment
Type String
Default <!--VTL $include.url('Home-Show') VTL-->
Description

Used to the link to the home page.

sfcc.link.link-templates.homepagepreviewurl
Type String
Default {storefrontUrl}/Sites-{storeId}-Site/{locale}/CM-RedirectUrl?link=Home-Show,preview,true&__siteDate={previewDate}&__customerGroup={customerGroup}
Description

Used to build the preview URL to the shop home page.

sfcc.link.link-templates.productlinkfragment
Type String
Default <!--VTL $include.url('Product-Show','pid','{productId}') VTL-->
Description

Used to build product detail page links into CoreMedia fragments.

sfcc.link.link-templates.productpreviewurl
Type String
Default {storefrontUrl}/Sites-{storeId}-Site/{locale}/CM-RedirectUrl?link=Product-Show,pid,{productId},preview,true&__siteDate={previewDate}&__customerGroup={customerGroup}
Description

Used to build the preview URL to a product detail page.

sfcc.link.link-templates.shoppagelinkfragment
Type String
Default <!--VTL $include.url('Page-Show','cid','{seoPath}') VTL-->
Description

Used to build URLs to shop pages into CoreMedia fragments.

sfcc.link.storefront-url
Type String
Description

Base URL of the commerce storefront

sfcc.link.storefront-url-for
Type Map<String,String>
Description

Storefront URLs, which are used to build storefront links to shop pages and resources for different environments. The structure of the Map should be: key=environment, value=url.

The multi environment support needs to be activated via `metadata.custom-entity-param-names=environment`.

Examples:

sfcc.link.storefront-url-for.us=https://sandbox-us.demandware.net/on/demandware.store/
sfcc.link.storefront-url-for.de=https://sandbox-de.demandware.net/on/demandware.store/

The environment name for the custom entity param must be configured on the client side (CAE, Studio, etc.) global configuration example: `commerce.hub.data.customEntityParams.environment=us`

You may also configure multiple storefront URLs for different sites/environments via the commerce settings struct:

 commerce (Struct) customEntityParams (Struct) environment=siteus (String) 

Keep the lookup keys simple. Use lowercase with no special characters

Be aware you need to configure the environment values on the client site first, otherwise lookups can't work and will fail. There is no default fallback, as this could lead to even more confusion.

sfcc.oauth.client-id
Type String
Description

ClientID used for all Data and Shop REST API Calls to the Salesforce Commerce System. Used to set permissions for the ClientID on Shop and Data API - for example, which resources the ClientID is allowed to access

sfcc.oauth.client-password
Type String
Description

Password used together with the clientId.

sfcc.oauth.host
Type String
Default account.demandware.com
Description

Host name of central SFCC endpoint for authentication.

No need to customize.

sfcc.oauth.path
Type String
Default /dw/oauth2/access_token
Description

Path to retrieve access token.

sfcc.oauth.protocol
Type String
Default https
Description

Protocol used to request access token.

sfcc.oauth.retry-delay
Type Duration
Default 5s
Description

The time after which a retry is attempted to fetch an ocapi access token. Until then, all requests that require an access token will end with an IllegalStateException in log.

sfcc.ocapi.custom-attributes-for
Type Map<String,List<String>>
Description

Configure attribute names, which are transmitted to the client as customAttributes. The key is the name of the OCAPI Document in lowercase and removed "_" (com.coremedia.commerce.adapter.sfcc.ocapi.AbstractOCDocument.getOcType()).

The value is a comma separated list of attributes, which shall be available on the client side via com.coremedia.livecontext.ecommerce.common.CommerceBean#getCustomAttributes.

The value is transmitted as String representation of the JSON Object.

Example:

sfcc.ocapi.custom-attributes-for.product=image_groups,c_isSale
sfcc.ocapi.custom-expand-parameters-for
Type Map<String,List<String>>
Description

Configure expand parameter names, which are requested from the commerce system via the "expand" parameter. The keys should be defined in lower case without special characters.

The value is a list of expand parameter values.

Example:

sfcc.ocapi.custom-expand-parameters-for.products=images,prices,variations
sfcc.ocapi.custom-localized-attributes-for
Type Map<String,List<String>>
Description

Same as customAttributesFor but for localized properties. Only the value for the current locale of the request is transmitted to the client.

sfcc.ocapi.data.customer-groups.count
Type Integer
Description

Optional count for retrieving only a subset of all customer groups. If not set, the default behaviour of the salesforce Data API will apply.

sfcc.ocapi.host
Type String
Description

Host name (FQDN) of your SFCC Instance.

sfcc.ocapi.http-client.accept-cookies
Type Boolean
Default false
Description

Setting if cookies should be accepted.

Deprecation

This property has been deprecated and will be removed in a future version.

Use commerce.rest.client.cookie-spec instead.

Reason:

use base adapter configuration option

sfcc.ocapi.http-client.connection-pool-size
Type Integer
Default 20
Description

Defines the overal connection limit for a connection pool.

Deprecation

This property has been deprecated and will be removed in a future version.

Use commerce.rest.client.connection-pool-size instead.

Reason:

use base adapter configuration option

sfcc.ocapi.http-client.connection-request-timeout-ms
Type Integer
Default 60000
Description

Http Client Configuration for Rest communication with SFCC OCAPI Services.

Deprecation

This property has been deprecated and will be removed in a future version.

Use commerce.rest.client.connect-request-timeout instead.

Reason:

use base adapter configuration option

sfcc.ocapi.http-client.connection-timeout-ms
Type Integer
Default 60000
Description

Http Client Configuration for Rest communication with SFCC OCAPI Services.

Deprecation

This property has been deprecated and will be removed in a future version.

Use commerce.rest.client.connect-timeout instead.

Reason:

use base adapter configuration option

sfcc.ocapi.http-client.max-connections-per-route
Type Integer
Default 2
Description

Defines a connection limit per one HTTP route.

Deprecation

This property has been deprecated and will be removed in a future version.

Use commerce.rest.client.max-connections-per-route instead.

Reason:

use base adapter configuration option

sfcc.ocapi.http-client.network-address-cache-ttl-ms
Type Integer
Default 30000
Description

Http Client Configuration for Rest communication with SFCC OCAPI Services.

Deprecation

This property has been deprecated and will be removed in a future version.

Use commerce.rest.client.network-address-cache-ttl instead.

Reason:

use base adapter configuration option

sfcc.ocapi.http-client.socket-timeout-ms
Type Integer
Default 60000
Description

Http Client Configuration for Rest communication with SFCC OCAPI Services.

Deprecation

This property has been deprecated and will be removed in a future version.

Use commerce.rest.client.socket-timeout instead.

Reason:

use base adapter configuration option

sfcc.ocapi.http-client.trust-all-ssl-certificates
Type Boolean
Default true
Description

Setting if client should trust all ssl certificates.

Deprecation

This property has been deprecated and will be removed in a future version.

Use commerce.rest.client.trust-all-ssl-certificates instead.

Reason:

use base adapter configuration option

sfcc.ocapi.load-all-sku-images
Type Boolean
Default false
Description

Set to true if your base products often have no images assigned. With this flag enabled also SKU image groups are loaded alongside with the product data. If no image is assigned to a product a sku image is used as fallback. Note that this may increase the data footprint between commerce system and adapter. see "all_images" below SFCC Documentation

sfcc.ocapi.protocol
Type String
Default https
Description

Protocol used for OCAPI REST communication.

sfcc.ocapi.sandbox
Type Boolean
Default false
Description

Set to true if integrating with a sandbox instance. Adjust base paths for REST API requests

On sandbox instances the base paths must be prefixed with '/s/{siteId}' see: SFCC Documentation

sfcc.ocapi.type
Type com.​coremedia.​commerce.​adapter.​sfcc.​common.​OcapiType
Description

Configures the OCAPI type to be used to load data from the commerce system. Available types are shop and data.

sfcc.ocapi.version
Type String
Default v21_9
Description

Version of OCAPI Rest Service used.

sfcc.search-limit
Type Integer
Default 200
Description

The default search limit as supported by the SFCC backend.

sfcc.single-value-search-facets
Type List<String>
Description

List of facet keys. These facets only support single values to be selected.

Table 9.1. SFCC Commerce Adapter related Properties


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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