Sub topic 4
Defining what the topic does and does not cover
This chapter covers the scope field of an Agentforce topic. It assumes you know what an agent, a topic, and an action are, and that you can open Agentforce Builder and preview a conversation. It also assumes you have already written a classification description, which is covered in the previous chapter.
What scope is for
A topic has two text fields that can look alike. The classification description tells the agent which requests belong to the topic. The scope tells the agent what it may do after the topic is selected. Scope is the topic's job statement and its limits.
A good scope has two parts:
- What the topic will do, stated as verbs a person could observe.
- What the topic will not do, stated plainly.
Here is the scope from the Order Status example:
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.The classification description names customer intents. The scope names the work. Order Status will look up and explain. It will not cancel, change, refund, or answer product questions.
Description versus scope
The two fields are easy to mix up, so compare them side by side.
| Field | Question it answers | Written from the view of | Example fragment |
|---|---|---|---|
| Classification description | Does this request belong here? | The customer's intent | "where an existing order is" |
| Scope | What may the agent do here? | The topic's responsibilities | "Look up the status of an existing order" |
If your scope repeats the description word for word, you have not added information. Use the scope to add the limits the description cannot carry.
Write the "does not" half
Most scope problems come from leaving out the exclusions. Without them, the agent may try to help with a nearby request because it seems reasonable. A customer who asks about order status may also ask to cancel the order. If the scope is silent, the agent may improvise a cancellation answer, even though the topic has no cancel action.
Write exclusions for requests that are likely to arrive in the same conversation. Good candidates are:
- Actions that sound related but need a different topic, such as returns or refunds.
- Questions the topic has no data for, such as product details.
- Changes to records that the topic's actions cannot make.
State each exclusion as a plain "does not" clause. Keep the list short. A scope with twenty exclusions is hard to read and suggests the topic is too broad.
Scope and actions must agree
A scope is a promise, and the topic's actions are what keep it. If the scope says "look up the status of an existing order," the topic needs an action that retrieves order status. If it says the topic does not issue refunds, no refund action should be assigned to it.
Check this in both directions:
- For each verb in the scope, confirm an assigned action supports it.
- For each action assigned to the topic, confirm a verb in the scope covers it.
A mismatch causes confusing behavior. A scope that promises more than the actions can do leads the agent to describe a result it cannot produce. An action with no matching scope text can be used in ways you did not intend.
Check scope with a boundary test
Scope is easiest to judge in the preview. Select the topic, then send three kinds of messages:
- A request squarely inside scope. The agent should handle it.
- A request clearly outside scope, such as "Please cancel my order." The agent should decline or route elsewhere.
- A borderline request, such as "Will this order arrive before my trip, and can you change the address?" The first half is in scope and the second half is not.
For the borderline case, look at whether the agent answers the part it can and says it cannot do the rest. If it attempts both, tighten the exclusion wording. You will do more of this in the testing chapter.
Summary of the habits
- Write the scope as observable verbs.
- State at least the most likely exclusions.
- Keep scope and assigned actions in agreement.
- Test with in-scope, out-of-scope, and mixed requests.
Exercise
A Returns topic has the scope "Helps customers with returns." It has actions to start a return and to check return status. Rewrite the scope so it states what the topic does and does not do, and name one thing you should check against its actions.
Show answer
Example: "Start a return for an item the customer says arrived damaged or incorrect, and report the status of an existing return. Does not check order shipping status, cancel orders, or answer product questions." Check that each verb has an action (starting a return and checking return status are both covered) and that no assigned action, such as a refund-issuing action, falls outside the scope text.
Exercise
In a preview, a customer in the Order Status topic writes "Where is my order, and please cancel it." The agent says it has cancelled the order, though the topic has no cancel action. What is the most likely scope problem, and what is the fix?
Show answer
The scope does not state that the topic does not cancel orders, so the agent tries to help with a nearby request. Add an exclusion such as "Does not cancel, change, or refund orders," then retest. If cancellation must be possible elsewhere, route it to a topic with the proper action.