Sub topic 12
Tuning escalation and human handoff
This chapter assumes you can edit topics and instructions in Agentforce Builder. You should also be able to read an escalation rate and a group-by summary, and to open a conversation and its reasoning steps. Escalation is the point where an agent passes a conversation to a human. Tuning it means deciding when that handoff should happen and making sure it goes smoothly.
Why escalation needs tuning
A low escalation rate is not always good, and a high one is not always bad. An agent that never escalates may be trapping customers in loops. An agent that escalates everything is not saving anyone time.
Escalation also differs by cause. Some escalations are correct, such as a customer asking for a person or a refund above the agent's limit. Others are failures, such as the agent not finding an answer it should have found. Your job is to separate the two.
Find where escalations come from
Start with the data. Group escalations by topic to see which topic needs review first. The sample below uses hypothetical session records, not an Agentforce schema.
from collections import Counter
sessions = [
{"id": "s1", "topic": "Order Status", "resolved": True, "escalated": False},
{"id": "s2", "topic": "Returns", "resolved": False, "escalated": True},
{"id": "s3", "topic": "Returns", "resolved": False, "escalated": True},
{"id": "s4", "topic": "Order Status", "resolved": True, "escalated": False},
]
total = len(sessions)
escalation_rate = sum(s["escalated"] for s in sessions) / total
by_topic = Counter(s["topic"] for s in sessions if s["escalated"])
print(f"Escalation rate: {escalation_rate:.0%}")
print("Escalations by topic:", by_topic.most_common())Here half of all sessions escalate, and both escalations come from Returns. Open those conversations and read the reasoning steps. Then label each one as expected or avoidable.
Design the handoff
A good handoff has three parts:
- A clear trigger. State in the topic instruction when to escalate, such as "the customer asks for a human" or "the order lookup finds nothing."
- A fallback for dead ends. Do not leave the agent to improvise when an action returns no result.
- Context for the human. The person who picks up should not have to ask the customer to repeat everything.
The text below shows an instruction that adds a trigger and a fallback.
Ask for the order number if the customer has not given one.
Use the order lookup action to get the status.
If no order is found, say so and offer to connect the customer to a human agent.Common errors
- Escalating too late. The agent repeats "I did not understand" several times before offering a person. Add an instruction to escalate after a failed attempt.
- Escalating too early. Vague wording such as "escalate if the customer seems upset" can trigger on mild frustration. Use specific conditions.
- Treating escalation as a topic mistake. If a returns request lands in the order topic and escalates, the real fix is the topic description, not the escalation rule.
Test the change
Turn each fixed case into a regression test so you can recheck it after later edits.
Test case: Customer asks for a person after a failed lookup
User utterance: I can't find my order and I want to talk to someone.
Expected topic: Order Status
Expected action: order lookup, then handoff
Expected response: Offers to connect the customer to a human agent.After release, compare the escalation rate and the avoidable-escalation count with the values from before. The total rate may stay flat while the mix improves, so check both.
Exercise
An agent's escalation rate drops from 30% to 10% after you edit the instructions. Customer feedback gets worse. What might have happened, and what do you check first?
Show answer
The agent may be holding conversations it should have handed off. Open escalation-worthy conversations that ended without a handoff, and look for repeated failed attempts or customers asking for a person who did not get one. Then add specific escalation triggers and a fallback to the instruction.