Home

Abandoned Cart Scenario

Imagine a situation: a customer browses products in an online store and adds them to the cart… but does not place an order. There can be different reasons for that: the customer decided to compare prices on other websites, postponed the purchase, or simply got distracted.

To increase the chances of purchase, it is worth reminding the customer about the abandoned cart. This can be done through a short scenario that automatically sends a reminder email. Here is how to configure such a scenario in the Altcraft Platform.

Step 1. Prepare the Tracking Pixel and Add It to the Website

Suppose the website uses the following mechanics:

  1. The user selects products and adds them to the cart.
  2. Then they open the cart and proceed to paying for the purchase.
  3. After that, they are redirected to a thank-you page.
The abandoned cart reminder will be sent to the customer if they do not complete the purchase and, accordingly, do not reach the thank-you page. A pixel can be used to track visits to specific pages. You can create and configure it in the Pixels section, located in the Weblayer tab.
Read this article to learn more about how to create and set up a tracking pixel.
Once the pixel is ready, select it, click the Get pixel code button, copy the code, and add it to your website.
To record the required events, you should also configure goals for the pixel. In our case, these are:
  • add_to_cart (tracks adding products to the cart; it can be linked, for example, to the Add to cart button);

  • visit_page_thankyou (tracks visits to the thank-you page after purchase).

Step 2. Configure Profile Entry into the Scenario

Now you can move on to creating a scenario. In the corresponding section, click Create and configure the basic settings.
Select the database whose profiles will enter the scenario when the conditions are met. Next, set the re-entry mode, in this case, Disable reentry for already engaged customer profiles. This means that the customer will be able to enter the scenario again only when they are going to make a new purchase after some time.
Next, configure the condition for capturing a profile into the scenario. Add the Pixel activation trigger and select the required pixel, and then check the Filtering by additional target fields box. Specify the selection by goal and choose add_to_cart.
Every scenario contains the Default element, required for importing profiles manually, via API, and when moving from another scenario. This is a system element that cannot be deleted.

Step 3. Configure the Sequence for Customers Who Placed an Order

To check whether the customer has made a purchase, add the Event waiting element (located in the Operators section).
Add a new rule and select the Pixel activation event type. Then choose the required pixel, click Filter by additional target fields, and specify the selection: Goal → is equal to → visit_page_thankyou. Finally, set the waiting period (1 day for this scenario).
Let’s assume that the customer receives bonus points for making a purchase. This requires participation in the loyalty program that has the corresponding triggered promotion configured.
Suppose these conditions are met. In the Actions section, select the Points management element, then choose the required loyalty program and the Accrual operation type. Specify the trigger promotion, select the points, and configure how many points will be accrued to the customer for the purchase. If necessary, you can also specify the points’ activation and expiration date and time.

Step 4. Configure the Sequence for Customers Who Did Not Complete the Purchase

The positive course of events is now configured. Let’s move on to the situation where the customer filled the cart but did not place an order. Here, data about the products in the cart will be transferred to the platform using an API request and then inserted into the email template.

In the Actions section, select API Request. It can be used to get data from an external source and save the HTTP response to the apicontent variable. Information from the request can later be used in the scenario.
Specify the name and authorization type: it can be configured in advance in the SettingsConnections section or by clicking the Add button. Enter the URL where the data about the products in the cart is located; the request type is GET.

For example, the external source can be a JSON file with data on abandoned carts:

