Sub topic 12
Common Pitfalls and How to Fix Them
This chapter assumes you can open Agentforce Builder and preview a conversation. It also assumes you know what a topic, an action, and a classification description are. It collects the problems that appear most often when topics misbehave, and gives a fix for each.
How to Diagnose a Misbehaving Topic
Most problems fall into one of two stages. Either the agent picked the wrong topic, or it picked the right topic and then did the wrong thing. Work out which stage failed before you change any wording.
Pitfall 1: Overlapping Topics
Two topics with near-identical descriptions compete for the same request. The agent may pick either one, and the choice can change between runs.
- Symptom: the same utterance lands in different topics on different tries.
- Fix: base each description on a different customer intent, and state what the topic does not do in its scope.
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.Pitfall 2: Vague Wording
Instructions such as "be helpful" or "don't make mistakes" cannot be checked, so you cannot tell whether the agent followed them.
- Symptom: the agent's behavior varies and you cannot say what it should have done.
- Fix: write ordered steps that name behavior you can observe in a test conversation.
Weak:
Be helpful with orders and don't make mistakes.
Stronger:
1. Ask the customer for their order number if they have not provided one.
2. Use the order number to look up the order before describing its status.
3. Give the current status and the expected delivery date in one or two sentences.
4. If the order cannot be found, say so and ask the customer to check the number. Do not guess a status.Pitfall 3: Conflicting Instructions
Two instructions that cannot both be true give the agent no way to choose. Conflicts often appear between agent-level instructions and a topic, or after several people edit the same topic.
- Symptom: the agent follows one rule in some conversations and the other rule in others.
- Fix: read all instructions that apply to the topic together. Keep general rules at the agent level and topic-specific rules in the topic. Delete the rule you do not want.
Pitfall 4: Actions Without Conditions
An instruction that mentions an action but not when to use it leaves the timing to chance. A wrong or misspelled action name has a similar effect.
- Symptom: the agent skips the action, calls it too early, or describes the result without calling it.
- Fix: pair each condition with one expected behavior, and use the exact name of an action assigned to the topic.
If the customer asks for the status of an order, use the Get Order Status action with the order number.
If the customer asks to return an item, tell them you can't process returns in this topic and offer to transfer them to a human agent.Get Order Status is a hypothetical name here. Use the name of your own action.
Pitfall 5: Using Instructions for Rules That Must Always Hold
Instructions guide a language model, so they are not a guarantee. A rule such as "never refund more than the order total" or "only verified customers see account data" needs the same result every time.
- Symptom: the rule works in most test conversations and fails in a few.
- Fix: put the rule in a Flow or Apex action, which runs the same way each time. Keep the instruction short, for example by telling the agent to call that action.
Pitfall 6: Skipping Edge Cases in Testing
Testing only the happy path hides most of these problems.
- Test realistic phrasings, including short and messy ones.
- Test requests that belong to a neighboring topic.
- Test missing input, such as an order number that does not exist.
- Change one thing at a time, then run the same utterances again.
Quick Reference
| Symptom | Likely cause | Fix |
|---|---|---|
| Wrong topic chosen | Overlapping descriptions | Separate by customer intent |
| Topic does things it should not | Missing scope limits | State what it does not do |
| Inconsistent behavior | Vague or conflicting instructions | Write ordered, testable steps |
| Action not called | No condition or wrong name | Pair condition with exact action name |
| Rule fails occasionally | Rule needs certainty | Move it to a Flow or Apex |
Exercise
A customer says "My package never showed up, where is it?" The agent sends this to a topic that starts returns and refunds instead of the order status topic. Which stage failed, and what are two changes you could make?
Show answer
Topic selection failed, because the agent chose the wrong topic. First, rewrite the status topic's classification description to name where an order is and when it will arrive, and rewrite the return topic's description to cover damaged or incorrect items only. Second, add a scope line to the return topic saying it does not look up shipping status.
Exercise
Your instructions say "Never offer a discount over 10%," yet the agent occasionally offers 15%. Why does this happen, and what is the fix?
Show answer
Instructions guide a language model and do not enforce a rule, so some conversations break it. Move the limit into a Flow or Apex action that validates or calculates the discount, and have the instruction tell the agent to use that action.