# Leveraging Margin Data

Nosto for Shopify now allows you leverage your cost-per-item field via Nosto's Intelligence Engine.

Nosto's [advanced dynamic filtering and inclusion and exclusion filters](https://help.nosto.com/en/articles/586449-recommendation-filters) can be be configured to use the margin data.

The advanced dynamic filtering allows you include and exclude products by leveraging your margin data. The margin is calculated using the formula (\[price - cost] / price) *100) and is shown on Shopify's product details page. For example, if your price is 50, and your cost is 30, then the margin (calculated as (\[50 - 30] / 50)* 100) is 40%. We recommend reading Shopify's [detailed product pricing guide](https://help.shopify.com/en/manual/products/understanding-products#pricing) to learn more.

![Cost Per Item](https://excelify.io/wp-content/uploads/Shopify-Cost-per-Item-for-product-Variants-_.png)

## Setting it up

In order to set it up, you'll need to reinstall the Nosto app for Shopify. Reading the cost-per-item property requires some additional permissions and this can be done via a simple reinstall.

Once you've clicked on the Nosto app in your apps section, you'll be prompted with a permission dialog that resembles the following image.

![Additional Permissions](https://user-images.githubusercontent.com/327432/49646802-f45a6200-fa28-11e8-8b58-96a4fa2d5b9f.png)

Once you've reinstalled the app, we'll begin collecting the cost-per-item data organically. In order to expedite this process, simply initiate a one off reindex. <https://help.nosto.com/settings-and-troubleshooting-faq/tools-product-reindexupdate>

If you'd like assistance with setting this up, do reach out. We're here to help you get the most out of our Shopify app.


---

# 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.nosto.com/shopify/features/leveraging-margin-data.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.
