Sub topic 3
Topics: the agent's areas of responsibility
This chapter assumes you know basic Salesforce concepts (objects, records, Setup), have a high-level familiarity with Flow or Apex, and have a general idea of what large language models do. It covers what a topic is and what goes into one. The next chapter covers how a request is matched to a topic.
What a topic is
An Agentforce agent does not handle every request with one large set of rules. It splits its work into topics. A topic is an area of responsibility: a group of related requests, plus the guidance and actions the agent needs to handle them.
Think of a support team with separate desks for orders, billing, and technical problems. Each desk has its own rules and its own tools. A topic works the same way. Keeping each area separate gives the agent a smaller, clearer set of choices at any moment, which makes its decisions easier to predict and to debug.
The parts of a topic
A topic is defined by four things:
| Part | What it does |
|---|---|
| Classification description | Tells the agent which requests belong to this topic. |
| Scope | States what the topic does and what it does not do. |
| Instructions | Gives step-by-step guidance for handling requests in the topic. |
| Actions | Lists the things the agent may actually do inside the topic. |
The agent reads these as text. The wording you choose is the main way you control its behavior.
A worked example
This example describes an order support topic. It is plain text, not code you deploy. It shows what you would enter in the topic configuration.
Topic: Order Support
Classification description: Handles customer questions about the status of an existing order, such as where it is or when it will arrive.
Scope: Look up order status and explain it. Does not process returns, refunds, or changes to an order.
Instructions:
- Ask for the order number if the customer has not given one.
- Use the order status action to look up the order before answering.
- If the order cannot be found, say so and do not guess.
Actions: Get Order StatusEach part has a job:
- The classification description is specific. It names the kind of request ("where it is or when it will arrive") instead of saying "anything about orders."
- The scope draws a boundary. Returns and refunds are explicitly excluded, so they should go to a different topic or be declined.
- The instructions tell the agent what to do when information is missing and when a lookup fails. The last instruction ("do not guess") guards against invented answers.
- The action list contains one action, so there is little room for the agent to pick the wrong tool.
How topics fit into the agent
The agent holds many topics. For each request, it works inside one topic at a time and uses only that topic's instructions and actions.
Common errors
- Overlapping descriptions. If two topics both claim "questions about orders," the agent has no clear basis for choosing between them. Give each topic a distinct purpose.
- Missing scope. Without stated limits, the agent may try to handle requests the topic has no actions for.
- Too many actions in one topic. A long action list makes action selection harder. Split the topic if the actions serve different purposes.
- Vague instructions. "Be helpful" gives the agent nothing to act on. Write instructions as concrete conditions and steps, as in the example above.
Exercise
A topic called "Account Help" has the classification description "Handles anything about customer accounts." Another topic called "Billing" has "Handles questions about invoices and payments." Why might the agent have trouble choosing between them, and how would you fix the Account Help description?
Show answer
Billing questions can also be read as account questions, so the two descriptions overlap and give the agent no clear basis for choosing. Fix it by narrowing Account Help to specific requests, for example "Handles changes to account contact details and login problems," and adding a scope line saying it does not handle invoices or payments.