Sub topic 2
Turning on Require user confirmation
Assume you know Salesforce objects and records, understand Agentforce agents, and have basic Flow or Apex knowledge. This chapter focuses on configuring an action in Agent Builder, not creating the action itself.
Enable the confirmation setting
An agent action is an operation the agent can run. It might call a Flow, an Apex invocable method, or a prompt template. Some actions only read information. Others create, update, or delete records.
For an action that changes data:
- Open the agent in Agent Builder.
- Open the topic that contains the action.
- Select the data-changing action.
- In the action's settings, enable Require user confirmation.
- Save the agent and test the behavior before activating or publishing the change.
When this setting is enabled, the agent should pause before running the action. It should explain the pending operation and ask the user to approve it. The action runs only after a clear approval.
Action: Update Case Status
Require user confirmation: Enabled
Confirmation: “I will set case {!caseId} to {!newStatus}. Should I continue?”The confirmation is useful only when the action's inputs expose meaningful values. A vague message such as “I will update the record” does not tell the user what will change.
Topics and instructions in brief
A topic groups related user requests and the actions that can handle them. Topic instructions describe how the agent should behave while handling those requests. They can establish sequence, limits, and communication rules.
The action setting is attached to one action. Topic instructions apply more broadly to requests handled by that topic. Use the setting for the direct pause before execution. Use instructions to make the expected conversation clear and consistent.
Reinforce confirmation in topic instructions
Add an instruction that names the action, the values to summarize, and the required approval. For example:
Before running Update Case Status, state the case Id and the new status. Ask the user to confirm. Run the action only after a clear yes. If the user declines, changes the request, or does not answer, do not run the action.Keep the instruction consistent with the action setting. If the action changes several fields, require the agent to summarize every important change. Avoid instructions that tell the agent to infer approval from silence.
Exercise
The action requires confirmation, but the topic instruction says to run it immediately. Which behavior should you correct?
Show answer
Correct the conflicting topic instruction. It should require a clear user approval before the action runs.