Sub topic 1
What a topic is and the fields you write
Prerequisites
This chapter assumes you have the following:
- Basic familiarity with Salesforce and Setup.
- A general idea of what an AI agent and a large language model (LLM) are.
- A basic idea of Agentforce agents, topics, and actions.
- Access to Agentforce Builder, where you can open an agent and preview a conversation.
What a topic is
A topic is a unit of work that an Agentforce agent can take on. It groups three things: a description of the kinds of requests it handles, a statement of what it will and will not do, and the instructions the agent follows once the topic is chosen. A topic also has the actions assigned to it. Actions are the things the agent can actually do, such as running a Flow or an Apex method.
Think of a topic as a job description for one area of the conversation. The agent has several of these. For each request, it picks one and then works within it.
The fields you write
You write three pieces of text for each topic. Each one has a different reader and a different job.
| Field | Used for | Question it answers |
|---|---|---|
| Classification description | Choosing the topic | Which requests belong here? |
| Scope | Limiting the topic | What does this topic do, and what does it leave out? |
| Instructions | Shaping behavior | How should the agent act once it is here? |
The classification description works before the topic is selected. The scope and instructions matter after. Keeping that order in mind helps you decide where a given sentence belongs.
An example topic
The example below is illustrative. It shows a classification description and a scope for an order status topic.
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 what each field does:
- The classification description names the customer's intent: where an order is, when it arrives, whether it shipped. It describes requests, not the agent's internal process.
- The scope says what the topic does, then says what it does not do. The exclusions matter. They tell the agent that a cancellation request is not handled here.
Instructions in the topic
Instructions come after selection. They tell the agent how to behave inside the topic. Here is a weak instruction and a stronger one for the same topic.
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.The weak version states a goal but gives you nothing to check. The stronger version is ordered and names behavior you can observe in a test conversation. A later chapter covers instruction style in detail. For now, the point is that instructions describe behavior, and the classification description describes requests.
Common mistakes with the fields
These errors come from putting text in the wrong field.
- Putting behavior rules in the classification description. The agent reads that field to choose a topic, so step-by-step guidance there adds noise to routing.
- Leaving the scope empty or vague. Without exclusions, the topic can drift into requests that belong elsewhere.
- Writing instructions as goals ("be accurate") instead of observable steps.
- Writing a classification description so broad that it matches requests meant for other topics.
Exercise
Exercise
A topic's classification description reads: "Ask for the order number, look it up, and reply in two sentences." Which field is this text better suited to, and what would you write in the classification description instead?
Show answer
The text describes behavior, so it belongs in the instructions. The classification description should describe the requests the topic handles, for example: "Handles customer questions about where an existing order is, when it will arrive, or whether it has shipped."