---
title: "The store object"
slug: "the-store-object"
abstract: "Describes the contents and usage of the store object."
---
# 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.<br><br>An identifier for a store. |
| `group_id` | string | Optional.<br><br>Additional identifier when the stores are organized in a hierarchy. |

You can include the `store` object in the [context object](https://doc.sitecore.com/discover/en/developers/discover-developer-guide/integrate-using-discover-rest-apis/events-data-model/the-event-object-model/the-context-object.html "The context object"), the [checkout object](https://doc.sitecore.com/discover/en/developers/discover-developer-guide/integrate-using-discover-rest-apis/events-data-model/the-event-object-model/the-checkout-object.html "The checkout object"), or the [product object](https://doc.sitecore.com/discover/en/developers/discover-developer-guide/integrate-using-discover-rest-apis/events-data-model/the-event-object-model/the-product-object.html "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

```JSON
{
  "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

```JSON
{
  "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.

```JSON
{
  "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
    }
  }
}
```