The store object

The store object contains information about the physical store in a BOPIS or ROPIS order.

The following are the keys supported by the store object:

Name

Type

Description

id

string

Optional.

An identifier for a store.

group_id

string

Optional.

Additional identifier when the stores are organized in a hierarchy.

You can include the store object in the context object, the checkout object, or the product object.

When deciding where to include the store object, consider the following:

  • The store specified in the context level is used to calculate intent/assisted metrics saying the user had an intent to do BOPIS transactions.

  • The store specified in the product/context is used to calculate actual BOPIS metrics.

  • The store specified at the product level overrides the store specified at the checkout level.

Sample order event with store provided in the context object

RequestResponse
{
  "type": "order",
  "name": "confirm",
  "value": {
    "context": {
      "user": {},
      "page": {},
      "store": {
        "id": "<store id selected while browsing>",
        "group_id": "<store group id selected while browsing>"
      },
      "products": [
        {
          "sku": "191258",
          "quantity": 1,
          "price": 11.99,
          "price_original": 19.99,
          "fitment": {
            "ids": [
              "2222"
            ]
          }
        },
        {
          "sku": "23432",
          "quantity": 1,
          "price": 12.99,
          "price_original": 14.99,
        }
      ],
      "checkout": {
        "order_id": "1234",
        "subtotal": 39.97,
        "total": 50.96,
        "store": {
          "id": "<store id selected during checkout. Could be different from one in context>",
          "group_id": "<store group id selected during checkout. Could be different from one in context>"
        },
        "shipping_method": "bopis"
      }
    }
  }
}

Sample order event with store provided in context and checkout

RequestResponse
{
  "type": "order",
  "name": "confirm",
  "value": {
    "context": {
      "user": {},
      "page": {},
      "store": {
        "id": "store id selected while browsing",
        "group_id": "store group id selected while browsing"
      }
    },
    "products": [
      {
        "sku": "191258",
        "quantity": 1,
        "price": 11.99,
        "price_original": 19.99,
        "fitment": {
          "ids": [
            "2222"
          ]
        }
      },
      {
        "sku": "23432",
        "quantity": 1,
        "price": 12.99,
        "price_original": 14.99
      }
    ],
    "checkout": {
      "order_id": "1234",
      "subtotal": 39.97,
      "total": 50.96,
      "store": {
        "id": "<store id selected during checkout, it could be different than one in context>",
        "group_id": "<store group id selected during checkout, it could be different than one in context>"
      },
      "shipping_method": "bopis"
    }
  }
}

Sample order event with store provided in context and product

The following example shows multiple shipping methods in a single order. sku "191258" uses default shipping whereas sku "23432" has a BOPIS shipping method.

RequestResponse
{
  "type": "order",
  "name": "confirm",
  "value": {
    "context": {
      "user": {},
      "page": {},
      "store": {
        "id": "<store id selected while browsing>",
        "group_id": "<store group id selected while browsing>"
      }
    },
    "products": [
      {
        "sku": "191258",
        "quantity": 1,
        "price": 11.99,
        "price_original": 19.99,
        "fitment": {
          "ids": [
            "2222"
          ]
        }
      },
      {
        "sku": "23432",
        "quantity": 1,
        "price": 12.99,
        "price_original": 14.99,
        "store": {
          "id": "<store id selected during checkout, it could be different than one in context>",
          "group_id": "<store group id selected during checkout, it could be different than one in context>"
        },
        "shipping_method": "bopis"
      }
    ],
    "checkout": {
      "order_id": "1234",
      "subtotal": 39.97,
      "total": 50.96
    }
  }
}

Do you have some feedback for us?

If you have suggestions for improving this article,