SAP Connector Configuration

Introduction

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

Configuration Options

The following options are supported:

Property Name (* required field)DescriptionExample Value(s)Default Value
SAP_API_BASE_URL *The URL of the SAP.https://api.<instance_ID>.cc.commerce.ondemand.com/rest/v2
SAP_AUTH_BASE_URL *The URL of the SAP OAuth2 server.https://api.<instance_ID>.cc.commerce.ondemand.com/authorizationserver
SAP_BASE_SITE_ID *Your SAP site (i.e. project instance) name.'mysite'
SAP_CLIENT_ID *The OAuth2 client ID used in requests to the SAP platform.'myApollo'
SAP_CLIENT_SECRET *The OAuth2 client secret used in requests to the SAP platform.'changeIt'
SAP_SCOPE *The OAuth2 scope(s) used in requests to the SAP platform.'basic'
SAP_MEDIA_BASE_URL *The base URL of the product image resources.https://api.<instance_ID>.cc.commerce.ondemand.com
SAP_DEFAULT_CATALOG_IDENTIFIER *The identifier of the default product catalogs.'myProductCatalog'
SAP_DEFAULT_CATALOG_VERSION_ID *The version name of the default product catalogs.'Online'
SAP_CATEGORY_SELECTOR_NAMEThe default selector name used to filter products by category'category' (or 'allCategories' for B2B)'category'
SAP_CUSTOM_ATTR_FIELDSIf 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": "summary", "values": [ "My Summary" ] },
            { "name": "stock", "values": [ "123" ] }
          ]
  },
  //...
  ]
  }
  }
}
'summary,stock'