# Quantity settings

Stockeo provides extensive options for managing how the quantity from the feed will affect the stock in your store. To change quantity settings, navigate to your **Stockeo Automations** → **Edit** the desired automation → scroll down to the **Data Mapping** section → hit the **gear icon** next to the field in which you typed the name of your supplier's feed quantity. More quantity settings will then appear.

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-34211ae8b35dfdf2a227d39a547707b9e61fe546%2Fstockeo-app-for-shopify-change-quantity-settings.gif?alt=media" alt="How to edit advanced quantity settings in the Stockeo app animated"><figcaption><p>Edit advanced quantity settings</p></figcaption></figure>

### Override vs Add

This option allows you to choose whether the feed quantity will overwrite your current stock or if the feed quantity will be added to the current stock.

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-09ad63fb58b856fc2095c6f561bdf51ad555a7ed%2Fstockeo-quantity-override-or-add.png?alt=media" alt="Set whether you want to overwrite or add the feed quantity to the stock"><figcaption><p>Set whether you want to overwrite or add the feed quantity to the stock</p></figcaption></figure>

### Quantity formula

You can specify a formula in Liquid to calculate quantity based on the feed quantity.

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-90605c890692543948761cc7420874d3c527c815%2Fstockeo-quantity-formula.png?alt=media" alt="Stockeo quantity formula rounding to full tens."><figcaption></figcaption></figure>

#### Round down to full tens

You can round quantity to full tens using the following formula:

```liquid
{{ quantity | divided_by: 10 | floor | times: 10 }}
```

#### Transform text to number

You can convert a descriptive stock level to a number. For example, the formula below turns *high* to 50, *low* to 10, and *out of stock* to 0.

```liquid
{%- case quantity -%}
{%- when "high" -%} 50
{%- when "low" -%} 10
{%- when "out of stock" -%} 0
{%- endcase -%}
```

#### Calculate with metafields

It's also possible to use a product or variant metafield in the quantity calculation.

* `product.metafields.namespace.key`
* `variant.metafields.namespace.key`

Let's assume you sell products in multipacks, and your provider tracks quantity of individual items. You can keep the multipack size in a variant metafield, and calculate the number of available multipacks with the following formula:

```liquid
{% assign multipack_size = variant.metafields.custom.multipack_size | default: 1 %}
{{ quantity | divided_by: multipack_size }}
```

### Low stock cut-off

In this field you can set the low stock cut-off. If the quantity in the feed is below or equal to the given value, your store's product quantity will be zeroed.<br>

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-e0455c7d77c772bdc36643747f597f683d7dc0be%2Fstockeo-quantity-low-stock-cut-off.png?alt=media" alt="Stockeo low stock cut-off set to 10"><figcaption><p>Set the low stock cut-off</p></figcaption></figure>

### Reset missing SKUs

If this option is selected, the quantity of products whose SKUs are not present in the feed will be reset to zero. This will be applied to products matching filters.

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-4e9ec76e7c71b9241277993ca4d372121367e0bc%2Fstockeo-for-shopify-reset-missing-skus-animated.gif?alt=media" alt="How to reset quantity of products whose SKUs are not present in the feed animated"><figcaption><p>Reset missing SKUs</p></figcaption></figure>

### Force inventory tracking if disabled

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-3e089e61d10d6a9e5087fa5c4c043e0192c5e5ac%2Fforce-inventory-tracking-stockeo-quantity-settings.png?alt=media" alt="Force inventory tracking if disabled for processed variants"><figcaption><p>Force inventory tracking if disabled</p></figcaption></figure>

When this setting is enabled, if a processed variant has inventory tracking disabled, Stockeo will automatically turn it on.

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-3d046e924b42e502855fab8888e756d1baad7807%2Finventory-tracked-shopify.gif?alt=media" alt="Enable the inventory tracking option in Shopify"><figcaption><p>Inventory tracking option in Shopify</p></figcaption></figure>

### Enable location if disabled

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-f6ada3f9aec831a6fe416b026a7f33ffe52a2968%2Fenable-location-if-disabled-stockeo-quantity-settings.png?alt=media" alt="Enable location if disabled - Stockeo"><figcaption><p>Enable location if disabled</p></figcaption></figure>

This option enables Stockeo to activate the location specified in the automation for a processed variant if that location is currently disabled.

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-bfc39e42808bef2d8cb775a73c2653ea25da000a%2Fstockeo-inventory-sync-select-location.png?alt=media" alt="Select location in Stockeo automation"><figcaption><p>Select location in Stockeo automation</p></figcaption></figure>

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-c7bfe5f08af7590c020fef24d4e4648a40d01663%2Fenable-location.gif?alt=media" alt="Stockeo activates selected location"><figcaption><p>Enabling location in Shopify</p></figcaption></figure>
