Sub topic 3
Keeping Neighboring Topics Distinct
Assume you know how to create topics and actions in Agentforce Builder. This chapter focuses on routing, instruction scope, and testing.
Keep neighboring topics distinct
A topic should represent one customer intent. If two topics can handle the same request, the agent may select either one. Write descriptions around observable outcomes, not broad objects such as “orders.”
| Topic | Classification description |
|---|---|
| Order status | Looks up the status and delivery date of an existing order. |
| Returns | Starts a return for an item that is damaged, incorrect, or unwanted. |
The scope should reinforce the boundary. The Order status topic can explain shipping information, but it should not cancel, return, or refund an order.
Choose the right instruction level
Put a rule in agent-level instructions when it applies across topics. Examples include using a respectful tone, protecting personal data, and transferring the conversation when the customer requests a human.
Put a rule in a topic instruction when it applies only after that topic is selected. For example, the Order status topic might say to ask for an order number, use the lookup action, and report the delivery date.
Use Flow or Apex for deterministic rules
Instructions guide language behavior, but they do not guarantee calculations, validation, or record updates. Use a Flow or Apex action when the result must follow fixed logic, such as checking eligibility, calculating a refund, enforcing permissions, or updating an order. Let the topic instruction state when to call the action and how to explain its result.
Test and refine the wording
Test direct, vague, and boundary utterances:
- “Where is order 1042?”
- “My order arrived damaged.”
- “Can I change my shipping address?”
- “What products do you sell?”
Record the selected topic, action calls, and response. If “My order arrived damaged” selects Order status, narrow that description and add the damaged-item case to Returns.
Common pitfalls and fixes
- Overlapping descriptions: Describe the customer’s goal, not merely the shared object.
- Vague instructions: Replace “be helpful” with ordered, observable steps.
- Conflicting rules: Keep one authoritative rule at the appropriate level.
- Missing boundaries: State what the topic does not handle and where to transfer the request.
Exercise
A topic says “Handles all order questions.” What is the main problem, and how would you revise it?
Show answer
It overlaps with status, returns, and product topics. Revise it to name one intent, such as “Looks up the status and delivery date of an existing order.”