Low-stock abandoned cart campaign

Published October 18, 2023
Modules
Difficulty
Powered by
they logo

In the constantly evolving e-commerce landscape, optimizing sales and minimizing shopping cart abandonment rates is crucial. There are several ways to prevent the abandoned cart scenarios. While the classic approach to solving this problem is well known, there is an even more effective strategy - low-stock campaigns.

To keep your potential customers from abandoning their shopping carts, consider implementing a low-stock campaign, which is a comprehensive solution that applies not only to abandoned shopping carts, but also to abandoned pages or abandoned favorite lists.

Here’s how a low-stock campaign strategy unfolds, especially for abandoned shopping carts. When users add products to their shopping carts that either already have low-stock levels or are predicted to have limited availability in the near future, and fail to complete the purchase, you can capitalize on the situation by triggering your low-stock abandoned cart communication.

By promptly informing customers that the products they are at risk of selling out due to declining inventory, you provide them with a compelling reason to complete their purchase. This urgency can become a key element in the decision-making process, potentially leading to higher conversion rates.

The beauty of a low inventory campaign is that it is highly customizable. What constitutes “low inventory” is entirely up to your discretion and tailored to your specific business needs. Whether you have 10 units left or even 1000 , the definition of low inventory can fit perfectly with your inventory management strategy. This flexibility ensures that your campaign can be tailored to different product categories and customer preferences, optimizing its effectiveness.

In this use case you will learn how to create a low-stock campaign for customers with an abandoned shopping cart.

Low stock campaign

Prerequisites


  • Implement a tracking code into your website.
  • Implement the cart.status event, which stores the current status of the basket in the form of an event on the customer’s card. This event must to be sent to Synerise after every change in the cart status.
  • Import product feed into the Synerise catalog.
    Click to see a sample catalog

    Example of a catalog
    Example of a catalog

  • Prepare an email template for Low stock campaign. This template will be used later in the workflow.
    In the template, you can retrieve the event context from the preceding nodes. In this case, you can reuse the context of a product that has been added to the cart, but has not been purchased and is running out of stock. For more information on how to reuse event parameters, check out this article.

Process


In this use case, you will go through the following steps:

  1. Create a product.LowInStock event
  2. Create an aggregate that returns products in a cart
  3. Create a workflow

Create a product.LowInStock event


In this part of the process, add the product.LowInStock event, which will later be generated in the workflow that checks whether the product is low in stock. In addition, this event must include the sku parameter, which contains the SKU of the low-in-stock product which the customer added to the shopping cart.

  1. Go to Data Management icon Data Management > Events > Add event.
  2. In the Name field, enter product.LowInStock
    In the API and SDK, the name parameter is usually called action or action name
  3. Optionally, define a human-friendly display name that will be shown in the Data Managament and Analytics modules.
  4. Optionally, in the Description field, enter the description of the event.
  5. Enable the Make this event available to anonymous profiles without JWT toggle.
  6. Click Apply.
  7. In the list of events, find the event you just created.
  8. On the right side of the screen, click Add property.
  9. In the Source parameter field, enter lowstock_cart. This parameter will be used to save the SKUs of items which are low in stock.
  10. In the Property name field, enter a human-readable label of the property for display in the Synerise platform.
  11. Optionally, in the Description field, you can add an explanation about the purpose of this parameter.
  12. To complete the process, click Save.

Create an aggregate that returns the products in a cart


This aggregate will be used later in the product.LowInStock event to get products a customer added to their cart.

  1. Go to Analytics iconAnalytics > Aggregates > New aggregate.
  2. Enter the name of the aggregate.
  3. As the type of the aggregate, select Last.
  4. From the Choose event dropdown list, select the cart.status event.
  5. As the event parameter, select ItemIds.
  6. Set the period from which the aggregate will analyze the results. In our case, we set the time period to Lifetime.
  7. Save the aggregate.
The view of the configuration of the aggregate
Configuration of the aggregate

Create an aggregate that returns the number of products in a cart


This aggregate will be used in the first workflow to check if a customer has any products in the shopping cart.

  1. Go to Analytics iconAnalytics > Aggregates > New aggregate.
  2. Enter the name of the aggregate.
  3. As the type of the aggregate, select Last.
  4. From the Choose event dropdown list, select the cart.status event.
  5. As the event parameter, select totalQuantity.
  6. Set the period from which the aggregate will analyze the results to Lifetime.
  7. Save the aggregate.
The view of the configuration of the aggregate
Configuration of the aggregate

Create a workflow


In this part of the process, we create a workflow to send an email campaign to customers who have added products to their cart but haven’t completed their purchase. The workflow follows this logic:

  1. Target customers who:
    • Have added products to their cart.
    • Haven’t made a purchase in the last 60 minutes.
    • Have agreed to receive email communications.
  2. If a customer meets all these conditions, we generate a product.LowInStock event. This event contains information about the items in the customer’s cart that are running low in stock.
  3. The workflow then waits for 10 minutes for the event to be generated.
  4. Once the event is generated, the customer receives an email message with details about the products mentioned in the product.LowInStock event.

