Set up handoff destinations for your agent to route calls during conversations.
X-
prefix.abc123
).
$variables
in the SIP header values for dynamic data. Example:
X-Caller-ID: $caller_id
Handoff reason and utterance
conv.handoff()
helper now accept two optional, structured fields:Field | Purpose | Example |
---|---|---|
reason | Machine-readable code explaining why the call is being escalated (e.g. policy_violation , needs_human , no_availability ). Surfaces in Conversation Review and the Conversations API. | policy_violation |
utterance | A short sentence the agent should speak before transfer begins. Logged alongside the handoff so QA can hear exactly what callers were told. | ”Let me transfer you to a specialist who can help.” |
conv.handoff(reason="...", utterance="...")
to escalate programmatically.handoff
object for BI dashboards or CRM routing.https://your-polyai-instance-url/voice/call
transfer_call
functionFeature | Call Handoff (UI-based) | transfer_call (code-based) |
---|---|---|
Ease of setup | UI form | — Requires Python editing |
Works in flow builder | ||
Works in Function Editor | — | |
Dynamic routing logic | — | Full control |
Supports custom metrics | — | |
Supports soft-handoff | — | |
Best for static SIP integration | — | |
Best for dynamic integrations | — | (e.g. Zendesk) |
transfer_call
in a function, it overrides any configured Call Handoff in the UI.Call Handoff
if:
transfer_call
if: