Sub topic 6
Adding and configuring a standard action in Agentforce Builder
This chapter shows how to add a standard action to a topic in Agentforce Builder and configure it. It assumes you know the Salesforce data model (objects, fields, records), can move around Setup, and understand what topics, instructions, and action inputs and outputs are from earlier chapters. You also need a permission set that lets you create and edit agents.
What you are doing in Builder
A standard action is a prebuilt capability that Salesforce supplies. When you add one to a topic, you do not write the action. You attach it to the topic, then adjust the text and settings that tell the agent when to use it and how to fill its inputs.
Three pieces work together at runtime:
- The topic's classification description decides whether the agent enters the topic.
- The topic's instructions say how to behave once inside it.
- The action's name, description, and input descriptions let the agent decide whether to call the action and what values to pass.
Most configuration errors come from weak text in one of these three places. Changing the wrong one is a common mistake.
Menu labels vary a little between releases. The flow stays the same, so look for the equivalent control if a label differs in your org.
Step 1: Open the topic
- In Setup, search for Agentforce Agents and open your agent in Agentforce Builder.
- Select the topic that should own the action. If you have no suitable topic, create one first and write its classification description and instructions.
- Open the topic's Actions section.
Put an action in the topic whose job it serves. An action in the wrong topic is only available when the agent is in that topic, so the agent may never see it when it needs it.
Step 2: Add the standard action
Standard actions live in the asset library. Select the option to add an action from the library, then choose from the list. Typical entries include Identify Record by Name, Query Records, Get Record Details, Summarize Record, Create Record, Update Record, Answer Questions with Knowledge, and the email drafting actions.
After you pick one, Builder adds a copy of the action to the topic. This has two consequences:
- Edits to the copy affect only this topic. Another topic that uses the same standard action keeps its own settings.
- The same standard action can appear in several topics with different descriptions.
If an action you expect is missing, check that the feature it depends on is enabled in your org. Knowledge actions, for example, need Salesforce Knowledge set up. Also check that your user can see the object involved.
Step 3: Edit the action's text
Each action has fields the agent reads when it chooses what to call. Treat them as part of the prompt.
| Field | What the agent uses it for | What to write |
|---|---|---|
| Name | Identifying the action | A short verb phrase that reflects its purpose in this topic |
| Instructions | Deciding whether this action fits the user's request | One or two sentences: what it does and when to use it |
| Input description | Deciding what value to put in each input | The meaning of the value, its format, and where it comes from |
| Output description | Deciding how to use the result in later steps | What the value represents, so a later step can reuse it |
A weak description for Query Records is "Gets records." A stronger one is "Finds Case records for an account. Use when the user asks about open or recent cases. Requires the account's record ID from Identify Record by Name."
Mention prerequisites in the description. An action that needs a record ID should say so, because that tells the agent to run a lookup first.
Step 4: Configure inputs and outputs
For each input, you choose how its value is supplied. The common options are:
- The agent collects the value from the user's message (slot filling). If the value is missing, the agent asks.
- The value comes from an earlier action's output or a variable. This is how you chain actions without asking the user to repeat anything.
- A fixed value that you set in the configuration.
Mark an input as required when the action cannot run without it. Mark it as something the user must supply only if the user really is the source. Record IDs, for example, should come from a lookup, not from the user.
Outputs have one more setting that matters: whether the agent may show the value to the user. Keep an output hidden when it is only an internal handoff, such as a record ID. Show outputs the user asked for.
Step 5: Name the action in the topic instructions
Adding an action makes it available. It does not make the agent use it correctly. Instructions control order, confirmation, and what to do on failure. Refer to actions by the exact names you gave them.
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 run Identify Record by Name, then use the result for any later step.
2. Use Summarize Record when the user asks for an overview of an account.
3. Before running Update 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.Each line does a specific job:
- Line 1 sets an order and passes data forward.
- Line 2 maps a kind of request to one action, which reduces wrong picks between similar actions.
- Line 3 adds a confirmation step before a change.
- Line 4 defines behavior when a lookup returns zero or several matches.
If you rename an action later, update every instruction that mentions it. A stale name leaves the agent with an instruction it cannot match to anything.
Step 6: Save and test
Save the topic and use the preview panel to run a conversation. Check three things:
- Did the agent enter the right topic?
- Did it call the action you expected, in the right order?
- Were the input values correct?
The preview shows which actions ran and what they returned. A later chapter covers this inspection in detail. For now, change one setting at a time and retest, so you know which edit changed the behavior.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| The agent never calls the action | The topic is not selected, or the action description does not match the request | Improve the classification description and the action instructions |
| The agent asks for a record ID | The input is set to collect from the user | Source it from a lookup action's output |
| The agent calls a similar action instead | Two descriptions overlap | Make each description say when not to use it, or add a mapping line in the instructions |
| The action fails for one user but works for you | The user lacks object or field access | Check their permission sets, because actions run with that user's access |
| The agent updates a record without asking | No confirmation instruction | Add a confirm step before the change action |
| The action is not in the library | The supporting feature is not enabled | Enable it in Setup, then refresh Builder |
Edge cases
- Many actions in one topic make selection less reliable. If a topic grows past a handful of actions, consider splitting it into two topics with narrower scopes.
- A copy of an action keeps its own settings, so fixing a description in one topic does not fix it in another. Update each copy.
- Fixed values are easy to forget. If an action behaves oddly for every request, check whether an input has a fixed value you set during testing.
Exercise
Your agent runs Update Record on an account, but it asks the user to type the account's record ID. What two changes in Builder would stop this, and why?
Show answer
First, change the record ID input so its value comes from the output of Identify Record by Name, not from the user's message. Second, add a topic instruction that says to run Identify Record by Name first and use its result in later steps. The input setting supplies the data, and the instruction sets the order, so the agent finds the record itself and never has to ask.
Exercise
You added Summarize Record to two topics. You improved its description in the Account Support topic, but the Sales Coaching topic still picks the wrong action. Why, and what do you do?
Show answer
Adding a standard action to a topic creates a separate copy with its own settings. The edit in Account Support does not change the copy in Sales Coaching. Open the Sales Coaching topic and update the description there, then retest.