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 name | Description |
|---|---|
elasticpath.baseUrl | Base URL of your Elastic Path Cortex instance (e.g. https://<instance_name>.elasticpath.com/cortex) |
elasticpath.accessTokenUri | URI to obtain your access token (e.g. https://<instance_name>.elasticpath.com/cortex/oauth2/tokens) |
elasticpath.username | Elastic Path username |
elasticpath.password | Elastic Path password |
elasticpath.scope | Elastic Path store name |
elasticpath.role | Elastic Path authentication role |
elasticpath.default.item.original.image.uri | URI 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.uri | URI 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 ID | Description | Context Variables |
|---|---|---|
productSearchById | Retrieve product details | code: product ID (from payload) |
productSearch | Return a list of products based on query parameters | page-size: query result limitkeywords: string query parameter |
productSearchByCategory | Return products filtered by category ID | resourceId: category ID (from backend)currentPage: page number for paginationResults are paginated dynamically in XM |
categoriesSearch | Return a list of categories | |
categoryDetailSearch | Fetch details of a specific category | resourceId: category ID (from request) |
customerCreate | Register a customer account in the backend | username: customer username (email format)password: customer passwordfamily-name: customer last namegiven-name: customer first name |
authenticateCustomer | Authenticate a customer against the backend | grant-type: authentication type (default: password)username: customer username (email format)password: customer passwordscope: store (catalog) namerole: customer role (REGISTERED for authenticated users) |
getCustomer | Retrieve customer profile data | |
updateCustomer | Update customer data | resourceId: customer ID (in backend)family-name: customer last namegiven-name: customer first name |
createCustomerAddresses | Create a customer address | Input required: street-address, extended-address, locality, postal-code, region, country-name, family-name, given-name |
updateCustomerAddresses | Update a customer address | Input required: street-address, extended-address, locality, postal-code, region, country-name, family-name, given-name |
removeCustomerAddresses | Remove a customer address | resourceId: address ID (in backend) |
cartProductList | Retrieve cart status and product entries | |
cartProductAdd | Add a product to the cart | resourceId: product IDquantity: quantity to add |
cartProductUpdate | Update item quantity in the cart | storeId: store ID (different from scope)lineItemId: item ID to updatequantity: new quantity |
cartProductRemove | Remove a product from the cart | storeId: store ID (different from scope)lineItemId: item ID to updatequantity: new quantity (set to 0) |
cartShipmentAddressUpdate | Update cart shipment address | resourceId: shipping address selector IDaddressId: customer shipping address ID |
cartCheckout | Retrieve cart status at checkout start | |
orderCreate | Place an order in the backend | resourceId: order draft ID |
orderRead | Retrieve a specific order from the backend | resourceId: purchase ID |
orderQuery | Retrieve 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 calledvariantto store product SKUs. When copying products from Elastic Path, the SKU must match the value in the product code field.