Request Context

The request context enables you to provide PromoBadger with contextual information about the requst being made (e.g. currency code, channel ID etc.).

The Context object

Attributes

The Context Object

{
  "bigcommerce": {
    ...
  }
}

The BigCommerce Context object

Attributes

  • Name
    channel
    Type
    Integer
    Optional
    optional
    Description

    The BigCommerce storefront channel ID.

  • Name
    currency
    Type
    String
    Optional
    optional
    Description

    The current BigCommerce currency code (GBP, USD, AUD etc.)

  • Name
    customerGroup
    Type
    Integer
    Optional
    optional
    Description

    The customer group of the currently logged in customer

  • Name
    customerOrderCount
    Type
    Integer
    Optional
    optional
    Description

    The total number of orders placed by the current customer

  • Name
    customerSegments
    Type
    Array<String>
    Optional
    optional
    Description

    The segment IDs for the current customer

The BigCommerce Context Object

{
  "context": {
    "bigcommerce": {
      "channel": 123456,
      "currency": "GBP",
      "customerGroup": 1,
      "customerOrderCount": 10,
      "customerSegments": [
        "d11a030f-45e7-4fc0-833b-d5c39d34cf91",
        "55980e19-2bed-499f-acf6-3d196d51dde9"
      ]
    }
  }
}