Create an abandoned cart trigger
POST /automations/{automationUuid}/automation_triggers/abandoned_cart
/automations/{automationUuid}/automation_triggers/abandoned_cartStarts the automation for a shopper whose cart in a store has not been modified for the chosen waiting time, optionally only when the cart contains (or, with exclude, does not contain) certain products or categories.
When to use: To send a cart-recovery email or SMS to shoppers who added products to a cart and never placed the order.
When not to use: For an order that was placed but not paid, use create_trigger_payment_reminder. To react when an order is paid, use create_trigger_order_paid (or create_trigger_buy_a_product for certain products). For a message weeks after buying, use create_trigger_time_since_last_purchase.
Side effects: Known limit: the scheduled check only looks at carts last modified within the previous 2 hours, so a waiting time above 2 hours matches no cart and the trigger never fires; the wait counts from the cart's last change, not from its creation. The run is cancelled automatically if the order is processed or paid first. The cart is attached to the run so emails can use its data, and it must belong to a customer linked to a contact of the audience. Works only while the automation is active and the trigger is enabled, and only for contacts with a confirmed subscription. A contact that is already running through the automation is not started again; after finishing, it can enter again only if workflow_repeat is true and 24 hours have passed.
Permissions: Requires the author role or higher, or the marketing.automations.write capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the automation, as returned by list_automations.
The new AutomationTrigger resource
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://api.easymailing.com/automations/0df14405-90ff-4287-b3e4-ef088901ee6f/automation_triggers/abandoned_cart" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "store": "/entity/1", "delay_value": 0, "delay_unit": "minute", "condition": "any.product", "products": [ {} ], "categories": [ {} ], "exclude": true, "workflow_repeat": true }'{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "automation": "/entity/1", "trigger_type": "trigger.admin.manual", "active": true, "workflow_repeat": true, "trigger": null, "count_automation_queues": 0, "count_completed_automation_queues": 0, "count_queued_automation_queues": 0, "count_canceled_automation_queues": 0}