{
    "total_carts": 2,
    "carts": [
        {
            "user_id": 101,
            "user_email": "alex@example.com",
            "cart_created_at": "2026-06-25T14:30:00Z",
            "cart_expires_at": "2026-06-27T14:30:00Z",
            "total_amount": "70.00",
            "items": [
                {
                    "product_id": 1,
                    "product_name": "T-Shirt",
                    "product_price": "20.00",
                    "product_quantity": 1,
                    "product_image_url": "https://example.com/pic/jersey.png"
                },
                {
                    "product_id": 2,
                    "product_name": "Hoodie",
                    "product_price": "50.00",
                    "product_quantity": 1,
                    "product_image_url": "https://example.com/pic/hoodie.png"
                }
            ]
        },
        {
            "user_id": 102,
            "user_email": "maria@example.com",
            "cart_created_at": "2026-06-25T12:15:00Z",
            "cart_expires_at": "2026-06-27T12:15:00Z",
            "total_amount": "149.99",
            "items": [
                {
                    "product_id": 5,
                    "product_name": "Sneakers",
                    "product_price": "89.99",
                    "product_quantity": 1,
                    "product_image_url": "https://example.com/pic/sneakers.png"
                },
                {
                    "product_id": 8,
                    "product_name": "Backpack",
                    "product_price": "60.00",
                    "product_quantity": 1,
                    "product_image_url": "https://example.com/pic/backpack.png"
                }
            ]
        }
    ]
}
Activate the Save the http response in {apicontent} field switch at the bottom of the form and enter the name of the field where the response will be saved. This exact name will be used later when inserting the variable into the template. The name can be arbitrary, for example, cart_items.
Specify the required query parameters, for example, the profile id or email, which can be used to find the required cart.
When the API request is configured, click Apply, connect the elements, and save the scenario as a draft.

Step 5. Create the Reminder Email Template

Now all that remains is to send the customer a message about the abandoned cart. Save the scenario for now, then open the Templates section and create a new email template.
The data in the email must update dynamically depending on the recipient. For this, the {apicontent} variable is used. You can add it by selecting ServicesAPI content in the list of variables (</>) or by entering the data manually.
This variable stores the data received using the API request, such as a JSON object with data about the products in the cart:
[
    {
        "product_id": 1,
        "product_name": "T-Shirt",
        "product_price": "20.00",
        "product_quantity": 1,
        "product_image_url": "https://example.com/pic/jersey.png"
    },
    {
        "product_id": 2,
        "product_name": "Hoodie",
        "product_price": "50.00",
        "product_quantity": 1,
        "product_image_url": "https://example.com/pic/hoodie.png"
    }
]
After saving the JSON object to the apicontent field, you will be able to refer to the elements of this object by key, for example {apicontent.cart_items.field_name1}.

If the product data is stored in an array, you will need to iterate over the array to insert it into the template. To do this, use a loop with variables:

Products in the cart:

{for $i $item = apicontent.cart_items}

<p><img src="{$item.product_image_url}"/></p>

<p>Name: {$item.product_name}</p>
<p>Quantity: {$item.product_quantity}</p>
<p>Price: {$item.product_price}</p>

{end}

<!--{unsubscribe} -->
More information about how to use API content in messages can be found in the platform documentation.

Step 6. Check How the Reminder Email Looks

When the apicontent variable is added, the standard message preview will not work. To check how the message looks, it is required to additionally configure the preview window.
Open the preview and click the Configure API content tab at the bottom. Add a JSON object similar to the one you will receive after the API request in the scenario.
Please note: the test product array must be stored in the cart_items field.

Click the check mark so that the field values are inserted into the template.

Save the finished email and return to the scenario. In the Channels section, select the Email element and configure it by selecting the required channel, resource, and message template.
To avoid annoying the subscriber with frequent emails, set a sending policy. It must first be created in the corresponding section located in Settings.
After that, when configuring the mailing in the scenario, click the Limitations tab and select the required sending policy. For example, in this scenario, the abandoned cart reminder will be sent not more often than once every 3 days.

Step 7. Activate the Scenario

The abandoned cart scenario is now ready.

If you wish, you can expand it by using additional elements. For example, assign the customer a discount promo code or send them a selection of related products.
Activate and save the scenario. Its effectiveness can be evaluated later in the Analytics section.

You may be interested

subscription, banner, email

We’ll show you the platform and find a solution tailored to your business goals

Don't forget to subscribe to the blog newsletter

To stay up to date with all the news and read new articles, join the Craft Marketing Telegram channel

subscribe blog img