# Static

## What is a "static" box?&#x20;

A static box is a box with a set price for all the items inside. This is added to cart as a single line item and expanded in the Shopify order and in Skio post checkout.&#x20;

For more information on setting up a static build-a-box in Skio you can read our help article [here](https://help.skio.com/hc/en-us/articles/16802746288027-Static-build-a-box-setup-guide).

## Fetch Box Information

{% openapi src="/files/plVIIX451I4t096QsPyk" path="/storefront-http/get-classic-box-v2" method="post" %}
[skio\_storefront\_api.yaml](https://3129594098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6tgHoTWVJ8jGZz1VwcUl%2Fuploads%2FqjOAZCq8njXdD4YS8PpN%2Fskio_storefront_api.yaml?alt=media\&token=02c7f50b-e83c-4c4a-9f16-df90c2e2a10b)
{% endopenapi %}

## Front End Setup

The API request made will give you the appropriate data for each individual product available in the box and it's variants. You can use this information to display product cards and allow your customers to add different products to their cart.

Below is a list of different components or functionality you should include in order to create a successful build a box template:

* Product Cards
  * Quantity Selector
  * Price Display
* "Cart" - way to display selected products before actually adding to cart
* Subscription Toggle
  * This information can be pulled from the sellingPlanGroup object in the dynamic box fetch request. Display each option available for subscription as we as an option to purchase once as well
  * When adding to cart, each child product will need to have a selling\_plan provided. In most cases the selling\_plan ID will be the same for each of the child products and should come through the above API request&#x20;
* Quantity Limitations
  * The API will return either a sizeRange or sizeInterval that can be used to restrict customers on the front end to ensure the correct number of products is added to cart
  * Keep in mind, this doesn't restrict quantities in the cart so additional logic may need to be added to your cart to ensure this works properly

## Adding to Cart

In order for Skio's backend to recognize that a BAB has been added to cart, certain line item properties need to be added to the static box product.

The structure should include \_isClassicBoxV2: true as well as a list of product variants and their quantities. See below:&#x20;

```
_isClassicBoxV2: true (required)
Ice Cream - Matcha:2
Ice Cream - Vanilla:2
Ice Cream - Chocolate:2
_pvgid://shopify/ProductVariant/44658179670306:2 
_pvgid://shopify/ProductVariant/44658179703074:2
_pvgid://shopify/ProductVariant/44658179735842:2
```

Example add to cart data

```
{
  quantity: item.quantity,
  id: item.id,
  selling_plan: selectedSellingPlan.id,
  properties: {
    _isClassicBoxV2: true (required)
    Ice Cream - Matcha:2
    Ice Cream - Vanilla:2
    Ice Cream - Chocolate:2
    _pvgid://shopify/ProductVariant/44658179670306:2 
    _pvgid://shopify/ProductVariant/44658179703074:2
    _pvgid://shopify/ProductVariant/44658179735842:2
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrate.skio.com/skio/build-a-box/static.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
