building-system-context-agent-data-flows

Installation
SKILL.md

Building System-Context Data Flows for Agents

What this skill is for

An Agentforce Service Agent (ASA) reaches data through actions backed by Flows and Prompt Templates. Those flows run as the agent user, whose license and sharing routinely block the records the demo needs to show. The fix — mandated on every build here — is: every flow that backs an agent action or a prompt template runs in System Context without sharing. This skill is the exact, verified mechanics for that, including the one bug that silently breaks reads.

Three flow shapes, all <runInMode>SystemModeWithoutSharing</runInMode>:

Shape processType Used for Agent action target
Read — thin PromptFlow that calls a system-context subflow PromptFlow (wrapper) + AutoLaunchedFlow (subflow) listing/looking up records for the model to narrate generatePromptResponse://<Template> (the template calls the PromptFlow)
Write — autolaunched flow invoked directly as an action AutoLaunchedFlow creating/updating records flow://<Flow>
Verify — autolaunched flow invoked directly as an action AutoLaunchedFlow identity check against a record flow://<Flow>

Verified assets ship in assets/ — real, deployed, working flows from the ClaimSecure ASA build. Read them; do not reinvent the structure.


⚠️ THE BUG THAT WILL BITE YOU: PromptFlow can't run system context

Installs
1
First Seen
6 days ago