flow-orchestrator-2025
Salesforce Flow Orchestrator for multi-user, multi-step business processes (2025). PROACTIVELY activate for: (1) building Flow Orchestrations (autolaunched and screen flows), (2) work assignment to users, queues, or roles, (3) interactive vs background steps, (4) approval-style workflows in Flow, (5) parallel and sequential stages, (6) Flow Orchestrator events (StageCompleted, OrchestrationCanceled), (7) error handling and resume patterns, (8) testing orchestrations, (9) migrating from legacy Process Builder/Workflow Rules, (10) Flow Orchestrator vs Approval Process tradeoffs. Provides: orchestration design patterns, stage/step templates, error-handling recipes, and migration guidance.
What this skill does
## ๐จ CRITICAL GUIDELINES
### Windows File Path Requirements
**MANDATORY: Always Use Backslashes on Windows for File Paths**
When using Edit or Write tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).
**Examples:**
- โ WRONG: `D:/repos/project/file.tsx`
- โ
CORRECT: `D:\repos\project\file.tsx`
This applies to:
- Edit tool file_path parameter
- Write tool file_path parameter
- All file operations on Windows systems
### Documentation Guidelines
**NEVER create new documentation files unless explicitly requested by the user.**
- **Priority**: Update existing README.md files rather than creating new documentation
- **Repository cleanliness**: Keep repository root clean - only README.md unless user requests otherwise
- **Style**: Documentation should be concise, direct, and professional - avoid AI-generated tone
- **User preference**: Only create additional .md files when user specifically asks for documentation
---
# Salesforce Flow Orchestrator (2025)
## What is Flow Orchestrator?
Flow Orchestrator coordinates multi-user, multi-step, multi-stage business processes without code. Different users complete sequential tasks in one workflow with built-in approvals, conditional logic, and error handling.
**Key Capabilities**:
- **Multi-User Workflows**: Assign tasks to different users/teams across stages
- **Stage-Based Execution**: Organize work into logical stages
- **Background Automation**: Combine user tasks with automated steps
- **Visual Progress Tracking**: Users see their position in the workflow
- **Fault Paths**: Handle errors gracefully (Summer '25)
- **No-Code**: Build complex processes without Apex
## When to Use Flow Orchestrator
| Use Case | Flow Orchestrator? | Why |
|----------|-------------------|-----|
| Employee Onboarding (HR โ IT โ Manager) | โ
Yes | Multi-user, sequential stages |
| Quote-to-Cash (Sales โ Finance โ Operations) | โ
Yes | Cross-functional approval process |
| Case Escalation (L1 โ L2 โ L3 Support) | โ
Yes | Tiered assignment with SLAs |
| Simple record automation (create/update) | โ No | Use Record-Triggered Flow |
| Single-user process | โ No | Use Screen Flow |
| Batch data processing | โ No | Use Scheduled Flow or Apex Batch |
## Orchestration Architecture
```text
Orchestration = Stages โ Steps โ Background Automations
Stage 1: "HR Review"
โโ Step 1.1: Interactive Step (HR Manager reviews)
โโ Step 1.2: Background Automation (create records)
โโ Decision: Approved? โ Next Stage : End
Stage 2: "IT Provisioning"
โโ Step 2.1: Interactive Step (IT assigns equipment)
โโ Step 2.2: Background Automation (provision accounts)
โโ Step 2.3: Interactive Step (IT confirms completion)
Stage 3: "Manager Onboarding"
โโ Step 3.1: Interactive Step (Manager schedules 1:1)
โโ Step 3.2: Background Automation (send welcome email)
```
## Building an Orchestration (Step-by-Step)
### Example: Employee Onboarding Process
**Requirements**:
- HR reviews new hire documents โ Approved/Rejected
- If approved, IT provisions accounts and equipment
- Manager schedules first day and assigns mentor
- System sends notifications at each stage
### Step 1: Create Orchestration
```yaml
Setup โ Flows โ New Flow โ Orchestration
Name: Employee_Onboarding
Object: Employee__c (custom object)
Trigger: Record Created, Status = 'Pending Onboarding'
```
### Step 2: Design Stages
**Stage 1: HR Document Review**
```text
Stage Name: HR_Document_Review
Stage Description: HR verifies employee documentation
Run Mode: One at a Time (sequential)
Step 1.1 (Interactive):
- Name: Review_Documents
- Assigned To: Queue "HR_Onboarding_Queue"
- Due Date: 2 days from start
- Screen Flow: HR_Document_Review_Screen
- Inputs: Employee__c.Id
Step 1.2 (Background - Decision):
- If HR_Approved = true โ Next Stage
- If HR_Approved = false โ End + Send Rejection Email
```
**Stage 2: IT Provisioning**
```text
Stage Name: IT_Provisioning
Condition: Runs only if Stage 1 approved
Step 2.1 (Interactive):
- Name: Assign_Equipment
- Assigned To: Queue "IT_Provisioning_Queue"
- Due Date: 3 days from stage start
- Screen Flow: IT_Equipment_Assignment
- Inputs: Employee__c.Id
Step 2.2 (Background):
- Name: Create_AD_Account
- Autolaunched Flow: Create_Active_Directory_Account
- Inputs: Employee__c.Email, Employee__c.FirstName
Step 2.3 (Background):
- Name: Send_IT_Confirmation
- Action: Send Email Template
- Recipient: Employee__c.Email
- Template: Welcome_Email
```
**Stage 3: Manager Setup**
```text
Stage Name: Manager_Setup
Depends On: Stage 2 complete
Step 3.1 (Interactive):
- Name: Schedule_First_Day
- Assigned To: Employee__c.Manager__c
- Due Date: 1 day from stage start
- Screen Flow: Manager_Onboarding_Tasks
Step 3.2 (Background):
- Name: Update_Status
- Record Update: Employee__c.Status = 'Onboarding Complete'
```
### Step 3: Implement Fault Paths (Summer '25)
**Fault Path on IT Provisioning Failure**:
```text
If Step 2.2 (Create_AD_Account) fails:
โโ Retry Step (1 attempt after 10 minutes)
โโ If still fails:
โ โโ Send email to IT Manager with error details
โ โโ Create Task for manual provisioning
โ โโ Assign Interactive Step to IT Manager for resolution
โโ Continue to Stage 3 (don't block entire process)
```
**Configuration**:
```text
Step 2.2: Create_AD_Account
โโ Fault Path Enabled: true
โโ Retry Attempts: 1
โโ Retry Delay: 10 minutes
โโ On Final Failure:
โโ Create Task
โ โโ Subject: "Manual AD Account Creation Needed"
โ โโ Assigned To: IT_Manager_Queue
โ โโ Priority: High
โโ Send Email Notification
โโ Template: IT_Provisioning_Failure
โโ Recipients: IT Managers
```
## Interactive Steps vs Background Steps
### Interactive Steps
**Use for**: Actions requiring human judgment or input
```text
Interactive Step Configuration:
โโ Screen Flow: Define UI for user input
โโ Assigned To: User, Queue, or Role
โโ Due Date: Formula (TODAY() + 2 for 2 days)
โโ Instructions: What user should do
โโ Input Variables: Data passed to screen flow
โโ Output Variables: Data returned from user
```
**Example Screen Flow** (HR Review):
```text
Screen: Review Documents
โโ Display: Employee Name, Position, Documents Uploaded
โโ Input: Radio Button (Approve / Reject)
โโ Input: Text Area (Comments - required if reject)
โโ Action: Save & Submit
Output Variables:
- HR_Approved (Boolean)
- HR_Comments (Text)
```
### Background Steps
**Use for**: Automated actions without user interaction
```text
Background Step Types:
โโ Autolaunched Flow: Call another flow
โโ Apex Action: Invoke Apex method
โโ Send Email: Email template or custom
โโ Post to Chatter: Notify users
โโ Create Records: DML operations
โโ Update Records: Field updates
โโ External Service: REST callout
โโ Wait: Pause for duration or until condition
```
## Advanced Patterns and Monitoring
Advanced Flow Orchestrator designs (parallel approvals, conditional branches, retry / escalation, record-triggered orchestration, external integration handoffs) plus monitoring, reporting, and operational dashboards live in `references/advanced-patterns-monitoring.md`. Load that reference for complex multi-stage implementations and production observability.
## Integration with Other Features
### Pattern: Orchestration + Approval Process
```text
Stage 2: Manager Approval
โโ Step 2.1 (Interactive): Manager reviews
โ โโ Screen Flow with Approve/Reject buttons
โโ Background Automation: Update approval status
โโ If Approved: Proceed to Stage 3
If Rejected: Send rejection email, End orchestration
```
### Pattern: Orchestration + Platform Events
**Publish events at stage transitions**:
```apex
trigger OrchestrationStageTrigger on FlowOrchestrationStageInstance (after insert, after update) {
List<OrchestrationStageEvent__e> events = new List<OrchestrationStageEvent__e>();
for (FlowOrchestrationStageInstance stage : Trigger.new) {
if (stage.Status == 'Completed') {
events.add(new OrchestrationStageEvent__e(
OrchesRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context โ no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes โ information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development โ guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.