brX Discovery Connector Configuration - Bloomreach Experience - Headless Digital Experience Platform

brX Discovery Connector Configuration

Introduction

As explained in Configure brX GraphQL Service, the .env file contains the connection settings to integrate with brX Discovery.

Configuration Options

The following options are supported:

Property Name (* required field) Description Example Value(s) Default Value
BRSM_API * The URL of the Bloomreach Search & Merchandising Core API.

'http://core.dxpapi.com/api'

 
BRSM_SUGGESTION_API * The URL of the Bloomreach Search & Merchandising Suggestion API. 'https://suggest.dxpapi.com/api'  
BRSM_ACCOUNT_ID * The account ID associated to your domain. '0000'  
BRSM_DOMAIN_KEY * The domain key value of your Bloomreach Search & Merchandising cloud instance. 'my_brsm_instance'  
BRSM_AUTH_KEY * The authorization key associated to your account 'jazzhands'  
BRSM_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": "brand", "values": [ "Michelin" ] },
            { "name": "score", "values": [ "0.014996755" ] }
          ]
        },
        //...
      ]
    }
  }
}
'brand,score'  
BRSM_CUSTOM_VARIANT_ATTR_FIELDS

If a list of field names is specified as a comma separated string, then extra custom fields are extracted from the product variant item in the JSON response and included in the the GraphQL response like the following example:

{
  "data": {
    "findItemById": {
      //...
      "variants": [
        {
          //...
          "customAttrs": [
            { "name": "color_code", "values": [ "78T" ] }
          ]
        },
        //...
      ]
    }
  }
}
'color_code'  
BRSM_CUSTOM_VARIANT_LIST_PRICE_FIELD

If specified, the custom property of the product variant item in the JSON response will be used as the listPrice of the product variant. If not specified or not resolved by this configuration, the listPrice of the product variant item will have no money amount data.

NOTE: if this custom field name is project-specific one, please include this custom field name in the BRSM_CUSTOM_ATTR_FIELDS environment variable, too, to make the custom field included in the JSON responses from Bloomreach Search & Merchandising.

In the following example, if this is set to 'sku_price', then the "sku_price" property (1.09 in the example) of the specific variant item will be used as the listPrice.

{
  "response":{
    //...
    "docs":[
      {
        //...
        "variants":[
          {
            "sku_price":1.09,
            "sku_price_attr":[
              "0.89"
            ],
            //...
          },
        ]
      }
    ]
  }
}
'sku_price'  
BRSM_CUSTOM_VARIANT_PURCHASE_PRICE_FIELD

If specified, the custom property of the product variant item in the JSON response will be used as the purchasePrice of the product variant. If not specified or not resolved by this configuration, the listPrice of the product variant item will have no money amount data.

NOTE: if this custom field name is project-specific one, please include this custom field name in the BRSM_CUSTOM_ATTR_FIELDS environment variable, too, to make the custom field included in the JSON responses from Bloomreach Search & Merchandising.

In the following example, if this is set to 'sku_price_attr', then the first item (0.89 in the example) of the "sku_price_attr" array property of the specific variant item will be used as the purchasePrice.

{
  "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 internal response time in milliseconds measured in the Bloomreach Search & Merchandising backend is read by the brX GraphQL Service and passed in the X-BR-Response-Time response header.    
The API client data can be retrieved from your Bloomreach Search & Merchandising instance, more specifically on https://tools.bloomreach.com/, under the Configuration tab.
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?