Sub topic 2
Checking That the Right Topic Is Chosen
Assume you know Salesforce Setup, have Agentforce enabled, and have an agent with at least one topic and action. In the Builder preview, test one request at a time. Check the topic before judging the final reply.
Check the selected topic
A topic is a defined area of work, such as Order Status or Returns. The agent selects a topic by comparing the user's message with each topic's description and scope.
Use clear test utterances first, then add natural variations:
Where is my order 00012345?
Can you tell me where order 00012345 is?
I want to return the shoes I bought last week.For each utterance, record the topic you expect. A request about tracking an order should select Order Status, not Returns or a general-help topic.
| Test utterance | Expected topic | Failure to investigate |
|---|---|---|
| Where is my order 00012345? | Order Status | A different topic is selected |
Check action inputs
After confirming the topic, inspect the action the agent selected. An action is an operation the agent can perform, such as looking up an order. Verify that it received the correct values.
For the order-status example, the action should receive 00012345. Check for missing values, altered values, or values copied from earlier turns. If the user gives an order number and the action receives a customer name instead, revise the topic or action instructions.
Use the reasoning trace to debug
The reasoning trace shows the path the agent took through topic selection and action execution. Read it in this order:
- Identify the topic the agent selected.
- Check the reason or matching description shown for that selection.
- Identify the action it chose.
- Compare each action input with the user's words.
- Compare the result with the expected reply.
If the wrong topic is selected, make its description more specific or narrow its scope. If the topic is correct but the input is wrong, clarify the action instructions and required input fields. Reset the preview conversation and run the same utterance again. A fix is confirmed only when the topic, action, inputs, and reply match the test record.
Exercise
The agent selects Returns for “Where is my order 00012345?” What should you inspect first?
Show answer
Inspect the topic descriptions and scope, then revise the wording so Order Status clearly covers shipment tracking.