Sub topic 11
Choosing the right control for each action
This chapter assumes you can already do the following:
- Tell actions that read data from actions that change it.
- Turn on Require user confirmation for an action in Agent Builder.
- Write topic instructions for a confirmation step.
- Check behavior in conversation preview.
Here you will combine those pieces. For each action, you will decide which controls it needs.
The controls you have
Each control works at a different layer, and each fails in a different way.
| Control | Where it lives | What it enforces | How it fails |
|---|---|---|---|
| Require user confirmation | Action setting in Agent Builder | The platform asks the user before the action runs | Users approve without reading the summary |
| Topic instruction wording | Topic instructions | The agent's reasoning favors summarizing and asking | The agent is a language model, so it may skip the step |
| Permissions and least-privilege design | Profiles, permission sets, the action's own code or Flow | The action cannot touch records or fields it should not | The agent's running user has more access than intended |
| Validation and input limits | Validation rules, Flow decisions, Apex checks | Bad values are rejected whatever the agent sends | Rules do not cover the case you did not foresee |
Confirmation and instructions both depend on the user noticing a problem. Permissions and validation do not. They apply to every call, whether or not anyone is paying attention.
Matching the control to the risk
Two questions place an action on a scale: how much damage a wrong run does, and how easily you can undo it.
- Read-only actions (look up a case, summarize an account). A wrong run costs little. Skip confirmation, because extra prompts make the agent tedious. Still limit what the action returns, since it may expose data.
- Low-impact, easily reversed changes (add a note, change a priority). Consider the confirmation setting alone, or only a short instruction. The decision depends on how likely the agent is to misread the request.
- Significant or hard-to-reverse changes (close a case, change an amount, delete a record). Use the confirmation setting and reinforcing instructions. Add validation and a narrow design as well.
- Actions with outside effects (send an email, issue a refund). You cannot take these back by editing a record. Treat them like the previous group, and add limits on who can trigger them and how often.
Why the setting comes first
Use Require user confirmation as the base layer for any data-changing action. The platform raises the prompt, so it does not rely on the agent remembering to ask. Instructions are a useful addition, because they shape what the agent says in the summary. They cannot replace the setting.
Relying on instructions alone is the most common mistake in this area. A sentence saying "always confirm first" usually works in preview, then fails on an unusual phrasing in production.
Keeping confirmation meaningful
Too many prompts teach users to click through them. Spend confirmation where a mistake would cost something. Then make each prompt specific. The action's input names and descriptions should let the agent state the case and the new value, as in the earlier chapter on designing actions. A prompt that says "Run this action?" gives the user nothing to check.
Prefer narrow actions over broad ones. An action that only changes the Status field is easier to confirm and safer than a generic "update any field" action. A narrow action also limits what a misread request can do.
A worked decision
Suppose a service agent has three actions:
- Get Case Details reads one case. No confirmation. Return only the fields the agent needs.
- Add Case Comment inserts a comment. Reversible, so turn on the confirmation setting and keep the instructions short.
- Update Case Status changes
Status, and closing a case can trigger downstream automation. Turn on the setting. Add the instruction that names the case and new status before asking. Use a validation rule that blocks closing a case that has open child tasks. Give the agent's running user edit access toStatusonly where it needs it.
The validation rule is the part people skip. It still protects you when a user approves a bad prompt.
Verify the combination
Test each layer on its own. In conversation preview, check that the prompt appears and names the right record. Check that declining stops the action. Then try a request that should fail validation, and confirm the agent reports the failure instead of claiming success. Repeat with a vaguely worded request, since that is where instructions are most likely to slip.
Exercise
An agent action called "Delete Draft Quote" removes a quote record permanently. A teammate proposes relying on a topic instruction that says "always ask before deleting" and leaving Require user confirmation off. What would you recommend instead, and why?
Show answer
Turn on Require user confirmation, because the platform then asks every time and does not depend on the agent following wording. Keep the instruction so the summary names the quote being deleted. Because deletion is hard to undo, also restrict who can run the action through permissions, and add a check such as allowing deletion only for quotes in Draft status. Then test approval, declining and a vague request in conversation preview.