commercetools Connector Configuration

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

Overview

The .env file stores the connection settings required to integrate Bloomreach Content with commercetools. For details on configuring the brX GraphQL Service, see Configure brX GraphQL Service.

Configuration Options

Configure the following properties in your .env file to enable commercetools integration:

Property NameDescriptionExample Value(s)Default Value
COMMERCETOOLS_API_BASE_URLURL of the commercetools HTTP API host.'https://api.sphere.io'
COMMERCETOOLS_AUTH_BASE_URLURL of the commercetools OAuth2 server.'https://auth.sphere.io'
COMMERCETOOLS_PROJECT_KEYcommercetools project key.'myproject'
COMMERCETOOLS_CLIENT_IDOAuth2 client ID for commercetools API requests.'myApollo'
COMMERCETOOLS_CLIENT_SECRETOAuth2 client secret for commercetools API requests.'changeIt'
COMMERCETOOLS_SCOPEOAuth2 scopes required for commercetools API access. Combine multiple scopes as needed for your use case. Refer to commercetools HTTP API documentation for available scopes and details.'view_categories:myproject create_anonymous_token:myproject manage_my_shopping_lists:myproject view_published_products:myproject manage_my_profile:myproject manage_my_orders:myproject manage_my_payments:myproject'
COMMERCETOOLS_CUSTOM_ATTR_FIELDSComma-separated list of custom product field names. The service extracts these fields from the commercetools product JSON and includes them in the GraphQL response. Example GraphQL response: json { "data": { "findItemsByKeyword": { //... "items": [ { //... "customAttrs": [ { "name": "hasStagedChanges", "values": [ "false" ] }, { "name": "lastModifiedAt", "values": [ "2018-01-29T20:20:50.328Z" ] }, { "name": "slug", "values": [ "{\"en\":\"thanksgiving-activity-book-1476365028138\"}" ] } ] }, //... ] } } } 'hasStagedChanges,lastModifiedAt,slug'
EMAIL_API_URLURL of the trusted email service. commercetools does not send password reset emails by default. The brX GraphQL Service retrieves the customer reset token and sends it, along with customer details, to the configured email service. The email service must accept requests with the following body structure: json { "customer": { "email": "...", "firstName": "...", "middleName": "...", "lastName": "...", "title": "...", "salutation": "...", "locale": "..." }, "token": "XXX" } 'https://<brXM_instance>/site/restservices/sendEmail'
COMMERCETOOLS_AVAILABLE_LOCALESComma-separated list of supported languages in the commercetools instance. The service selects the best matching locale for the client based on preferences (such as the Accept-Language HTTP header or the locale parameter during sign-in).'en,de'

Next Steps

After configuring these properties, restart the brX GraphQL Service to apply the changes. Verify connectivity and data retrieval by querying the GraphQL endpoint and confirming expected results.

Share Feedback
Page: /frontend/commerce-accelerator/brx-graphql-service/commercetools-connector-configuration
Section: Frontend
Category *
commercetools Connector Configuration | Bloomreach Content Documentation