Introduction
Use the Replenishment campaign to nudge users to buy products with estimated re-stocking periods.
For instance, a shampoo bottle generally needs to be re-stocked every 30 days, and a nudge at around 25-28 days helps remind the customer to purchase another bottle of Shampoo.
library_add_check |
Prerequisites
|
Replenishment Campaign - Set up
To create a Replenishment Campaign:
- Set up the Catalog.
- Map the Purchase event in User Actions.
- Create a Product Set.
- Set the campaign up.
Set up the Catalog
A product catalog serves as the source for the relevant product and stock details. To set up a catalog, refer here.
Let's describe the product using the following mandatory fields to set up a catalog.
- 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, let's add the re-stocking period of a particular product. The re-stock period needs to be in buckets; the number of campaigns would depend on the number of re-stock buckets.
Sample file
Click here to download the sample file.
Map the Purchase event
The Item Purchased event triggers when the user completes the purchase of a product. The product details are mapped in the User Action to enable product set creation for identifying the products for replenishment communication.
Map the events in the User actions section; check here for more details.
Create a Product Set
Map the catalog and user actions after setting them to generate the product set; so that when a customer purchases a product, the product details are fetched from the catalog, and the associated user event helps create the product set. Click here to understand more about the Product Set.
Assuming a product set for products with a re-stock period of 30 days has a communication cycle for users who purchased the product about 28 days ago; it includes all those who bought the product in the last 28 days and excludes those who made purchases in the last 27 days.
Sample Product Set -
Setup Campaign
Create a periodic campaign after creating the Product Set with the Segmentation query to get the customers who purchased a product 28 days ago.
Below are the snippets of the JINJA code referencing the Product Set that helps fetch the product details from the product set.
{% if ProductSet.reStock%}{% for i in ProductSet.reStock%}{% if i.reStock|int == 30 %}{{i.title}}{% else %}MOE_NOT_SEND{% endif %}{% endfor %}{% else %}MOE_NOT_SEND{% endif %}
For Push Notifications, since only the first product in the Product Set has to be fetched, limit the for loop to only the first product.
{% if ProductSet.reStock%}{% for i in ProductSet.reStock[0:1]%}{% if i.reStock|int == 30 %}{{i.title}}{% else %}MOE_NOT_SEND{% endif %}{% endfor %}{% else %}MOE_NOT_SEND{% endif %}
For Emails, since all the products in the product set are to be displayed, add the HTML within the for loop to ensure all products are printed.
{% if ProductSet.reStock%}{% for i in ProductSet.reStock%}{% if i.reStock|int > 0 %}<HTML>{% else %}MOE_NOT_SEND{% endif %}{% endfor %}{% else %}MOE_NOT_SEND{% endif %}
info |
Note
|