Prerequisites
Before creating a workflow, you need:Events via /v1/track
Workflows are triggered by events. Send events from your application using
POST /v1/track to create or update contacts and fire the trigger.Email templates
Send Email steps require a saved template. Create your templates before building the workflow.
Creating a workflow
Set the trigger event
Enter the event name that starts this workflow (e.g.,
user.signup, purchase.completed). The trigger event cannot be changed after the workflow is created — choose it carefully.Configure workflow options
- Name — internal label for the workflow
- Description — optional notes
- Allow re-entry — if enabled, a contact can enter the workflow again after completing or exiting a previous run
Add steps
Use the visual editor to add steps to the workflow. Connect steps with transitions to define the execution path. See Step types below.
Step types
Each step in a workflow performs a specific action. Steps are connected by transitions, which can be conditional (for branching) or unconditional.| Step type | Description |
|---|---|
| Send Email | Sends an email to the contact using a specified template. Contact data and execution context are available as template variables. |
| Delay | Pauses the execution for a fixed duration (e.g., 2 hours, 3 days) before proceeding. |
| Wait for Event | Pauses the execution until the contact triggers a specific event. You can set a timeout — if the event is not received within the timeout window, the execution proceeds down the timeout branch. |
| Condition | Evaluates a condition against contact data or event data and routes the execution to a yes or no branch. |
| Webhook | Makes an HTTP POST request to an external URL with the contact and event data as the payload. |
| Update Contact | Updates one or more fields on the contact’s data record mid-execution. |
| Exit | Terminates the execution immediately, optionally with a reason. |
Send Email step
Attach a template to the step. The contact’s data, reserved variables ({{email}}, {{unsubscribeUrl}}, etc.), and the execution context are all available for variable substitution in the template.
The template type determines delivery behavior. A marketing template will not be sent to an unsubscribed contact. A transactional template is always delivered. See Template types.
Delay step
Configure a delay with an amount and unit:Wait for Event step
The execution pauses until the contact fires a specific event. Configure the event name and an optional timeout:- If the event arrives before the timeout, the execution follows the event-received branch.
- If the timeout elapses first, the execution follows the timeout branch.
Condition step
Evaluate a field on the contact or event data using comparison operators:yes branch (condition met) or no branch (condition not met). Use conditions to branch the workflow based on contact properties or engagement behavior.
Webhook step
Sends a POST request to a URL you control. The request body contains the contact and event data at the time of execution. Use this to integrate with external systems or trigger side effects in your application. For the full webhook payload format, see the Webhooks guide.Update Contact step
Modify fields on the contact record from within the workflow. Specify key-value pairs to set:Exit step
Terminates the execution early. Useful for short-circuiting the workflow when a condition means the remaining steps are unnecessary (e.g., the contact has already converted).Managing executions
The Executions tab on a workflow’s detail page shows all active and completed executions with their current status.Execution statuses
| Status | Description |
|---|---|
RUNNING | Actively executing through steps |
WAITING | Paused at a Delay or Wait for Event step |
COMPLETED | Finished all steps normally |
EXITED | Terminated by an Exit step |
FAILED | Stopped due to an error |
CANCELLED | Manually canceled |
Canceling executions
You can cancel a single execution or all active executions for a workflow:- Cancel one execution
- Cancel all executions
Workflow locking
A workflow is locked while it has active executions. You cannot edit the workflow’s steps or transitions while executions are running or waiting. To make changes:- Disable the workflow to stop new executions from starting.
- Either wait for active executions to complete naturally, or cancel all executions to clear them immediately.
- Make your edits, then re-enable the workflow.