Skip to main content

Abandoned Cart Automations

Use a CleverReach automation to remind a customer about products left in a shop cart. The reminder links back to the shop, where the customer can review the cart and complete the order.

The shop remains the source of truth for cart contents and orders. Your integration connects this information to a CleverReach recipient and makes it available to the configured automation.

Automation API access

Managing or triggering automations through the REST API requires the additional oa_thea scope. It is not part of the standard scope presets. Please contact support to have it enabled.

Workflow​

Create an automation for the shop, then trigger it only for carts that are still eligible. Triggering starts the send, so the eligibility check must happen first:

1Create the automation

Create an abandoned cart automation for the shop and save its collection ID.

2Prepare the cart

Associate the cart with a CleverReach recipient and wait in the shop for the configured period.

3Trigger and check

Check the cart and recipient again. Trigger only if no order was placed, the cart still contains products, and the recipient may be contacted.

4Send and recover

CleverReach sends an email showing the cart contents and a recovery link. If the customer clicks the link, the shop opens the matching cart so they can review it and continue to checkout.

Prerequisites​

Connect the customer's CleverReach account through the Authorization Code flow. Use a valid access token for the API requests. Request the Recipients scope (oa_receivers) to access groups, recipients, and orders. Confirm that recipients may be contacted for this purpose and that the shop can provide cart updates and completed-order status.

Who may receive cart reminders

An abandoned cart reminder is a marketing email. Before you trigger it, make sure the recipient may be contacted for this purpose. What is permitted (for example, whether you need explicit consent or whether an existing customer relationship is enough) depends on the data protection and marketing laws of the country where the shop operates and of the countries where its customers are located. Check the current legal requirements for your use case and let the shop decide which recipients qualify.

In CleverReach's own shop integrations, for example, only subscribers and buyers selected in the sync settings receive cart reminders.

To collect subscriber consent, see Double Opt-In.

Create the Automation​

Create an automation from the abandoned cart template:

POST https://rest.cleverreach.com/v3/automation/createfromtemplate/abandonedcart
Authorization: Bearer <access_token>
Content-Type: application/json

{
"name": "Abandoned cart reminder",
"storeid": "15",
"description": "Cart reminders for My Shop",
"source": "My Shop plugin"
}
FieldRequiredDescription
nameYesAutomation name shown in CleverReach.
storeidYesShop ID. Use the same shop ID when triggering the automation.
descriptionNoDescription of the automation.
sourceYesName of the source plugin or shop integration.

The creation endpoint uses storeid; the trigger uses storeId for the same shop ID.

The response contains an automation id and an active status. This abbreviated example shows an inactive automation:

{
"id": "5ecb862c093aa93200000014",
"name": "Abandoned cart reminder",
"active": false
}

Save the ID as the automation collection ID for webhook filtering. The customer configures the email and activates the automation in the automation view in CleverReach. The example response is inactive; the customer must activate it before using the reminder workflow.

Prepare the Cart​

Associate the shop customer with a CleverReach recipient in the chosen group. The trigger accepts the recipient's pool ID or email address and its group ID. See Importing Recipients and Orders for recipient and order synchronization.

Choose which carts qualify and when the waiting period starts or restarts. Track the cart and its last relevant activity in the shop. Once the period has elapsed, check again that the cart contains products, no order has been completed, and the recipient still qualifies for reminders and may be contacted. Skip the trigger if any of these conditions is no longer met.

Manage this delay in the shop; do not add the same delay again in CleverReach. Track each cart's trigger state to avoid sending it more than once.

Check before triggering

Triggering starts the send; an already triggered reminder cannot be cancelled when an order or unsubscribe occurs afterward. The check before triggering does not eliminate the possibility of a change immediately afterward.

Trigger the Automation​

After the waiting period and eligibility check, send the recipient, group, and cart data to the abandoned cart trigger:

POST https://rest.cleverreach.com/v3/trigger/abandonedcart
Authorization: Bearer <access_token>
Content-Type: application/json

