What are Case Automations?
Case Automations allow you to automatically execute actions when specific conditions are met based on case data changes. This enables powerful workflow automation that reduces manual work and ensures consistent processes.How Automations Work
Automations are triggered by data changes within your case. When data is updated:- The system evaluates each automation’s condition
- If the condition evaluates to
true, the automation is executed - The specified action is performed
Viewing Automations in the Case Interface
When automations run, they appear as events in the case timeline, providing full visibility into automated actions.Timeline Events
Each automation execution creates an event in the timeline showing:- Automation name - The name you configured
- Status - Whether it succeeded or failed
- Timestamp - When the automation ran
- Details - Click the event to view full execution details
Managing Automation Events
You can interact with automation events directly from the timeline: View Details- Click any automation event to see the complete execution details
- View request/response data for HTTP actions
- See error messages if the automation failed
- Click on any automation event (succeeded or failed)
- Use the retry option to re-run the automation
- Useful for recovering from temporary failures or re-sending webhooks
Defining Automations
Each automation in your Case Template is configured with:Automation Properties
Key (required)- Unique identifier for the automation
- Format: lowercase letters, numbers, underscores
- Max 120 characters
- Example:
auto_escalate,send_reminder,update_status
- Display name for the automation
- Shown in logs and audit trails
- Example: “Auto-escalate overdue cases”
- Array of data keys to monitor for changes
- Format:
data.*(e.g.,data.amount,data.approval_status) - When specified, the condition is only evaluated if one of these keys changed
- Improves performance by avoiding unnecessary condition evaluations
- JSON expression that evaluates to true or false
- Uses Penbox expression syntax
- Only evaluated when watched data changes (or on all changes if watch is not specified)
- Supports JSON expression operators with comparison, logical, and existence checks
- The action to perform when the condition is met
- Currently supports HTTP requests (see Action Types below)
Action Types
HTTP Action
Performs an HTTP request to an external system or webhook.- method (required):
GET,POST,PUT,PATCH, orDELETE - url (required): Full URL to send the request to
- headers (optional): Object of HTTP headers
- body (optional): Request body (only for POST, PUT, PATCH)
POST- Create or process dataPUT- Replace dataPATCH- Update dataGET- Retrieve dataDELETE- Remove data
Common Use Cases
Auto-escalate Overdue Cases
Automatically escalate cases that haven’t been updated in a certain timeframe:Update External System
Sync case data to an external CRM or system whenever specific fields change:Webhook for Custom Logic
Send case data to a webhook for custom processing:Advanced Topics
Available Variables
In your automation conditions and action bodies, you can access:{workflow.id}- Case ID{workflow.status}- Current case status{workflow.parent_status}- Parent status (draft, pending, in_progress, closed){data.*}- Any case data fields{_now}- Current timestamp
Error Handling
If an automation action fails:- The error is logged with the automation details
- The case continues to process normally
- No data is lost or rolled back
- Future automations continue to be evaluated
- Use valid URLs and ensure webhook endpoints are stable
- Implement retry logic on your webhook endpoint if needed
- Monitor webhook performance and error rates
Best Practices
Use watch to optimize performance
Use watch to optimize performance
Always specify which data fields trigger your automation. This prevents unnecessary condition evaluations.Good: Use the watch property to monitor specific fieldsBad: Omitting watch when not needed
Keep conditions simple
Keep conditions simple
Complex nested conditions can be harder to understand and debug. Break down complex logic into multiple automations if needed.
Test automations with sample data
Test automations with sample data
Before deploying to production, verify your conditions work with realistic test cases.
Use meaningful automation names
Use meaningful automation names
The name should clearly describe what the automation does.Good: Send approval reminder, Sync to CRMBad: Auto 1, Webhook
Document webhook endpoints
Document webhook endpoints
If using HTTP actions, document what endpoint is called, what headers are required, what the request format is, and what happens on success or failure.
Monitor automation execution
Monitor automation execution
Log automation executions so you can detect failures early, track how often automations run, and optimize or remove unused automations.
Avoid circular automations
Avoid circular automations
Be careful not to create automations that trigger other automations in a loop. Design your workflow to avoid this.