Bloomreach Discovery Connector Configuration
Info: This feature in Bloomreach Content requires a standard or premium license. Contact Bloomreach for licensing details.
Overview
The .env file defines the connection settings required to integrate the brX GraphQL Service with Bloomreach Discovery. For general instructions, see Configure brX GraphQL Service.
Configuration Options
Configure the following environment variables to control the connector's integration behavior:
| Property Name | Description | Example Value(s) | Default Value |
|---|---|---|---|
| BRSM_API | URL of the Bloomreach Discovery Core API. | 'http://core.dxpapi.com/api' | |
| BRSM_SUGGESTION_API | URL of the Bloomreach Discovery Suggestion API. | 'https://suggest.dxpapi.com/api' | |
| BRSM_ACCOUNT_ID | Account ID associated with your Bloomreach Discovery domain. | '0000' | |
| BRSM_DOMAIN_KEY | Domain key for your Bloomreach Discovery cloud instance. | 'my_brsm_instance' | |
| BRSM_CUSTOM_ATTR_FIELDS | Comma-separated list of field names. The connector extracts these custom fields from the product item in the JSON response and includes them in the GraphQL response. Example output: { "data": { "findItemsByKeyword": { //... "items": [ { //... "customAttrs": [ { "name": "brand", "values": [ "Michelin" ] }, { "name": "score", "values": [ "0.014996755" ] } ] }, //... ] } } } | 'brand,score' | |
| BRSM_CUSTOM_VARIANT_ATTR_FIELDS | Comma-separated list of field names. The connector extracts these custom fields from the product variant item in the JSON response and includes them in the GraphQL response. Example output: { "data": { "findItemById": { //... "variants": [ { //... "customAttrs": [ { "name": "color_code", "values": [ "78T" ] } ] }, //... ] } } } | 'color_code' | |
| BRSM_CUSTOM_VARIANT_LIST_PRICE_FIELD | Name of the custom property in the product variant JSON item to use as the listPrice in the GraphQL response. If not specified or not found, the variant's listPrice will not include a value. Note: If this field is project-specific, also include it in the BRSM_CUSTOM_ATTR_FIELDS variable to ensure it is present in the Bloomreach Discovery JSON response. For example, if set to 'sku_price', the connector uses the sku_price property (1.09 in the example) as the listPrice: javascript { "response":{ //... "docs":[ { //... "variants":[ { "sku_price":1.09, "sku_price_attr":[ "0.89" ], //... }, ] } ] } } | 'sku_price' | |
| BRSM_CUSTOM_VARIANT_PURCHASE_PRICE_FIELD | Name of the custom property in the product variant JSON item to use as the purchasePrice in the GraphQL response. If not specified or not found, the variant's purchasePrice will not include a value. Note: If this field is project-specific, also include it in the BRSM_CUSTOM_ATTR_FIELDS variable to ensure it is present in the Bloomreach Discovery JSON response. For example, if set to 'sku_price_attr', the connector uses the first value (0.89 in the example) from the sku_price_attr array as the purchasePrice: javascript { "response":{ //... "docs":[ { //... "variants":[ { "sku_price":1.09, "sku_price_attr":[ "0.89" ], //... }, ] } ] } } | 'sku_price_attr' | |
| BRSM_RESPONSE_TIME_HEADER_ENABLED | If set to 'true', the brX GraphQL Service reads the internal response time (in milliseconds) from the Bloomreach Discovery backend and returns it in the X-BR-Response-Time response header. |
Note: You can retrieve API client data from your Bloomreach Discovery instance at https://tools.bloomreach.com/, under the Configuration tab.