# Special Offers

While not strictly essential, special offers are a great way to help your customers get great deals (while also increasing their order size). Jane Roots offers a few different ways to do this. The first is to list the available bundles at the top of the screen, while another option is to let customers know how they can complete a bundle by adding additional products to their carts. The idea behind a bundle is that customers need to buy multiple products to get a discount.

### The types of specials

We currently offer three different types of specials.

1. Discounts. For example, "Get 30% off Brand X"
2. Bulk specials. For example, "Get 25% off if you buy 2 prerolls
3. Bundle specials. For example, "Buy an 1/8 ounce of flower, get a preroll 50% off"

### Find out whether specials apply to a product

If you want to know whether there are specials that apply to a product, we provide a few fields in Algolia (`on the menu-products-*` indices) that correspond to the various different types of specials.

1. To see whether any regular discounts apply to a product, check the `applicable_special_ids` field
2. To see whether any bulk specials apply to a product, check the the `applicable_bulk_special_ids` field
3. To see whether a product would **qualify** for any bundle specials (the "Buy an 1/8 ounce of flower" part from above), check `applicable_bundle_special_ids.qualify`
4. To see whether a product would be **discounted** in any bundle specials (the "get a preroll 50% off" part from above), check `applicable_bundle_special_ids.discount`

One thing to note is that these fields only include the special IDs, and not any special metadata. We recommend that you periodically pull the metadata for all specials, and cache this on your server. You can then quickly associate the special IDs with other metadata.

### List available specials

You can list all available specials by using our specials API.

{% openapi src="/files/VcD57I8ruu3dTpTW7GoE" path="/roots/store\_operations\_api/v1/stores/{store\_id}/specials" method="get" %}
[swagger.json](https://338810739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4Bq28Gj1vy78MuGEwRE%2Fuploads%2FnNFt4CSkApuK6mGjOPEv%2Fswagger.json?alt=media\&token=0f208729-d86e-45e0-9d59-0daad0c6a720)
{% endopenapi %}

You will want to set the `enabled` flag to `true` so that you only retrieve specials that are currently available. To try it out in the demo environment, go [here](https://demo.nonprod-iheartjane.com/api/jane-api-docs/index.html?urls.primaryName=Menu%20API%20V1%20Docs).

Additionally, when you retrieve a product from Algolia, you will get information about any currently active special that applies to the product. You can show this information in your search results and the product detail page.

```json
  {
    ...
    "special_amount": "20% OFF",
    "special_id": 752,
    "special_title": "20% OFF all Extracts"
    ...
  }
```

### Displaying a specials row

If you would like to display a specials row on your menu, you can query by one or more root types. We expose an `applicable_special_types` field in Algolia, which you can use to query for products that have various types of specials. The allowable values are as follows: `product`, `bundle`, and `bulk`.

For example, you could use the following query if you are using the JavaScript library

```javascript
productsIndex.search('', { 
                     filters: 'store_id=4 AND (applicable_special_types:product OR applicable_special_types:bundle OR applicable_special_types:bulk)'
}).then((results) => {
                     console.log(results);
});
```

### Help customers complete a bundle

Another thing you can do is to let customers know which products they can add to their cart to complete a bundle. There is an API that will make it easy for you to do this.

{% openapi src="/files/VcD57I8ruu3dTpTW7GoE" path="/roots/store\_operations\_api/v1/stores/{id}/best\_bundle\_possibility" method="get" %}
[swagger.json](https://338810739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4Bq28Gj1vy78MuGEwRE%2Fuploads%2FnNFt4CSkApuK6mGjOPEv%2Fswagger.json?alt=media\&token=0f208729-d86e-45e0-9d59-0daad0c6a720)
{% endopenapi %}

To try it out in the demo environment, go [here](https://demo.nonprod-iheartjane.com/api/jane-api-docs/index.html?urls.primaryName=Menu%20API%20V1%20Docs).


---

# 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://docs.iheartjane.com/jane-docs/implementing-roots/building-your-menu/special-offers.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.
