> ## Documentation Index
> Fetch the complete documentation index at: https://docs.botshield.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents Ask in Flow

> Pause a Flow for a human confirmation and resume on the pushed resolution using the packaged template Flow.

When a sensitive step lives in a **Flow** — a refund, a cancellation, a data change — you can require a human to confirm it without writing any Apex. The package ships a **template Flow** you copy and call as a subflow: it proposes the action, **pauses**, and **resumes** the moment the linked human approves, carrying the verdict back.

## Use the template

<Steps>
  <Step title="Copy the template Flow">
    Save a copy of **BotShield: Require Human Confirmation (Template)** (Setup → Flows). It's autolaunched and system-mode.
  </Step>

  <Step title="Call it before the sensitive step">
    In your own Flow, add the copy as a **subflow** just before the action you want gated. Pass the inputs: the linked person's opaque ID, a plain-language action summary, a category, and the source record ID.
  </Step>

  <Step title="Branch on the verdict">
    The subflow returns a `verdict` and the resolution record ID. Add a Decision after it: proceed only when the verdict is **approved**; otherwise stop, notify, or route for review.
  </Step>
</Steps>

## How the pause works

Under the hood the template proposes the action, then **pauses on the `BotShield_Resolution_Event__e` platform event** filtered to this request. When the human approves in their BotShield app, your Console pushes the resolution, the event fires, and the Flow resumes exactly where it paused — with the signed verdict. No polling loops, no waiting screens.

<Note>
  Because the Flow pauses on an event (not a screen), it works for **background** automations — record-triggered Flows, scheduled paths, and agent-invoked Flows — not just interactive ones.
</Note>

## Example: refund approval

A cancellation-with-refund Flow calls the subflow with “Refund booking #1042 — \$168.45”, pauses, and asks the linked manager on their phone. On **approve**, the Flow resumes and issues the refund; on **deny** or **expire**, it routes the case for manual review. The Coral Cloud demo repo includes this exact pattern.

<Card title="The same confirmation for agents" icon="robot" href="/integrations/salesforce/agents-ask-agentforce">
  Require human confirmation from an Agentforce agent instead of a Flow.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.