Tool / proxy

Stacksona for Salesforce Agentforce

Gate the Apex, Flow, or service boundary that performs a governed CRM or external mutation.

Where Gate goes

Inside the Apex callout, Flow action, or service wrapper immediately before mutation.

Keep the platform's normal reasoning and orchestration. Gate only the exact action at the last safe point before execution.

Agentforce chooses actionApex/Flow wrapper checks GateMutation executes or action returns

Start here

  1. 1
    Build the final action.

    Let Salesforce Agentforce choose the action and produce the arguments it intends to execute.

  2. 2
    Check the exact action with Gate.

    Send tool_name and the final payload immediately before the side effect.

  3. 3
    Follow one of four outcomes.

    Continue, wait, revise, or stop. You do not need the advanced features to get this basic path working.

Minimal setup

Expose the governed action wrapper to the agent instead of exposing a parallel raw mutation action. The wrapper can include record context and proposed field changes for the reviewer.

Handle the decision

OutcomeGate statusWhat Salesforce Agentforce should do
Continueallow or approvedExecute the exact proposed action. If signed proof is required, validate it first.
Waitpending_reviewStore thread_id and resume that exact review later.
Revisechanges_requestedReturn reviewer feedback to the part of the runtime that can revise the proposal.
Stopreject or rejectedDo not execute. Replan, fall back, or end the action.
Unknown or failed decision = stop.

Fail closed if Gate cannot be reached, returns an unknown state, or required approval proof is missing or invalid.

Platform notes

  • Keep CRM context, reasoning, and action selection in Salesforce.
  • Store thread_id in Flow, Apex, job, or external runtime state for review resume.
  • Requested changes should return revised fields or action parameters on the same review thread.
Advanced: review threads, revisions, proof, and audit

task_id is your grouping ID. thread_id identifies the exact Gate review and should be persisted whenever work can pause.

For changes_requested, revise on the same review thread using the revision event contract. For high-impact actions that require signed proof, validate the returned approval token before execution. Log execution success or failure when you need complete audit evidence.

For long reviews, use the platform's durable continuation mechanism instead of keeping a process, workflow, or runner open.

Advanced runtime patterns Full Gate API Exact decision states