Sub topic 8
What the Confirmation Conversation Looks Like
This chapter assumes you know what an Agentforce agent is, how Agent Builder is used, and what a Flow or an Apex invocable method does. You have already seen why data-changing actions should ask first and where the "Require user confirmation" setting lives. Here you will look at the conversation that results: what the user sees, where each part of the message comes from, and how the exchange behaves when users don't answer neatly.
The four beats of a confirmation
A confirmation conversation has four beats:
- Request. The user asks for something that maps to a data-changing action, such as "Close case 5001R00000AbCdE."
- Summary. The agent states what it is about to do, naming the record and the new value.
- Question. The agent asks the user to approve.
- Outcome. If the user agrees, the action runs and the agent reports the result. If the user declines or says nothing clear, the action does not run.
The key rule is that the action runs only after a clear yes. Everything else, including silence, ends without a data change.
Where the summary comes from
The agent does not have a stored message for each action. It builds the summary from three sources:
- The user's request, which supplies the values.
- The action's definition, meaning its name, description, and input labels and descriptions.
- The topic instructions, which can say how the confirmation should be phrased.
This is why the earlier chapter on action design matters. Take the UpdateCaseStatusAction class from the spine. Its inputs are labeled Case Id and New Status, and the descriptions say "The Id of the case to update" and "The new value for the Status field, for example Closed." The method description says "Changes the Status field of one case. This modifies data." From those, the agent can write:
I will set the status of case 5001R00000AbCdE to Closed. Do you want me to go ahead?If the labels were Input 1 and Input 2, the agent would have less to work with. It might produce something vague like "I will run the action with the values you gave," and the user could not tell what will change.
What a good summary contains
A summary is useful when the user could catch a mistake from it alone. Check each summary for these four items:
| Element | Example | What goes wrong without it |
|---|---|---|
| The operation | "set the status" | The user can't tell whether the agent will update, create or delete. |
| The target record | "case 5001R00000AbCdE" | The user can't spot a wrong record. |
| The new value | "to Closed" | The user can't spot a misheard value. |
| A direct question | "Do you want me to go ahead?" | The user may not realize the agent is waiting. |
An Id such as 5001R00000AbCdE is accurate but hard for people to check. If the agent can also show the case number or subject, the user can verify more easily. That depends on whether the action's inputs or a preceding lookup action made that data available. If the user typed an Id, the Id is what the agent knows.
The setting and the instructions produce slightly different conversations
Two mechanisms can create the pause, and the transcripts differ in feel.
With Require user confirmation enabled on the action, the platform stops before executing the action and asks the user to approve. This is the stronger control because it sits at the action level, outside the model's reasoning about what to say. The exact wording and presentation of the prompt depend on the Agentforce version and channel, so check it in your own org instead of copying the sample text from this tutorial.
With topic instructions alone, the agent decides to ask because you told it to. For example:
Before running the Update Case Status action, tell the user which case will change and what the new status will be, then ask them to confirm. Run the action only after the user clearly agrees. If the user declines or does not answer, do not run the action.This gives you control over the wording and the content of the summary, but it relies on the model following the instruction. It is a good complement to the setting, not a replacement for it.
When both are on, the user may see a summary written by the agent and then a platform-level approval. If that feels repetitive, tune the instructions so the agent summarizes the change and leaves the final yes/no to the setting. Always judge this in conversation preview, because the combined behavior is easiest to evaluate by reading a real transcript.
Reading a complete exchange
Here is the happy path from the spine's sample test:
User: Close case 5001R00000AbCdE.
Agent: I will set the status of case 5001R00000AbCdE to Closed. Do you want me to go ahead?
User: Yes.
Agent: The case is now Closed.Notice the order. The data changes between the user's "Yes" and the agent's last message, not before. The final message should report what actually happened. In the Apex example, that is the message field the method returns: "Case 5001R00000AbCdE set to Closed." A good agent reports the result from the action's output, not from its own assumption that the action worked.
Responses that don't follow the script
Real users rarely reply with a plain "Yes." Plan for these cases and test each one.
A decline
User: Close case 5001R00000AbCdE.
Agent: I will set the status of case 5001R00000AbCdE to Closed. Do you want me to go ahead?
User: No, leave it open.
Agent: Understood. I have not changed the case. Is there anything else I can help with?The agent should say that nothing changed. Users trust a decline more when the agent states it.
A correction
User: Close case 5001R00000AbCdE.
Agent: I will set the status of case 5001R00000AbCdE to Closed. Do you want me to go ahead?
User: Actually, set it to Escalated instead.
Agent: I will set the status of case 5001R00000AbCdE to Escalated. Do you want me to go ahead?A correction is not an approval. The previous confirmation covered "Closed," so it cannot cover "Escalated." The agent must summarize the new change and ask again. This is a common failure in instruction-only setups: the model treats the reply as acceptance because it contains no "no."
An ambiguous answer
User: Close case 5001R00000AbCdE.
Agent: I will set the status of case 5001R00000AbCdE to Closed. Do you want me to go ahead?
User: Hmm, maybe.
Agent: I haven't made any change. Tell me "yes" if you want me to close the case, or "no" to leave it as is.Replies like "maybe," "I guess," or a question about something else are not clear agreement. The instruction "Run the action only after the user clearly agrees" exists for this reason. If the user stops replying, the action never runs.
A question in place of an answer
User: Close case 5001R00000AbCdE.
Agent: I will set the status of case 5001R00000AbCdE to Closed. Do you want me to go ahead?
User: Who owns that case?
Agent: The case is owned by Dana Lee. I still haven't closed it. Do you want me to go ahead?The agent can answer side questions (if it has a way to look up the owner), but the pending change stays pending. It should return to the question.
Edge cases that affect what the user sees
- Missing inputs come first. If the user says "Close my case," the agent must collect the case Id before it can summarize. That exchange is input gathering, not confirmation. A question like "Which case?" does not authorize anything.
- Confirmation is tied to specific values. If any value changes after approval, the agent should ask again. Test this by changing a value right after saying yes.
- Multiple records. Invocable methods accept a list of requests, so one user message could trigger changes to several records. The summary should list every record, or at least state the count and give a way to see them. A message such as "I'll update 40 cases" is better than one that hides the scope. If a single confirmation would cover many records, think about whether the action should accept that many at all.
- Several actions in one request. If a user asks for two changes, the agent may ask once for both or twice. Either is acceptable if the user knows what each approval covers. Test the pattern, because model behavior here can vary.
- Failures after approval. If the action fails (a validation rule, a permission error), the agent should say so and not claim success. A "Yes" from the user is not proof of success.
- Wording varies between runs. Language models do not repeat identical text. Your test should check the pattern (states the change, waits, acts after approval), not an exact string.
- A confirmation is not authorization. The user saying "yes" does not give them access they lack. Permissions and the access of the running user remain the real controls. The next chapters on guardrails cover this.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| The agent summarizes vaguely ("I'll run the action") | Generic action name or input descriptions | Rewrite labels and descriptions so the values and operation are clear. |
| The agent asks, but runs the action before the reply | The pause relies on instructions alone | Enable **Require user confirmation** on the action. |
| The agent treats a correction as approval | Instructions don't say what counts as agreement | Add "Run the action only after the user clearly agrees" and test corrections. |
| The user is asked twice and finds it annoying | The setting and the instructions both ask | Shorten the instructions so they summarize and leave the approval to the setting. |
| The agent claims success after a failed action | The reply isn't based on the action output | Return a clear result message from the action and tell the agent to report it. |
Writing the instruction so the conversation stays tight
If you keep instruction-based confirmation alongside the setting, these habits keep the conversation short and clear:
- Name the action in the instruction, using the same name as in the action's configuration.
- Require the agent to state the record and the new value.
- Define what counts as agreement ("clearly agrees") and what happens otherwise (no action).
- Tell the agent to report the result from the action, including failures.
A revised instruction following those habits:
When the user asks to change a case status, use the Update Case Status action. First tell the user which case will change and the new status, then ask them to confirm. Treat a changed value as a new request that needs a new confirmation. Run the action only after the user clearly agrees. If the user declines or does not answer, do not run the action and say that nothing was changed. After the action runs, report the message it returns. If it fails, say so.This instruction states each beat of the flow. It also covers the edge cases from above: corrections, declines, silence and failure.
Exercise
A user says "Close case 5001R00000AbCdE." The agent replies "I will set the status of case 5001R00000AbCdE to Closed. Do you want me to go ahead?" The user answers "Make it Escalated instead." What should the agent do next, and why?
Show answer
The agent should not run the action. The user's reply changes the value, so the earlier question no longer matches what the user wants. The agent should summarize the new change ("I will set the status of case 5001R00000AbCdE to Escalated") and ask for approval again. It should run the action only after a clear yes to that new summary.
Exercise
You test an agent in conversation preview and see this: the agent writes "I'll update the case now" and the case is changed in the same turn, with no question. Name one cause and one fix, based on this chapter.
Show answer
The likely cause is that the action has no "Require user confirmation" setting and the topic instructions do not tell the agent to ask first, or the model ignored them. The fix is to enable the setting on the action, which stops the action before it runs. Adding instructions that require a summary, a question, and a clear yes also helps.
Exercise
List the four things a good confirmation summary should state, and say which part of the action's design supplies the values the agent uses to describe them.
Show answer
The operation, the target record, the new value, and a direct question. The agent draws the wording from the action's name and description, and from the labels and descriptions of its inputs (for example, "Case Id" and "New Status"), together with what the user said.