Back in Stock Campaign


Use the Back in Stock campaign to nudge customers to purchase a product when it is back in stock.

To retain customers, effectively manage out-of-stock situations, and create a positive customer experience by offering a product availability notification list. When the product is restocked, customers on the list will receive an email/push notification, helping to recover lost revenue and maintain customer engagement with your brand.

This example describes a back-in-stock campaign that involves sending email/push notifications to customers about products they previously expressed interest in and signed up for notifications about, which are now restocked.




  1. Enterprise Plan - Dynamic product messaging should be enabled for your account

  2. Notify Me Event - The event is generated whenever a customer clicks Notify me on an out-of-stock product. 

  3. Stock Status - MoEngage needs the stock status of each product daily.

Back in Stock Campaign - Set up

To create a Back in Stock Campaign:

  1. Set up the Catalog.
  2. Map the Notify Me event in User Actions.
  3. Create a Product Set.
  4. Set the campaign up.

Set up the Catalog

The product catalog serves as the source for the relevant product and stock details.
To set up a catalog, refer here.

Describe the product using the mandatory fields to set up a catalog. These are: 

  • id - Unique identifier of the product
  • title - Name of the product
  • link - Link of the landing page of the product
  • image_link - Link of the image for the product
  • price - Price of the product

In addition to the above mandatory fields, the catalog needs to have a column that has the status of the stock against each product. 

Do not delete any product from the catalog. Update the stock value to 0 whenever a product has no more stock.

Sample file


Click here to download the sample file. 

Go Back 

Map the Notify me event. 

The Back in Stock message is actually only for those customers who have shown interest in the product by way of clicking Notify me for a product that is out of stock, so an event needs to capture that interest.

This event is mapped in the User actions section; refer here for details.


Go Back 

Create a Product Set

When a customer clicks Notify Me, the details of the product are fetched from the catalog, and both the catalog and the user action are mapped to generate the relevant product set. Click here to understand more about Product Set.

To be effective, limit the lookback period to ensure the relevancy and recency of the product. Remove the purchased products from the product set.

Sample Product Set


Go Back 

Setup Campaign

Create a Campaign after creating the Product Set. Use a periodic campaign for a specific channel or a periodic flow to reach users with multiple communications across channels.

Add JINJA code to fetch the product details from the product set. 

Sample JINJA snippet.

{% if ProductSet.backInStock%}{% for i in ProductSet.backInStock%}{% if i.stock|int > 0 %}{{i.title}}{% else %}MOE_NOT_SEND{% endif %}{% endfor %}{% else %}MOE_NOT_SEND{% endif %}

Fetch only the first product in the product set for push notifications. 

{% if ProductSet.backInStock%}{% for i in ProductSet.backInStock[0:1]%}{% if i.stock|int > 0 %}{{i.title}}{% else %}MOE_NOT_SEND{% endif %}{% endfor %}{% else %}MOE_NOT_SEND{% endif %}

Add the HTML within the for loop to ensure all products are printed, for emails.

{% if ProductSet.backInStock%}{% for i in ProductSet.backInStock%}{% if i.stock|int > 0 %}<HTML>{% else %}MOE_NOT_SEND{% endif %}{% endfor %}{% else %}MOE_NOT_SEND{% endif %}

Since the product set name will be relevant only to your catalog, change the name of the product set in the above snippets accordingly. 



MoEngage cannot ensure displaying either the same product as in the last communication or a new product available in the product set, as these changes are dynamic and depend on the concurrent stock/user event mapping.

Go Back 

Was this article helpful?
0 out of 0 found this helpful