ESCALATE when an agent cannot safely or confidently continue execution and requires human intervention. Escalation transfers the conversation to a human operator or handling system, ensuring continuity while preventing incorrect or risky automated responses.
Unlike agent-to-agent routing (HANDOFF / DELEGATE), escalation is specifically designed for human involvement and should not be modeled as a handoff to a human agent.
When to use escalation
Typical scenarios include:- User frustration
- Customer complaints
- Policy validation requirements
- System failures
- Repeated routing failures
- High-risk or high-value operations
How escalation works
- Agent evaluates escalation triggers.
- When a trigger condition is met:
- A new task is created in the Inbox for a human agent to review and proceed.
- Agent execution is suspended.
- A transfer payload is constructed from:
context_for_humanrouting.metadata- any provider-specific routing fields.
- The payload is sent to the configured human agent provider.
- A human agent reviews and completes the task.
- After the human interaction completes, the configured
on_human_completeactions determine whether the workflow resumes, hands off to another agent, or completes.
- Triggers: Each trigger defines a condition under which the flow escalates to a human, along with metadata used to prioritize and route the escalation.
- Context for Human: Lets the flow designer specify which context variables are passed to the human agent when a conversation is escalated.
- On Human Complete: Defines handler actions the agent should take after a human agent resolves the escalated issue (e.g., resuming the flow, updating variables).
- Routing: Routing controls where an escalated conversation is delivered and how it is presented once it reaches a human agent desktop.
-
Voice Settings: Voice Settings govern how the active call leg is handed off when the escalation routes over a voice channel. It is only relevant for voice interactions.
-
Voice Settings: Voice Settings govern how the active call leg is handed off when the escalation routes over a voice channel. It is only relevant for voice interactions.
DSL configuration
Trigger properties
Priority levels
Context for human
Thecontext_for_human block defines what data is sent to the human agent. This ensures the human agent has full context without asking the user to repeat information.
Structured context
Routing configuration
Controls how escalation is routed to the human system.- Use
context_for_humanfor passing existing session variables to agents. - Use
routing.metadatafor additional information like computed values, routing hints, summaries, that improves the human agent’s context or routing abilities.
Metadata propagation
During an escalation, metadata is propagated differently depending on the channel: Voice channels(SIP): Metadata configured in the ESCALATE block is automatically converted into SIP headers and sent to the receiving voice platform during the transfer. You can also use routing.voice.sip_headers to define additional custom SIP headers or override the header mapping when needed. Digital channels: Metadata is forwarded to the receiving desktop or contact-center platform as key-value pairs through the provider’s handoff API or WebSocket connection. The exact format depends on the integration and the capabilities of the receiving platform.Post-completion behavior
Defines what happens after the human agent completes the task.Examples
Escalation from supervisor
Escalation via ON_ERROR
THEN: ESCALATE triggers the escalation flow after retry attempts are exhausted.