Conditions
Conditions are optional filters that control whether a workflow’s actions should run for a given call. If all conditions pass, the actions execute. If any condition fails, the entire workflow is skipped for that call.
If a workflow has no conditions, it runs for every call that matches its trigger and agent assignment.
Adding Conditions
In the workflow editor, click Add Condition to create a new condition rule. Each condition has three parts:
- Field — The call data field to evaluate
- Operator — How to compare the field value
- Value — The value to compare against
Available Fields
| Field | Type | Description |
|---|---|---|
call_duration | Number | Call length in seconds |
call_status | String | Final status: completed, failed |
sentiment | String | AI-detected sentiment: positive, negative, neutral |
direction | String | Call direction: inbound, outbound |
from_number | String | The originating phone number |
to_number | String | The destination phone number |
cost | Number | Provider cost of the call |
agent_name | String | Name of the AI agent that handled the call |
summary | String | The AI-generated call summary text |
transcript | String | The full call transcript text |
Operators
| Operator | Works With | Description |
|---|---|---|
equals | All types | Exact match (case-sensitive for strings) |
not_equals | All types | Does not match |
contains | Strings | Field contains the specified text |
not_contains | Strings | Field does not contain the specified text |
greater_than | Numbers | Field is greater than the value |
less_than | Numbers | Field is less than the value |
starts_with | Strings | Field starts with the specified text |
ends_with | Strings | Field ends with the specified text |
is_empty | All types | Field has no value or is empty |
is_not_empty | All types | Field has a value |
Multiple Conditions (AND Logic)
When you add more than one condition, they are combined with AND logic. This means all conditions must be true for the workflow to run.
For example, if you set:
call_statusequalscompletedcall_durationgreater_than60sentimentequalspositive
The workflow will only run for completed calls that lasted more than 60 seconds and had positive sentiment. If any one of those conditions is false, the workflow is skipped.
There is no OR logic between conditions. If you need OR behavior, create separate workflows — one for each condition set — with the same actions.
Examples
Run only for successful calls
| Field | Operator | Value |
|---|---|---|
call_status | equals | completed |
Run only for long calls with negative sentiment
| Field | Operator | Value |
|---|---|---|
call_duration | greater_than | 120 |
sentiment | equals | negative |
This is useful for alerting your team when a caller is unhappy during a lengthy conversation that likely involved a significant issue.
Run only for inbound calls from a specific area code
| Field | Operator | Value |
|---|---|---|
direction | equals | inbound |
from_number | starts_with | +1415 |
Run only when the transcript mentions a keyword
| Field | Operator | Value |
|---|---|---|
transcript | contains | cancel |
This could trigger a retention workflow when callers mention cancellation.
Use the summary field instead of transcript for keyword matching when possible. Summaries are shorter and more focused, which reduces false positives from casual mentions in long conversations.
Debugging Conditions
If a workflow is not running when you expect it to, check the Execution Log. It shows whether the workflow was skipped due to a condition not being met, and which specific condition failed. This makes it straightforward to identify and fix filtering issues.