Sub topic 6
Adding and configuring a standard action in Agentforce Builder
This chapter assumes you know what a topic is, what an action's inputs and outputs are, and which standard actions exist. It also assumes you can reach Setup and have a permission set that allows you to edit agents. Button labels in Agentforce Builder change between releases, so look for the nearest equivalent if a label differs.
The workflow
You add an action to a topic, not to the agent as a whole. The agent can only call actions that belong to the topic it has selected for the current request.
Add the action
- In Setup, search for Agentforce Agents and open your agent in Agentforce Builder.
- Select the topic that should own the capability, for example Account Support.
- In the topic's Actions section, choose to add an action.
- Pick a standard action from the list, such as Identify Record by Name, Summarize Record, or Update Record.
- Give the action a clear name and description, then save it.
The description matters. The agent reads it, along with the topic instructions, to decide whether the action fits a request. A vague description such as "Gets data" makes the action easy to skip or misuse.
Configure inputs and outputs
Each action shows its inputs and outputs. For each input you choose how the value is supplied:
- Required. The agent must have a value before it runs the action. If the user has not given one, the agent asks.
- Collect from the user. The agent fills the input from the conversation. This is slot filling.
- Taken from an earlier step. A later action can use the output of an earlier one, such as a record ID.
For each output, decide whether the agent may show it to the user or should keep it internal. Hiding fields the user does not need reduces noise and exposure.
Tell the topic how to use the action
Adding the action only makes it available. The topic instructions control when and in what order it runs, and when to confirm with the user.
Topic: Account Support
Classification description:
Handle questions about a customer's account, such as looking up an account, summarizing it, or updating basic fields.
Instructions:
1. When the user names an account, first find the account record, then use the result for any later step.
2. Use the summary action when the user asks for an overview of an account.
3. Before updating a record, restate the field and the new value and ask the user to confirm.
4. If you cannot find exactly one matching record, ask the user to clarify instead of guessing.Instruction 1 makes the lookup output (the record) the input for later steps. Instruction 3 puts a confirmation in front of the one action that changes data.
Common errors
| Symptom | Likely cause |
|---|---|
| The agent never calls the action | The description is vague, or the instructions never say when to use it |
| The agent asks for an ID the user cannot know | The ID input is set to be collected from the user, not taken from a lookup output |
| The action is not available in a topic | It was added to a different topic |
| The action fails for one user only | That user lacks object or field access |
Exercise
Exercise
You added Update Record to the Account Support topic. The agent asks the user for the account's 18-character ID instead of finding the account by name. What two changes would you consider?
Show answer
First, add Identify Record by Name to the same topic. Second, add a topic instruction to find the account first and use that result for later steps. You can also check that the Update Record input for the record ID is taken from the lookup output and not collected from the user.