> For the complete documentation index, see [llms.txt](https://docs.optis.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.optis.me/product-options/advanced-setup/how-to-use-upsell-product-link-stock-and-price-of-shopify-variant-to-option-value.md).

# How to Use "Upsell product"? Link Stock and Price of Shopify Variant to Option Value

Our app supports **product option inventory management**, allowing specific options to be **grayed out when out of stock** and ensuring that inventory updates automatically when a customer purchases an option.

This feature, called **"Upsell product"** links an option to a specific Shopify variant, syncing stock and price automatically. This feature is available in our **$19.99/month plan**:

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FAK68ljYRSUqxVoeLRMB2%2FScreenshot%20(1).png?alt=media&amp;token=caa6eafd-7c6a-4a05-9ce3-28da39f29141" alt=""><figcaption></figcaption></figure>

## Step-by-Step Guide to Set Up "Upsell product" <a href="#id-2-step-by-step-guide-to-set-up-upsell-product" id="id-2-step-by-step-guide-to-set-up-upsell-product"></a>

### Step 1: Create Unlisted Products with Variants <a href="#id-2-step-by-step-guide-to-set-up-upsell-product" id="id-2-step-by-step-guide-to-set-up-upsell-product"></a>

1. In your Shopify store, create a product with different variants and set its **Status** to **Unlisted**.
2. Assign stock levels and prices to each variant.

{% hint style="warning" %}
On **Storefront V2**, a product used as an Upsell product must be **Unlisted**. Products in **Draft** are no longer supported. If you previously used Draft products, change their status to **Unlisted** in Shopify (**Products** → open the product → **Status** → **Unlisted** → **Save**). See [OPTIS Storefront V2](https://docs.optis.me/product-options/optis-storefront-v2/optis-storefront-v2-faster-smarter-more-stable.md).
{% endhint %}

* Example:
* **Black variant:** Stock = **5**, Price = **$0** (only tracks stock).
* **White variant:** Stock = **0**, Price = **$1000** (tracks both stock and price).<br>

<figure><img src="https://storage.crisp.chat/users/upload/session/-/4/6/c/9/46c94fa4c7cb6000/image1ejgxli_odqxsn.png" alt=""><figcaption></figcaption></figure>

### Step 2: Assign Variants to Product Options <a href="#id-3-step-2-assign-variants-to-product-options" id="id-3-step-2-assign-variants-to-product-options"></a>

1. In the option set editor, open the option and set **Add-on** to **Upsell product**. Use the **Add-on** column of the **Option values** table (click **Columns** to show it), or **Add-on** in **Option settings** for single-value options.
2. Click the variant field (**Search product**) and, in the **Select product variant** window, select the corresponding Shopify variant for each option value. The window shows each variant's SKU and available quantity (or **Not tracked**).

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FIbPNWHCAg05hWu8MEp45%2FScreenshot%20(2).png?alt=media&amp;token=ccf34e71-ec00-4787-8c0a-c10fbeb0cb94" alt=""><figcaption></figcaption></figure>

### Step 3: View the Result on Your Storefront <a href="#id-3-step-3-view-the-result-on-your-storefront" id="id-3-step-3-view-the-result-on-your-storefront"></a>

* If a variant is out of stock, the assigned option will be **grayed out** automatically.
* If a variant has stock (for example 4 stocks), then the option linked with this variant will also have 4 stocks

<figure><img src="https://storage.crisp.chat/users/upload/session/-/4/6/c/9/46c94fa4c7cb6000/image1bljvlz_ymv3ug.png" alt=""><figcaption></figcaption></figure>

* When a customer purchases an option, the inventory updates in real-time (e.g., black stock reduces from 5 to 4).

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/-/2/2/4/2/22429817467a0000/image_4z6xs8.png" alt=""><figcaption></figcaption></figure>

#### **Keep These Products Unlisted** <a href="#id-3-optional-keep-variants-in-draft-mode" id="id-3-optional-keep-variants-in-draft-mode"></a>

* Keep these products as **Unlisted** in Shopify. They stay hidden from your collections, search and navigation, but customers can still add them to the cart through the option.
* Do not use **Draft** on Storefront V2.

By following these steps, you can **prevent customers from selecting out-of-stock options** while keeping your inventory automatically updated!
