rank_handoff_reasons
rank_handoff_reasons
Ranks every handoff reason in a date range by the number of conversations, in one call. Each reason has its count, its share, what can fix it, a suggestion, and sample conversation IDs. Use it to pick the handoff reason to work on.
Read-only. The improvement loop uses it when you ask to reduce handoffs.
Example prompts
- “Why does the Agent hand off to human agents? Rank the reasons for the last 30 days.”
- “Which handoff reasons can I fix on the Chat channel this month?”
Parameters
Response
fix_surface says what can fix the reason:
tool,knowledge, orrouting: a change to the AI Agent’s configuration can fix it.systemornone: a configuration change usually can’t fix it. Read thesuggestion.unknown: the cause isn’t known. Read the sample conversations to decide.
conversations counts each conversation with at least one handoff of that reason. A conversation with two reasons counts under both, so the shares can add up to more than 1. share is the share of the conversations with_reason, or null when no conversation has a recorded reason. A handoff that recorded no reason is in no row, so the counts are a lower bound.
To read a sample, the assistant calls get_conversation. To list more conversations for one reason, it calls get_conversations with a handoff reason filter.