> ## Documentation Index
> Fetch the complete documentation index at: https://partner-integrations.voyado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Back in stock notifications

The back-in-stock feature enables customers to receive alerts when out-of-stock products are restocked. This guide explains how to integrate this between Shopify and Voyado Engage.

Before setting up the back-in-stock functionality, ensure the following:

* A connected product feed is set up in the Engage environment
* The back-in-stock module is enabled in Engage
* A back-in-stock email template is available in Engage
* All products (including out-of-stock items) are present in the product feed

<Warning>
  If a product is not in the feed, no notification can be sent for it.
</Warning>

Here are the steps in setting up and testing the back-in-stock integration.

## Enable inventory sync

To do this:

<Steps>
  <Step title="Open the app">
    Open the Voyado Engage app in Shopify
  </Step>

  <Step title="Go to settings">
    Navigate to the app settings
  </Step>

  <Step title="Inventory Sync">
    Locate the **Inventory Sync** toggle and enable it.
  </Step>

  <Step title="Check syncing">
    Ensure inventory levels sync correctly from Shopify locations that fulfill online orders.
  </Step>
</Steps>

## Add back-in-stock theme block

To ad the back-in-stock theme block:

<Steps>
  <Step title="Shopify admin">
    In Shopify Admin, go to **Online Store Themes**
  </Step>

  <Step title="Theme Editor">
    Click **Customize** to open the Theme Editor.
  </Step>

  <Step title="Product Templates">
    Select **Product Templates** and find the **Default product** page template.
  </Step>

  <Step title="Back-in-stock block">
    Add the **Back-in-Stock** theme block to your template.
  </Step>

  <Step title="Customize form">
    Customize the form if needed.
  </Step>

  <Step title="Save">
    Save the changes.
  </Step>
</Steps>

## Configure subscription form

For the subscription form to appear on the product page:

* Ensure that **Track quantity** is enabled in Shopify Admin
* Ensure that **Continue selling when out of stock** is NOT checked

## Automate notifications in Engage

<Steps>
  <Step title="Create automation">
    * In Engage, navigate to **Automations**
    * Create a new automation using the **Back-in-Stock** trigger
  </Step>

  <Step title="Configure automation">
    * Set up the automation to send email or SMS when a product is restocked
  </Step>

  <Step title="Activate automation">
    * Save and activate the automation
  </Step>
</Steps>

## Back-in-stock for Shopify headless

If you are using a Shopify headless setup, you will need to implement the subscription form manually using Voyado's API. The API allows customers to register their interest in out-of-stock products without using Shopify's built-in theme editor. See more here:

<Card title="See Shopify back-in-stock headless" href="/docs/ecom/shopify/running-as-headless" icon="https://mintcdn.com/voyado-partners/0IxEIB2Y6a--gNYY/icons/partner-integrations-link.png?fit=max&auto=format&n=0IxEIB2Y6a--gNYY&q=85&s=f3f7d94d9be6a06ca87acc84e4d5c032" horizontal width="128" height="128" data-path="icons/partner-integrations-link.png" />

Implement back-in-stock headless like this:

1. Use the API to collect customer information and product details
2. Ensure that product IDs match those in Engage
3. Send the subscription request to the Engage back-in-Stock API endpoint
4. Handle customer confirmation and manage subscription preferences programmatically
5. Test the integration to ensure customers receive notifications when products are restocked

## Testing and troubleshooting

Test the feature by marking a product as out of stock, subscribing to notifications, and then restocking it to ensure an email/SMS is received.

If notifications are not being sent, check:

* The product feed includes the item
* The email template is correctly set up
* The automation is active in Engage
