Skip to content

feat: add building-flow-approval-process skill - #286

Open
svaroteauxSFDC wants to merge 1 commit into
forcedotcom:mainfrom
svaroteauxSFDC:feat/building-flow-approval-process
Open

feat: add building-flow-approval-process skill#286
svaroteauxSFDC wants to merge 1 commit into
forcedotcom:mainfrom
svaroteauxSFDC:feat/building-flow-approval-process

Conversation

@svaroteauxSFDC

@svaroteauxSFDC svaroteauxSFDC commented Jun 12, 2026

Copy link
Copy Markdown

Summary

Adds a new skill for Salesforce Flow Approval Processes (processType: ApprovalWorkflow) — a distinct flow type not covered by the existing generating-flow skill, with its own architecture, constraints, and XML patterns.

Changes

  • skills/building-flow-approval-process/SKILL.md — core skill (~170 lines): goal, activation criteria, Classic vs Flow Approval Process distinction, delegation rules, step types, output reference syntax, hard-stop constraints, deployment order, common errors table
  • skills/building-flow-approval-process/references/xml-patterns.md — complete XML reference: orchestration variables, WebLink, Background Step, Approval Step, Decision routing, Screen Flow variables, full stage example

Motivation

Flow Approval Processes (ApprovalWorkflow) are frequently misimplemented because they look like regular flows but follow completely different rules:

  • Cannot be triggered by the standard "Submit for Approval" action
  • Do not support <subflows> elements — only Background Steps
  • Do not support Custom Error elements in called AutoLaunched flows
  • Require 4 specific input variables to avoid silent runtime failures
  • Output references require the Outputs. prefix (StepName.Outputs.var)

These constraints are not documented in generating-flow and cause hard-to-debug deployment and runtime errors.

Design decisions

  • Progressive disclosure: SKILL.md stays lean; full XML patterns are in references/xml-patterns.md
  • Delegation: AutoLaunched and Screen Flow components delegate to the generating-flow MCP pipeline; only the ApprovalWorkflow orchestration (unsupported by the pipeline) uses manual XML
  • Format: follows existing skill conventions (metadata.version: "1.0", ## Goal first section, imperative style)

Notes

Tested against real Salesforce production deployments. All constraints and error fixes are verified against observed deployment and runtime behavior.

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! It looks like @svaroteauxSFDC is an internal user so signing the CLA is not required. However, we need to confirm this.

Adds a new skill for Salesforce Flow Approval Processes
(processType: ApprovalWorkflow), a distinct flow type not covered
by the existing generating-flow skill.

Key contributions:
- Full architecture guide: orchestration, Background Steps, Approval
  Steps, Screen Flows, WebLink trigger, Lightning page components
- Explicit delegation rule: AutoLaunched and Screen Flows are generated
  via the generating-flow MCP pipeline; only the ApprovalWorkflow
  orchestration XML is written manually
- Hard-stop constraints mapped to known deployment/runtime errors
- XML reference patterns in references/xml-patterns.md
- Common errors quick reference table with root causes and fixes
- Required deployment order to avoid dependency failures
@svaroteauxSFDC
svaroteauxSFDC force-pushed the feat/building-flow-approval-process branch from 540723d to dcc73db Compare June 12, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant