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:
- The user selects products and adds them to the cart.
- Then they open the cart and proceed to paying for the purchase.
- After that, they are redirected to a thank-you page.
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
add_to_cart.Step 3. Configure the Sequence for Customers Who Placed an Order
visit_page_thankyou. Finally, set the waiting period (1 day for this scenario).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.
apicontent variable. Information from the request can later be used in the scenario. 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"
}
]
}
]
}
cart_items.id or email, which can be used to find the required cart. Step 5. Create the Reminder Email Template
[
{
"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"
}
]
{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} -->
Step 6. Check How the Reminder Email Looks
cart_items field. Click the check mark so that the field values are inserted into the template.
Step 7. Activate the Scenario
The abandoned cart scenario is now ready.
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






