Skip to Content
DocsWorkflowsConditions

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:

  1. Field — The call data field to evaluate
  2. Operator — How to compare the field value
  3. Value — The value to compare against

Available Fields

FieldTypeDescription
call_durationNumberCall length in seconds
call_statusStringFinal status: completed, failed
sentimentStringAI-detected sentiment: positive, negative, neutral
directionStringCall direction: inbound, outbound
from_numberStringThe originating phone number
to_numberStringThe destination phone number
costNumberProvider cost of the call
agent_nameStringName of the AI agent that handled the call
summaryStringThe AI-generated call summary text
transcriptStringThe full call transcript text

Operators

OperatorWorks WithDescription
equalsAll typesExact match (case-sensitive for strings)
not_equalsAll typesDoes not match
containsStringsField contains the specified text
not_containsStringsField does not contain the specified text
greater_thanNumbersField is greater than the value
less_thanNumbersField is less than the value
starts_withStringsField starts with the specified text
ends_withStringsField ends with the specified text
is_emptyAll typesField has no value or is empty
is_not_emptyAll typesField 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_status equals completed
  • call_duration greater_than 60
  • sentiment equals positive

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

FieldOperatorValue
call_statusequalscompleted

Run only for long calls with negative sentiment

FieldOperatorValue
call_durationgreater_than120
sentimentequalsnegative

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

FieldOperatorValue
directionequalsinbound
from_numberstarts_with+1415

Run only when the transcript mentions a keyword

FieldOperatorValue
transcriptcontainscancel

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.

Last updated on