Commercetools Connector Configuration
This Bloomreach Experience Manager feature requires a standard or premium license. Please contact Bloomreach for more information.
Introduction
As explained in Configure brX GraphQL Service, the .env file contains the connection settings to integrate with commercetools.
Configuration Options
The following options are supported:
Property Name | Description | Example Value(s) | Default Value |
---|---|---|---|
COMMERCETOOLS_API_BASE_URL | The URL of the commercetools HTTP API host. | 'https://api.sphere.io' | |
COMMERCETOOLS_AUTH_BASE_URL | The URL of the commercetools OAuth2 server. | 'https://auth.sphere.io' | |
COMMERCETOOLS_PROJECT_KEY | Your commercetools project key. | 'myproject' | |
COMMERCETOOLS_CLIENT_ID | The OAuth2 client ID used in requests to the commercetools platform. | 'myApollo' | |
COMMERCETOOLS_CLIENT_SECRET | The OAuth2 client secret used in requests to the commercetools platform. | 'changeIt' | |
COMMERCETOOLS_SCOPE |
The OAuth2 scope(s) used in requests to the commercetools. This value is a combination of multiple scopes for various features of the commercetools. The commercetools endpoints may provide various scopes to grants API access within a project. See commercetools HTTP API and related API documentation for detail. |
'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_FIELDS |
If a list of field names is specified as a comma separated string, then extra custom fields are extracted from the product item in the JSON response and included in the the GraphQL response like the following example: { "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' |
.