{
"poolid": "124454",
"groupid": "512343",
"abandonedCartData": {
"storeId": "15",
"returnUrl": "https://example.com/cart/recovery-token",
"total": 15.98,
"vat": 3.04,
"currency": "EUR",
"cartItems": [
{
"id": "152",
"sku": "SKU-152",
"name": "Example product",
"description": "Example product description",
"amount": 2,
"image": "https://example.com/images/product.png",
"singlePrice": 7.99,
"productUrl": "https://example.com/products/152"
}
]
}
}
FieldRequiredDescription
poolidYesRecipient pool ID or email address.
groupidYesID of the recipient's group.
abandonedCartDataYesCart data as a JSON object.
Cart fieldRequiredDescription
storeIdYesShop ID used when creating the automation.
returnUrlYesLink back to the cart in the shop.
totalNoCart total.
vatNoVAT amount.
currencyNoCurrency code, such as EUR or USD.
cartItemsYesProducts in the cart.

Each item requires an id and name. Optional item data includes sku, description, amount, image, singlePrice, and productUrl.

Trigger Results and Retries​

The trigger expects HTTP 200 for success and returns the result of its internal event call; it does not define a fixed success response body. An invalid recipient returns 404 with the message invalid receiver. Treat any response other than HTTP 200 as a failed trigger.

The endpoint has no idempotency key or documented deduplication. Repeating a request can trigger another event and potentially another reminder. Its internal event delivery also retries non-200 responses up to three times. If a timeout or error leaves the outcome unclear, do not automatically resend: record the uncertain result and reconcile it before any retry. Use your own cart-level tracking to prevent duplicate direct calls, without assuming that CleverReach will suppress duplicates.

Monitor Automation Status​

Register an automation webhook to show whether the customer's automation is active in your plugin. The automation.activated and automation.deactivated events identify the automation by payload.collection_id.

Webhook registration requires the Webhook scope (oa_webhooks). Prepare a public HTTPS endpoint that handles verification and events, then register for the automation collection:

POST https://rest.cleverreach.com/hooks/eventhook
Authorization: Bearer <access_token>
Content-Type: application/json

{
"url": "https://example.com/cleverreach/webhook",
"event": "automation",
"condition": "5ecb862c093aa93200000014",
"verify": "your-verification-token"
}

Set condition to the saved automation collection ID and verify to a token between 10 and 50 characters. A later event notification can look like this:

{
"event": "automation.deactivated",
"condition": "5ecb862c093aa93200000014",
"payload": {
"collection_id": "5ecb862c093aa93200000014"
}
}

Use the collection ID to update the matching automation's status in your plugin. This notification is not the registration response. For verification, response tokens, and event handling, see Configure Webhooks and Automation Events.

In the CleverReach automation view, the customer configures the email to show the cart contents and include the recovery link. Confirm which template fields are available in the configured automation before publishing it.

Generate the recovery link in the shop so it opens the matching cart. The link should be difficult to guess and expire after a defined period; do not expose a raw cart ID as the only protection. When the customer returns, let the shop validate the current cart and handle products that are no longer available or whose prices have changed.

Test and Enable​

Test the full workflow before activating the CleverReach automation:

  • Check that an eligible cart enters once, waits for the intended period, and follows the timer policy when updated.
  • Confirm that a completed order, an emptied cart, an unsubscribe, or a recipient who does not qualify for reminders prevents the trigger. The integration must not attempt to cancel a reminder after triggering it.
  • Test successful responses, invalid recipients, and uncertain timeouts without blindly repeating requests.
  • Check that the reminder reaches the correct recipient and displays the correct products.
  • Follow the recovery link to the intended cart, and test expired or invalid links, changed prices, and unavailable products.
  • Confirm that activation and deactivation events update the correct automation in the plugin.

Enable the automation only after the shop, integration, and CleverReach agree on the cart state throughout the workflow.

Next steps​