Sub topic 3
Writing a classification description that routes correctly
This chapter assumes you know what an Agentforce agent, a topic, and an action are. It also assumes you can open Agentforce Builder and preview a conversation. Here you learn how to write the field that decides whether a customer request reaches your topic at all: the classification description.
What the classification description does
An Agentforce agent has several topics. When a customer sends a message, the agent's reasoning engine compares the request with the topics and picks the one that fits best. The classification description is the main text it uses for that comparison.
The description is not shown to the customer. Its only job is routing. The instructions you write later in the topic do not take part in the choice. They apply only after the topic has been selected.
This means a topic with excellent instructions and a poor description will still fail. The request never arrives, so the instructions never run.
What a good description contains
A good classification description answers one question: which customer requests belong here? It does this in a sentence or two. Three properties matter most.
- It names the customer intent. Describe what the customer wants, such as "find out where an existing order is". Do not describe the system, such as "order data". The agent matches a customer's words against intent.
- It is specific about the object and the stage. "An existing order" is different from "a new order" or "a returned order". The stage often separates neighboring topics.
- It is written from the request's side. Start from what the customer says or asks. Do not describe what the agent will do, because that belongs in the scope and instructions.
Here is the illustrative topic from the plan:
Topic name: Order Status
Classification description:
Handles customer questions about where an existing order is, when it will arrive, or whether it has shipped.
Scope:
Look up the status of an existing order and explain shipping and delivery information. Does not cancel, change, or refund orders, and does not answer product questions.Notice the split. The description lists three kinds of question: location, arrival time, and shipped state. The scope, covered in the next chapter, states what the topic will and will not do. The description says what to send here. The scope says what happens once it arrives.
Vague and specific descriptions
Compare these two descriptions for the same topic.
| Version | Text | Problem or strength |
|---|---|---|
| Vague | Answers questions about orders. | Matches almost any order message, including cancellations, returns, and billing. |
| Vague | Helps customers. | Matches everything, so it wins or loses unpredictably. |
| Specific | Looks up the status and delivery date of an existing order. | Names the intent (look up) and the stage (existing order). |
| Specific | Handles customer questions about where an existing order is, when it will arrive, or whether it has shipped. | Lists the phrasings customers actually use. |
A vague description is risky because it overlaps with every neighbor. When two topics both look like a plausible match, the agent has little to separate them, and the result can change between conversations.
Describe intents, not keywords
You might be tempted to list words: "order, shipping, tracking, delivery, package". Avoid this as the main approach. The agent reads language semantically, so it does not need an exact word match. A keyword list also pulls in requests you do not want. A customer who writes "I want to return the package" contains "package" but wants a return.
Instead, write the intent in a natural sentence and include a few of the real phrasings inside it. "When it will arrive" and "whether it has shipped" are phrasings. They help the agent recognize variations like "Has my stuff gone out yet?" without a keyword list.
Make neighbors distinct
The description of a topic only works in comparison with the other topics. Read your descriptions side by side. If two could describe the same request, rewrite them until each matches a different intent.
Overlapping:
Topic A description: Answers questions about orders.
Topic B description: Helps customers with order problems.
Distinct:
Topic A description: Looks up the status and delivery date of an existing order.
Topic B description: Starts a return or refund for an order the customer says arrived damaged or incorrect.In the overlapping pair, "order problems" includes "my order is late". That request could fit both topics. In the distinct pair, a late-order question is a status question, and a damaged-item report is a return. Each phrase in the distinct version is tied to a specific customer intent, so a given message has one natural home. The next chapters in this tutorial return to this idea under topic boundaries.
A useful test is to write five sample messages for each topic and ask which topic each message belongs in. If you hesitate on a message, the descriptions overlap there.
Length and level of detail
Keep the description short. One to three sentences usually works. Long descriptions create three problems.
- They start to contain exceptions and rules, which belong in the scope or instructions.
- They increase the chance of accidental overlap with other topics.
- They are harder to review and maintain.
If you find yourself writing "except when" or "but only if" in a description, move that text. Conditions about what the agent does belong in instructions. The description should only say what the request is about.
Common errors
These errors appear often when writing descriptions.
- Describing the agent's behavior. "Provides helpful, friendly answers about orders" says nothing about which requests match. Describe the request.
- Putting rules in the description. "Never share an order without verifying the customer" is an instruction. It does not help routing.
- Using internal jargon. If your team calls a topic "OMS inquiries" but customers never say that, the description will not match their language. Use customer words.
- Covering too much in one topic. A description with six unrelated intents ("orders, billing, accounts, shipping, returns, and warranties") matches everything and competes with every other topic. Split it.
- Leaving two descriptions nearly identical. This causes inconsistent routing. Rewrite so each states a distinct intent.
- Never retesting after edits. Changing one description can change which topic wins for requests that used to route correctly.
Worked example: revising a description
Suppose a retail agent has two topics and customers report that "Where is my refund?" keeps landing in the wrong place.
Starting descriptions:
- Order Status: "Answers questions about orders and their progress."
- Returns and Refunds: "Helps with returns and money back."
The refund question mentions progress ("where is"), so it can go to Order Status. It also concerns money back, so it fits Returns and Refunds. The real intent is checking on a refund the customer already requested, which neither description states clearly.
Revised descriptions:
- Order Status: "Looks up where an existing order is, when it will arrive, or whether it has shipped. Applies to items on their way to the customer."
- Returns and Refunds: "Starts a return or refund, and checks on a refund the customer has already requested, for items the customer has received or wants to send back."
Each description now names its stage. Items on their way go to Order Status. Items already received, or refunds already requested, go to Returns and Refunds. You would still confirm this in the preview with test messages, as the next sections describe.
Check routing in the preview
After writing descriptions, test them in Agentforce Builder.
- Open the preview and send a message that clearly belongs to your topic. Confirm the expected topic is selected.
- Send the same request phrased differently, with no keywords from the description.
- Send a message that belongs to a neighboring topic. Confirm it does not land in yours.
- Send an ambiguous message and note which topic wins. Decide whether that is the result you want, and adjust the wording if not.
- Record each message and result, so you can rerun them after later edits.
A table is a convenient way to keep the record.
| Test message | Expected topic | Actual topic | Action if different |
|---|---|---|---|
| Where is my order 1042? | Order Status | ||
| Has my stuff gone out yet? | Order Status | ||
| The mug arrived broken | Returns and Refunds | ||
| Can I get my money back? | Returns and Refunds |
Where the actual topic differs from the expected one, change the description of the topic that should have won, or the one that wrongly won, and retest the whole table.
Summary of the method
- List the customer intents the topic must handle.
- Write one to three sentences that name those intents, the object, and its stage.
- Compare against every neighboring description and remove overlap.
- Move rules, exceptions, and behavior out of the description.
- Test with varied phrasing and with neighbor requests, then revise.
Exercise
Two topics have these descriptions. Topic A: "Handles questions about accounts." Topic B: "Helps customers who cannot log in or have forgotten a password." A customer writes "I want to change the email address on my account." Which topic is likely to win, and how would you rewrite the descriptions so the routing is clear?
Show answer
Topic A is the likely match, because changing an email address is a question about an account and Topic B names only login and password problems. The risk is that Topic A also matches login requests, since "accounts" is broad. Rewrite them by intent: Topic A, "Updates profile details on an existing account, such as the email address, phone number, or mailing address." Topic B, "Helps customers who cannot sign in, including forgotten passwords and locked accounts." Now each request has one natural home, and you would retest with messages for both.
Exercise
A teammate adds this sentence to a description: "Never discuss an order unless the customer has given their order number." Why is it in the wrong place, and where should it go?
Show answer
It is a rule about agent behavior, not a statement of which requests belong in the topic, so it does not help routing and makes the description longer and more likely to overlap. Move it to the topic's instructions, for example: "Ask the customer for their order number if they have not provided one before describing any order."