Sub topic 4
Choosing metrics that fit your agent
This chapter assumes you can build or edit a simple agent in Agentforce Builder. It also assumes you know what topics, actions, and instructions are, and that you can read percentages and group-by counts. A metric is a number that summarizes how the agent behaves across many conversations. The right metrics depend on what the agent is for.
Start from the agent's purpose
Write down the job in one sentence before you pick any number. A service agent that answers order questions exists to resolve them without a human. A sales agent that qualifies leads exists to pass good leads to a rep. The first agent should be judged on resolution. The second should be judged on handoff quality. Using the wrong yardstick makes a good agent look bad, or a bad one look good.
Common metrics
| Metric | What it tells you | Watch out for |
|---|---|---|
| Resolution rate | Share of sessions where the customer's need was met | Define "resolved" first. A customer who gives up looks the same as one who is satisfied |
| Escalation rate | Share of sessions handed to a human | A high rate can mean a weak agent. A low rate can mean customers are trapped |
| Escalations by topic | Which topic sends the most work to humans | Compare against how often each topic occurs |
| Feedback signals | Thumbs up or down and comments from users | Few users respond, so the sample is biased |
| Action success rate | Share of action calls that return a usable result | A successful call can still return the wrong data |
Compute the numbers from session records
Suppose you export reviewed sessions. The field names below are illustrative, not an Agentforce schema.
from collections import Counter
# Hypothetical export of reviewed sessions. Field names are illustrative,
# not an Agentforce schema.
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)
resolution_rate = sum(s["resolved"] for s in sessions) / total
escalation_rate = sum(s["escalated"] for s in sessions) / total
escalations_by_topic = Counter(s["topic"] for s in sessions if s["escalated"])
print(f"Resolution rate: {resolution_rate:.0%}")
print(f"Escalation rate: {escalation_rate:.0%}")
print("Escalations by topic:", escalations_by_topic.most_common())The output is a 50% resolution rate, a 50% escalation rate, and [('Returns', 2)]. The overall numbers are mediocre, but the group-by shows where the problem sits. Both escalations come from Returns, so review that topic first.
Pair metrics so one cannot be gamed
Any single metric can be improved in a harmful way. If you only chase a low escalation rate, the agent may refuse to hand off. If you only chase resolution, it may close sessions early. Pair them. Read resolution together with feedback, and escalation together with the reason for it.
Set a baseline and a threshold
Record each metric before you change anything. Later chapters compare against this baseline to confirm that a release helped. Also note the sample size. Four sessions, as above, only demonstrate the method. Rates from a few dozen sessions can swing widely, so wait for more data before acting on a small shift.
Exercise
A returns agent shows a 5% escalation rate and a 90% thumbs-down rate among users who gave feedback. Is the agent healthy? Name two things you would check.
Show answer
Not necessarily. The low escalation rate may mean customers cannot reach a human, and the feedback signals real dissatisfaction. Check how many sessions were actually resolved, and read a sample of conversations that ended without escalation. Also check how many users left feedback, since a small sample can mislead.