Elastic Path Configurations

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

Info: The Elastic Path commerce connector is built on the Commerce Connector SDK.

Overview

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

This page covers:

  • How to connect Bloomreach Content to your Elastic Path instance
  • An overview of Elastic Path connector configuration options

Connect to an Elastic Path Instance

Elastic Path is an e-commerce platform that supports both cloud-based and on-premise deployments. The Bloomreach Commerce Accelerator B2C application provides a CRISP API resource space for connecting to your Elastic Path instance. Configuration is located at:

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

Set the following connection properties:

Property nameDescription
elasticpath.baseUrlBase URL of your Elastic Path Cortex instance (e.g. https://<instance_name>.elasticpath.com/cortex)
elasticpath.accessTokenUriURI to obtain your access token (e.g. https://<instance_name>.elasticpath.com/cortex/oauth2/tokens)
elasticpath.usernameElastic Path username
elasticpath.passwordElastic Path password
elasticpath.scopeElastic Path store name
elasticpath.roleElastic Path authentication role
elasticpath.default.item.original.image.uriURI pattern for the original product image. Used when the backend does not provide image URIs but the original image can be inferred from a specific location. Default is an empty string. For example, if the product code is "12345" and this property is set to https://elasticpath-demo-images.s3-us-west-2.amazonaws.com/your_scope_related/{itemId.code}.png, the original image URI will be https://elasticpath-demo-images.s3-us-west-2.amazonaws.com/your_scope_related/12345.png if the backend response does not include an image URI.
elasticpath.default.item.thumbnail.image.uriURI pattern for the product thumbnail image. Used when the backend does not provide thumbnail URIs but they can be inferred. Default is an empty string. For example, if the product code is "12345" and this property is set to https://elasticpath-demo-images.s3-us-west-2.amazonaws.com/your_scope_related/{itemId.code}-thumbnail.png, the thumbnail image URI will be https://elasticpath-demo-images.s3-us-west-2.amazonaws.com/your_scope_related/12345-thumbnail.png if the backend response does not include a thumbnail URI.

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

..
elasticpath.cache.enabled = true
elasticpath.baseUrl = <your_elasticpath_commerce_instance>/cortex
elasticpath.accessTokenUri = <your_elasticpath_commerce_instance>/cortex/oauth2/tokens
elasticpath.username =
elasticpath.password =
elasticpath.scope = <your_store_name>
elasticpath.role = PUBLIC
elasticpath.default.item.original.image.uri =
elasticpath.default.item.thumbnail.image.uri =
..

The parameters username, password, and role are fixed in this configuration. The connector is designed to operate without a merchant account. For anonymous users in the Bloomreach Commerce Accelerator, the PUBLIC role is always used. When a customer authenticates, the session is converted to use the REGISTERED role, enabling customer-specific operations such as cart management and checkout.

Connector Configuration Details

The Bloomreach Commerce Accelerator B2C application includes a default commerce connector definition for Elastic Path. The Commerce Connector document is located in the commerce-connectors folder and uses the connector ID elasticpath.

  • Module name: com.bloomreach.commercedxp.container.connector.elasticpath (matches the HST module addon name in the connector implementation)
  • Resource space: Matches the Elastic Path CRISP API resource space name for the backend

The following table lists all connector components for the Elastic Path connector. Each component includes a description and the context variables required for external requests. This information applies to the Elastic Path connector shipped with Bloomreach Commerce Accelerator v2.

Component IDDescriptionContext Variables
productSearchByIdRetrieve product detailscode: product ID (from payload)
productSearchReturn a list of products based on query parameterspage-size: query result limit
keywords: string query parameter
productSearchByCategoryReturn products filtered by category IDresourceId: category ID (from backend)
currentPage: page number for pagination
Results are paginated dynamically in XM
categoriesSearchReturn a list of categories
categoryDetailSearchFetch details of a specific categoryresourceId: category ID (from request)
customerCreateRegister a customer account in the backendusername: customer username (email format)
password: customer password
family-name: customer last name
given-name: customer first name
authenticateCustomerAuthenticate a customer against the backendgrant-type: authentication type (default: password)
username: customer username (email format)
password: customer password
scope: store (catalog) name
role: customer role (REGISTERED for authenticated users)
getCustomerRetrieve customer profile data
updateCustomerUpdate customer dataresourceId: customer ID (in backend)
family-name: customer last name
given-name: customer first name
createCustomerAddressesCreate a customer addressInput required: street-address, extended-address, locality, postal-code, region, country-name, family-name, given-name
updateCustomerAddressesUpdate a customer addressInput required: street-address, extended-address, locality, postal-code, region, country-name, family-name, given-name
removeCustomerAddressesRemove a customer addressresourceId: address ID (in backend)
cartProductListRetrieve cart status and product entries
cartProductAddAdd a product to the cartresourceId: product ID
quantity: quantity to add
cartProductUpdateUpdate item quantity in the cartstoreId: store ID (different from scope)
lineItemId: item ID to update
quantity: new quantity
cartProductRemoveRemove a product from the cartstoreId: store ID (different from scope)
lineItemId: item ID to update
quantity: new quantity (set to 0)
cartShipmentAddressUpdateUpdate cart shipment addressresourceId: shipping address selector ID
addressId: customer shipping address ID
cartCheckoutRetrieve cart status at checkout start
orderCreatePlace an order in the backendresourceId: order draft ID
orderReadRetrieve a specific order from the backendresourceId: purchase ID
orderQueryRetrieve orders placed by a specific user

Summary

Bloomreach Commerce Accelerator v2 includes an out-of-the-box Elastic Path Commerce Connector Module based on the Commerce Connector SDK. The connector supports all operations listed above.

To customize any shipped operation, download the connector source code and extend the implementation as needed. For details, see Develop a New Commerce Connector.

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

Share Feedback
Page: /build/commerce-backend/elastic-path-configuration
Section: Build
Category *