Automations
Automations allow you to build powerful, event-driven workflows that respond to billing events, customer actions, and scheduled triggers. From sending dunning emails to syncing data with external systems, automations help you scale your operations without manual intervention.What Are Automations?
Automations are configurable workflows that:- Trigger based on events or schedules
- Evaluate conditions to determine if actions should run
- Execute actions like sending emails, updating records, or calling APIs
- Branch and loop for complex logic
Key Concepts
Triggers
Triggers define when an automation runs:| Type | Description |
|---|---|
| Event | Runs when a specific event occurs |
| Schedule | Runs on a time-based schedule |
| Manual | Runs when triggered via API |
Conditions
Conditions filter whether the automation should continue:Actions
Actions are the operations performed:- Send email
- Send SMS
- Create task
- Update record
- Call webhook
- Retry payment
Steps
Steps are the building blocks combined into a workflow:- Action steps - Execute a single action
- Condition steps - Branch based on logic
- Delay steps - Wait before continuing
- Loop steps - Iterate over collections
Supported Triggers
Event Triggers
| Event | Description |
|---|---|
invoice.issued | Invoice was issued |
invoice.paid | Invoice was paid |
invoice.overdue | Invoice became overdue |
payment.failed | Payment attempt failed |
payment.succeeded | Payment succeeded |
subscription.activated | Subscription became active |
subscription.canceled | Subscription was canceled |
subscription.ending_soon | Subscription ending within X days |
customer.created | New customer created |
credits.depleted | Credit balance reached zero |
usage.threshold_exceeded | Usage exceeded threshold |
Schedule Triggers
| Type | Example |
|---|---|
| Interval | Every 24 hours |
| Cron | 0 9 * * 1 (Mondays at 9 AM) |
| Calendar | First day of month |
Available Actions
Communication
| Action | Description |
|---|---|
send_email | Send templated email |
send_sms | Send SMS message |
send_slack | Post to Slack channel |
send_webhook | Call external webhook |
Billing
| Action | Description |
|---|---|
retry_payment | Retry failed payment |
void_invoice | Void an invoice |
create_credit_note | Generate credit note |
apply_credits | Apply credits to invoice |
Records
| Action | Description |
|---|---|
update_customer | Update customer fields |
add_tag | Add tag to customer |
create_task | Create internal task |
sync_to_crm | Sync data to CRM |
Workflow
| Action | Description |
|---|---|
delay | Wait for duration |
branch | Conditional branching |
loop | Iterate over items |
stop | End workflow |
Creating Automations via Dashboard
Step 1: Create the Automation
- Navigate to Settings → Automations
- Click Create Automation
- Choose how to start:
- From Template: Select a pre-built template (Dunning, Welcome Series, etc.)
- From Scratch: Build a custom automation
Step 2: Configure the Trigger
- Select Trigger Type:
- Event: Runs when something happens (e.g., payment failed)
- Schedule: Runs on a schedule (daily, weekly, etc.)
- Choose the specific event or schedule
- Click Next
Step 3: Add Conditions (Optional)
Filter when the automation should run:- Click Add Condition
- Build your condition:
- Field:
invoice.amount,customer.segment, etc. - Operator: equals, greater than, contains
- Value: The value to compare
- Field:
- Combine multiple conditions with AND/OR
- Click Next
Step 4: Add Actions
- Click Add Action
- Choose action type:
- Send Email: Select template and recipients
- Send SMS: Configure message
- Retry Payment: Attempt payment again
- Update Record: Change customer/subscription fields
- Wait: Delay before next action
- Configure action settings
- Add more actions as needed
Step 5: Test and Activate
- Click Test Automation to run with sample data
- Review the test results
- Click Activate when ready
Example: Payment Dunning Workflow
- Create automation with trigger: Payment Failed
- Add action: Send email (template: “Payment Failed - Gentle Reminder”)
- Add wait: 3 days
- Add condition: If invoice still unpaid
- Add action: Retry payment
- Add action: Send email (template: “Payment Failed - Urgent”)
- Add wait: 7 days
- Add action: Final notice email
- Activate
Managing Automations
View Executions
- Navigate to Automations → [Automation Name]
- Click Executions tab
- See each run with status, trigger details, and results
- Click any execution to see step-by-step log
Pause/Resume
- Find the automation in the list
- Click the toggle to pause or resume
- Paused automations won’t trigger until resumed
Version History
- Open the automation
- Click Versions
- View previous versions
- Restore if needed
Automation Templates
Start with pre-built templates in the dashboard:| Template | Description |
|---|---|
| Payment Dunning | Multi-step sequence for failed payments |
| Welcome Series | Onboarding emails for new customers |
| Renewal Reminder | Notify before subscription renewal |
| Usage Alert | Alert when usage exceeds threshold |
| Win-back Campaign | Re-engage canceled customers |
Quick Start (API)
Example: Payment Failed Dunning
Template Variables
Access data from the trigger context using template syntax:Invoice Variables
Payment Variables
Customer Variables
Automation Templates
Start with pre-built templates:Payment Dunning
Multi-step dunning sequence for failed payments.
Welcome Series
Onboarding email sequence for new customers.
Renewal Reminder
Notify customers before subscription renewal.
Usage Alert
Alert when usage exceeds threshold.
Versioning
Automations support versioning for safe updates:| Version State | Description |
|---|---|
draft | Work in progress, not active |
active | Currently running version |
inactive | Previously active, now disabled |
Version Workflow
Execution Tracking
View Executions
Monitor automation runs at Automations > Executions:- Execution status (success, failed, running)
- Trigger details
- Step-by-step execution log
- Error messages
Execution API
Error Handling
Retry Configuration
Configure automatic retries for failed steps:Fallback Actions
Define fallback actions when steps fail:Best Practices
Start Simple
Begin with single-step automations, then add complexity.
Test Thoroughly
Use draft versions and test data before activating.
Monitor Executions
Regularly review execution logs for failures.
Use Templates
Start from templates and customize as needed.
Use Cases
Dunning Management
Automate payment recovery:- Send email on first failure
- Wait 3 days
- Send second email with payment link
- Wait 5 days
- Retry payment automatically
- Escalate to collections if still unpaid
Subscription Renewal
Notify customers before renewal:- 30 days before: Send renewal reminder
- 7 days before: Send confirmation request
- On renewal: Send receipt
Usage Alerts
Monitor and alert on usage:- Check usage threshold daily
- If exceeded: Send alert to customer
- If > 120%: Notify account manager