process-automation-selection
Use when deciding which Salesforce automation tool should own a requirement, including before-save and after-save Flow, screen Flow, scheduled Flow, invocable Apex, Apex triggers, and migration off Workflow Rules or Process Builder. Triggers: 'Flow or Apex trigger', 'which automation tool should I use', 'Process Builder migration', 'Workflow Rule retirement', 'same-record update or trigger'. NOT for detailed implementation of a Flow or trigger after the automation boundary has already been chosen.
Best use case
process-automation-selection is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when deciding which Salesforce automation tool should own a requirement, including before-save and after-save Flow, screen Flow, scheduled Flow, invocable Apex, Apex triggers, and migration off Workflow Rules or Process Builder. Triggers: 'Flow or Apex trigger', 'which automation tool should I use', 'Process Builder migration', 'Workflow Rule retirement', 'same-record update or trigger'. NOT for detailed implementation of a Flow or trigger after the automation boundary has already been chosen.
Teams using process-automation-selection should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/process-automation-selection/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How process-automation-selection Compares
| Feature / Agent | process-automation-selection | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when deciding which Salesforce automation tool should own a requirement, including before-save and after-save Flow, screen Flow, scheduled Flow, invocable Apex, Apex triggers, and migration off Workflow Rules or Process Builder. Triggers: 'Flow or Apex trigger', 'which automation tool should I use', 'Process Builder migration', 'Workflow Rule retirement', 'same-record update or trigger'. NOT for detailed implementation of a Flow or trigger after the automation boundary has already been chosen.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Process Automation Selection Use this skill when the hard question is not how to build the automation, but which automation surface should own it. Salesforce gives teams several ways to automate work, and most production problems start with the wrong boundary choice: using Apex when a before-save Flow was enough, forcing a Flow to behave like a service layer, or leaving legacy Workflow Rules and Process Builder logic in place because it still appears to work. The decision should be based on execution model, scale, ownership, and migration posture. A same-record field normalization rule belongs in a different tool than a high-volume cross-object transaction or a guided user journey. Treat legacy tools as migration targets, not fresh design options. Salesforce migration guidance published in 2022 stated that Workflow Rules and Process Builder would stop functioning after December 31, 2025, so by March 13, 2026 they should be considered retirement work, not architecture choices for new delivery. --- ## Before Starting Gather this context before working on anything in this domain: - What actually triggers the process: record save, user click, time schedule, event, or external call? - Does the automation only update the triggering record, or does it coordinate related records, integrations, or user interaction? - What record volume or transaction pressure exists in real life, not just in demo data? - Is legacy Workflow Rule, Process Builder, or overlapping trigger logic already attached to the same business process? --- ## Core Concepts ### Choose By Execution Model, Not Team Habit Before-save Flow, after-save Flow, scheduled Flow, screen Flow, and Apex trigger all solve different execution problems. Pick the one whose runtime behavior matches the requirement rather than the one the team is most comfortable editing. ### Flow First Does Not Mean Flow For Everything Flow is the preferred default for declarative, maintainable automation, especially when the logic is readable and the platform already provides the needed behavior. Apex becomes the right choice when strict transaction control, heavier reuse, complex looping, or fine-grained performance control matter more than declarative ownership. ### Same-Record Versus Related-Record Work Is A Major Split Simple updates to the triggering record belong in before-save record-triggered Flow whenever possible. Related-record DML, richer orchestration, or custom service boundaries usually move the decision to after-save Flow, invocable Apex, or triggers. ### Legacy Automation Must Be Retired Deliberately Workflow Rules and Process Builder should be treated as migration inventory. Even if they are still present in metadata, they should not remain the design center for new work. --- ## Common Patterns ### Before-Save Declarative Update Pattern **When to use:** The requirement only changes fields on the record being saved. **How it works:** Use before-save record-triggered Flow for field defaulting, normalization, or light calculations. **Why not the alternative:** An Apex trigger or after-save Flow adds cost and complexity without real benefit. ### After-Save Plus Invocable Pattern **When to use:** The process needs related-record work, orchestration, or a small custom Apex boundary. **How it works:** Keep orchestration in Flow, but delegate non-trivial business logic to a bulk-safe invocable Apex action when declarative elements would become brittle. ### Apex Trigger For High-Control Transaction Logic **When to use:** The requirement needs careful ordering, advanced bulk handling, heavy reuse, or behavior that Flow cannot express efficiently. **How it works:** Use a trigger handler and service layer, then keep declarative automation off the same boundary unless the split is intentional and documented. --- ## Decision Guidance | Situation | Recommended Approach | Reason | |---|---|---| | Update only fields on the record being saved | Before-save record-triggered Flow | Lowest-cost platform option | | Create or update related records on save | After-save Flow | Declarative and explicit | | Guided multi-step user interaction | Screen Flow | Built for user-driven process | | Time-based batch-like maintenance | Scheduled Flow | Fits periodic execution | | Complex transaction behavior, heavy reuse, or strict service logic | Apex trigger or service + invocable boundary | Better control and testability | | Requirement still depends on Workflow Rule or Process Builder | Migrate to Flow or Apex boundary | Legacy tools are retirement targets | --- ## Recommended Workflow Step-by-step instructions for an AI agent or practitioner activating this skill: 1. Gather context — confirm the org edition, relevant objects, and current configuration state 2. Review official sources — check the references in this skill's well-architected.md before making changes 3. Implement or advise — apply the patterns from Core Concepts and Common Patterns sections above 4. Validate — run the skill's checker script and verify against the Review Checklist below 5. Document — record any deviations from standard patterns and update the template if needed --- ## Review Checklist Run through these before marking work in this area complete: - [ ] The chosen tool matches the trigger and execution model. - [ ] Same-record work was not pushed into heavier automation by habit. - [ ] Flow and Apex boundaries are separated intentionally where both exist. - [ ] Legacy Workflow Rule and Process Builder logic is treated as migration scope. - [ ] The object does not accumulate overlapping automation with no clear owner. - [ ] The team can explain why a simpler automation surface was rejected. --- ## Salesforce-Specific Gotchas Non-obvious platform behaviors that cause real production problems: 1. **Before-save Flow is often the cheapest answer for same-record updates** - teams still overuse Apex or after-save logic for work the platform already optimizes. 2. **Mixed Flow and trigger automation can be individually valid but collectively opaque** - the support burden is often the real defect. 3. **Legacy tools distort architecture discussions** - if Workflow Rule or Process Builder logic still exists, teams sometimes design around the old implementation instead of replacing it. 4. **A Flow solution that works at low volume may still belong in Apex at higher scale** - tool choice is partly a transaction design decision. --- ## Output Artifacts | Artifact | Description | |---|---| | Automation boundary recommendation | Best-fit tool choice and why | | Migration review | Legacy retirement and overlap findings | | Consolidation plan | Guidance to reduce duplicated automation across surfaces | --- ## Related Skills - `admin/flow-for-admins` - use when Flow is already the chosen boundary and the design needs to be built or reviewed. - `apex/trigger-framework` - use when the requirement clearly belongs in Apex trigger architecture. - `flow/record-triggered-flow-patterns` - use when the main remaining decision is before-save versus after-save Flow structure.
Related Skills
process-builder-to-flow-migration
Migrate Process Builder processes to record-triggered Flows using the native Migrate to Flow tool or manual rebuild. Covers conversion tool usage, pattern mapping, order-of-execution changes, testing migrated flows, and bulk behavior improvements. NOT for building new flows from scratch, NOT for Workflow Rule migration (use workflow-rule-to-flow-migration), NOT for net-new automation design.
flow-collection-processing
Use when building or reviewing Flow logic that processes lists of records using Loop, Assignment, Collection Filter, Collection Sort, or Transform elements. Triggers: 'iterate over collection in flow', 'flow loop add to collection', 'collection filter element', 'transform element flow', 'update records from collection variable', 'collection sort flow'. NOT for individual single-record retrieval (use Get Records alone), NOT for Apex-based collection manipulation, NOT for flow bulkification performance analysis (see flow-bulkification).
flow-batch-processing-alternatives
Use when a Scheduled Flow or Record-Triggered Flow needs to process more records than Flow can safely handle in a single run. Covers Flow limit realities, scheduled-path chunking, Data Cloud batch transforms, and Apex Queueable/Batch escalation. Does NOT cover choosing async across a general workflow (see async-selection decision tree).
salesforce-devops-tooling-selection
Use when a team needs to choose a DevOps tooling platform for Salesforce — comparing options like Gearset, Copado, Flosum, AutoRABIT, Blue Canvas, and Salesforce DevOps Center across axes of hosting model, team composition, compliance posture, and budget. Trigger keywords: 'which DevOps tool for Salesforce', 'Gearset vs Copado', 'CI/CD tool comparison', 'DevOps platform selection', 'native vs third-party DevOps'. NOT for CI/CD pipeline configuration (use devops/continuous-integration-testing), NOT for Git branching strategy design (use devops/git-branching-for-salesforce), NOT for environment topology decisions (use devops/environment-strategy).
salesforce-cli-automation
Use this skill when automating Salesforce work with the unified Salesforce CLI (`sf`, v2): shell scripts, Make/npm tasks, cron jobs, and CI steps that need stable flags, `--json` output, org aliases, bulk/data commands, plugins, and non-interactive auth patterns. Trigger keywords: sf CLI automation, sfdx migration, JSON output CI, sf project deploy script, sf data bulk, CLI plugins, target-org alias, machine-readable CLI. NOT for choosing or wiring a specific CI platform (GitHub Actions, GitLab, Jenkins, Bitbucket, Azure DevOps—use those devops skills), VS Code Salesforce extensions, or Copado/Gearset release management UIs.
release-notes-automation
Use when generating customer- or stakeholder-facing release notes from git history, Jira/ADO ticket links, and Salesforce metadata diffs at deploy time. Triggers: 'auto-generate release notes', 'changelog from commits', 'release notes from PR titles', 'what changed in this deployment'. NOT for managed-package version creation, push upgrades, or org assessment.
cumulusci-automation
Use this skill when configuring CumulusCI (cci) for Salesforce project automation: authoring cumulusci.yml tasks and flows, customizing or composing standard flows, integrating Robot Framework acceptance tests, and running cci flows in CI pipelines with JWT-based authentication. Covers task class_path/options wiring, flow step ordering, org and source declarations, cross-project reuse via sources, and the standard flow library (dev_org, qa_org, ci_feature, install_beta). NOT for raw SFDX/sf CLI workflows without CumulusCI, scratch org pool management (use scratch-org-pools), unlocked or managed package versioning (use unlocked-package-development or second-generation-managed-packages), or Salesforce-native DevOps Center pipelines (use devops-center-pipeline).
platform-selection-guidance
Use when choosing which Salesforce platform capability to use for a requirement — covering metadata storage (Custom Metadata vs Custom Settings vs Custom Objects), UI framework (LWC vs Aura), integration approach (Platform Events vs Change Data Capture vs Outbound Messaging), and data extension (OmniStudio vs standard automation). Triggers: custom metadata vs custom settings, LWC vs Aura, which salesforce feature to use, platform events vs change data capture, omnistudio vs flow. NOT for automation-specific tool selection between Flow / Apex / Workflow (use admin/process-automation-selection) or for implementing the chosen platform feature.
marketing-cloud-vs-mcae-selection
Use this skill when selecting between Marketing Cloud Engagement (MCE) and Marketing Cloud Account Engagement (MCAE/Pardot) for a Salesforce marketing implementation. Trigger keywords: MCE vs MCAE, Marketing Cloud vs Pardot, B2B vs B2C marketing platform, which marketing cloud product, marketing platform selection. NOT for implementation configuration of either product — this skill covers platform selection only, not setup, campaign build-out, or integration implementation.
industries-cloud-selection
Use this skill when selecting which Salesforce Industries (vertical) cloud fits a customer's industry and requirements — evaluating data model compatibility, licensing implications, and customization vs configuration tradeoffs before committing to a vertical cloud. Trigger keywords: which industry cloud should I use, Communications Cloud vs Health Cloud, Industries licensing, vertical cloud selection, Salesforce Industries portfolio, industry cloud comparison. NOT for implementation of any individual vertical cloud — this skill covers pre-purchase and pre-implementation selection only, not configuration, data migration, or OmniStudio component development.
deployment-automation-architecture
Deployment automation architecture on Salesforce: pipeline orchestration, branch strategy, environment topology, quality gates, release trains. Selecting between Copado, Gearset, Flosum, and native SFDX + GitHub Actions. NOT for cloud-specific deploy mechanics (use cloud-specific-deployment-architecture). NOT for CI/CD tool tutorials.
aml-kyc-process-architecture
Use when designing the architecture for AML/KYC compliance workflows on Salesforce — covering verification orchestration, third-party screening integration patterns, risk scoring design, and regulatory data flow. Triggers: AML architecture, KYC verification workflow design, sanctions screening integration, customer risk rating design, onboarding compliance workflow, watchlist screening Salesforce, FinCEN / FATF obligation data flow, BSA compliance architecture. NOT for implementing KYC data collection forms or FSC Action Plans (use admin/fsc-action-plans). NOT for configuring FSC Identity Verification for contact-center caller authentication. NOT for production screening vendor ISV configuration.