commercetools Configurations

Info: This feature in Bloomreach Content requires a standard or premium license. Contact Bloomreach for details.

Overview

You can integrate Bloomreach Content with commercetools using the Bloomreach Commerce Accelerator. The B2C application includes all necessary configurations to connect to your commercetools instance.

This page covers:

  • Connecting to your commercetools instance
  • An overview of commercetools connector configurations

Connecting to a commercetools Instance

commercetools is a cloud-based commerce API solution. The Bloomreach Commerce Accelerator B2C application provides a CRISP resource for connecting to your commercetools instance. Configuration is located at:

/hippo:configuration/hippo:modules/crispregistry/hippo:moduleconfig/crisp:resourceresolvercontainer/commercetools

You must set the following connection properties:

Property nameDescription
commercetools.baseUrlThe base URL of your commercetools instance (e.g., https://api.<region>.<cloudProvider>.commercetools.com/<project_name>).
See commercetools hosts documentation for details.
commercetools.accessTokenUriThe URI to obtain your access token using the credentials flow (e.g., https://auth.<region>.<cloudProvider>.commercetools.com/oauth/token?grant_type=client_credentials&scope=manage_project:<project_name>).
See commercetools authorization documentation for details.
commercetools.clientIdOAuth 2 client ID generated for your project.
commercetools.clientSecretOAuth 2 client secret generated for your project.

You can configure these API client credentials in your commercetools project at: https://mc.commercetools.com/<project_name>/settings/developer/api-clients.

Define these properties in the Bloomreach Accelerator Configuration File as shown below. Replace placeholders with your project-specific values:

..
commercetools.baseUrl = https://api.<region>.<cloudProvider>.commercetools.com/<project_name>/
commercetools.accessTokenUri = https://auth.<region>.<cloudProvider>.commercetools.com/oauth/token?grant_type=client_credentials&scope=manage_project:<project_name>
commercetools.clientId = <client_id>
commercetools.clientSecret = <client_secret>
..

Connector Configurations

The Bloomreach Commerce Accelerator B2C application includes a commerce connector definition for commercetools. You can find this in the Default Commerce Connector Set document, under the commerce-connectors folder, with the Connector ID set to commercetools.

This connector is linked by name to a specific mapping bundle document. For commercetools, the resource bundle document ID is starterstore.mapping.commercetools. This document is located in the mappings folder under administration.

The Resource space property must match the commercetools CRISP resource name.

The table below lists all connector components for the commercetools connector. Each entry includes a description and the context variables resolved at runtime for external requests.

Component IDDescriptionContext Variables
productDetailRetrieves product detailsexternalReferenceId: Product ID specified in the URL
productListRetrieves a list of products
facetListReturns products filtered by facetlocale: Search locale for multi-language support
starterstoreQueryParam_query: Query string parameter
Facet values can be customized in the configuration
productSearchReturns products based on query parametersstarterstoreQueryParam_pageSize: Query result limit
starterstoreQueryParam_offset: Query result offset
locale: Search locale
starterstoreQueryParam_query: Query string parameter
starterstoreQueryParam_facetQuery: Filter by facet values
categories: Filter by category ID
productSearchByCategorySame as productSearch, but filters by categoryexternalReferenceId: Category ID
starterstoreQueryParam_pageSize: Query result limit
starterstoreQueryParam_offset: Query result offset
locale: Search locale
starterstoreQueryParam_query: Query string parameter
starterstoreQueryParam_facetQuery: Filter by facet values
categoriesListReturns a list of categories
categoryDetailFetches details of a specific categoryexternalReferenceId: Category ID specified in the request
categorydecoratorUsed by the category decorator document type, specifically by the external document picker plugin
productdecoratorUsed by the product decorator document type, specifically by the external document picker pluginstarterstoreQueryParam_query: Query string parameter in the modal window
id: If specified, displays only the product with that ID
createCustomerCreates a new customeranonymousCartId: Anonymous cart ID associated before registration
customer: Customer object with user data
getCustomerRetrieves customer datastoreUser: Bloomreach Commerce Accelerator user object
updateCustomerUpdates customer datacustomer: Customer object with e-commerce user data
deleteCustomerDeletes customer from the back end
cartCreateCreates a cartcartCurrency: Cart currency for multi-currency support
country: Used to determine product availability by region/country
storeUser: Bloomreach Commerce Accelerator user object
cartDeleteDeletes a cartcartId
cartProductListRetrieves a cart object with cart status and assigned productscartId
cartProductAddAdds a new or existing product to the cartcartVersion: Cart revision
cartProductId: Product ID
cartProductUpdateUpdates item quantity in the cartcartVersion: Cart revision
cartItemId: Item ID to update
cartItemQuantity: New quantity
cartProductRemoveRemoves a product from the cartcartVersion: Cart revision
cartItemId: Item ID to remove
cartCustomerUpdateUpdates the cart ownercartVersion: Cart revision
storeUser: Bloomreach Commerce Accelerator user
authenticateCustomerAuthenticates user against commercetoolsanonymousCartId: Anonymous cart ID before authentication
customer: Customer object with user data
orderQueryRetrieves orders for a specific userstoreUser: Bloomreach Commerce Accelerator user object
changeCustomerPasswordChanges customer passwordcustomerInBackend: Customer object with latest revision
customer: Customer object with new user data
updateCustomerAddressesUpdates customer addressescustomerInBackend: Customer object with latest revision
customer: Customer object with new user data
updateCustomerDefaultAddressesSets customer default addresscustomerInBackend: Customer object with latest revision
customer: Customer object with new user data
removeCustomerAddressesRemoves customer addressescustomerInBackend: Customer object with latest revision
customer: Customer object with new user data
paymentCreateCreates a payment entry in commercetoolscartId
cartCurrency: For multi-currency sites
cartAmount: Total cart amount
orderCreateCreates an order in the commerce backendcartVersion: Cart revision
cartId
cartShipmentMethodUpdateUpdates the cart shipment methodcartId
cartVersion: Cart revision
shippingMethodReference: Internal reference to the shipment method
cartShipmentAddressUpdateUpdates the cart shipment addresscartId
cartVersion: Cart revision
address: Address object defined in Bloomreach Commerce Accelerator

Info: When copying products from commercetools into brSM, you must create a link between the original product in the commerce backend and the corresponding copy in brSM. brSM uses a standard field called variant to store product SKUs. If you copy products from commercetools, the SKU must match the value in the product key field.

Share Feedback
Page: /frontend/commerce-accelerator/overview-setup/commercetools-configuration
Section: Frontend
Category *