Configure a trigger


In this part of the process, select the segmentation for which you want to target low-stock campaign.

  1. As the first node of the workflow, add Profile Event.
  2. From Choose event dropdown menu, choose the product.addToCart event.
  3. Confirm by clicking Apply.

Define the Delay node


This node creates an hour’s delay before moving to the next condition of the workflow.

  1. Add the Delay node. In the node settings:
    1. In the Delay field, type 1.
    2. From the dropdown list, choose Hour.
  2. Click Apply.
Configuration of the Delay node`
Configuration of the Delay node

Configure the Profile Filter node


This part of the process defines the conditions that the customer should meet in order to move to the next step of the workflow. If the customer does not meet the defined conditions, the workflow ends for them.

  1. Add the Profile filter node. In the node settings:
    1. Click Choose filter and select the aggregate you created earlier in the process.
    2. From the Choose operator dropdown, choose More than (Number) and type 0 in the empty field.
    3. From the Choose filter dropdown list, select the transaction.charge event.
    4. Change the funnel type from profiles matching to profiles not matching.
    5. Click the calendar icon and set the date/time filter to Last 60 minutes.
    6. From the Choose filter dropdown list, select the newsletter_agreement attribute.
    7. From the Choose operator dropdown, choose Equal (String) and type enabled in the empty field.
  2. Click Apply.
The view of the Profile filter node configuration
Profile filter node configuration

Configure the Generate event node for the Matched path


Before sending the email to the customer, an event must be generated on the customer’s profile. The event must contain the IDs of products that are running low in stock (these are the products that will be sent to the customer in the email).

  1. Add the Generate event node to the Matched path. In the configuration of the node:
    1. In Event name, enter product.LowInStock
      The Label field exists for backwards compatibility. If your integration does not require this parameter, skip it.

    2. In the Body section, use the following Jinjava and modify it to your needs:

      Note: Jinjava inserted in Generate event body must have all empty spaces deleted.

      { 
        "lowstock_cart":  
      "{% set skus = [] %} 
      {% aggregate PRODUCTS-IN-CART %} {# replace PRODUCTS-IN-CART with the ID of the aggregate that returns products in the cart #} 
      {% for items in aggregate_result %} 
      {% do skus.append(items) %} 
      {%endfor%} 
      {% endaggregate %} 
      {% set lowstock = []%} 
      {% for sku in skus %} 
      {% catalogitemv2.CATALOG-NAME(sku) %} {# replace CATALOG-NAME with the name of your feed catalog #} 
      {% set object = catalog_result %} 
      {% if object.get('Quantity')|int < NUMBER %} {# NUMBER defines the amount of products you consider as low in stock #} 
      {% set quantity = object.get('Quantity') %}
      {% do lowstock.append(sku) %} 
      {%else%} 
      {%endif%} 
      {% endcatalogitemv2 %} 
      {%endfor%} 
      {% if lowstock|count==0 %}0{% else %}{{lowstock[0]}}{% endif %}"
      }
              

Result: a product.LowInStock event is generated. Its lowstock_cart parameter contains the ID of a product that is low in stock.

An example of a generated event:

The view of the Profile filter node configuration
Profile filter node configuration

Configure the Event filter node


This filter serves as a security measure to ensure that the product.LowInStock event was generated in the previous step.

  1. Add the Event filter node. In the configuration of the node:
    1. Set Check to for period of time.
    2. Define the time range to 10 minute.
    3. From the Choose event dropdown list, select the product.LowInStock event.
    4. As the event parameter, select lowstock_cart.
    5. From the Choose operator dropdown list, select Regular expression.
    6. In the text field, type .
      Note: This regular expression is necessary to exclude product.LowInStock events with the empty value of the lowstock_cart parameter.
  2. Confirm by clicking Apply.
The final configuration of the workflow
The final configuration of the workflow

If an event was not generated for a customer, then the workflow ends for this customer. If the event is generated, then the next step is sending an email to the customer.

Configure the Send email node


In this part of the process, send email communication to customers for whom the product.LowInStock event was generated. The email should contain the products returned in the event.

  1. Add the Send Email node and open its settings.
  2. In the Sender details section, choose the email account from which the email is sent.
  3. In the Content section, select the template that you prepared as a part of the prerequisites.
  4. Optional: In the UTM & URL parameters section, define the UTM parameters added to the links included in the email.
  5. Optional: In the Additional parameters section, describe the campaign with additional parameters.
  6. Click Apply.

Add final settings to your workflow


  1. Add the End nodes.
  2. Launch the workflow by clicking Save&Run.
The final configuration of the workflow
The final configuration of the workflow

Check the use case set up on the Synerise Demo workspace


You can check the configuration of each step from this use case in our Synerise Demo workspace:

  • Aggregate that returns the itemIds of products in the shopping cart for each customer.
  • Aggregate that returns the total quantity of products in the shopping cart for each customer.
  • Workflow
  • Catalog

Read more


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker