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.

Best use case

process-builder-to-flow-migration is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using process-builder-to-flow-migration 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

$curl -o ~/.claude/skills/process-builder-to-flow-migration/SKILL.md --create-dirs "https://raw.githubusercontent.com/PranavNagrecha/AwesomeSalesforceSkills/main/skills/flow/process-builder-to-flow-migration/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/process-builder-to-flow-migration/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How process-builder-to-flow-migration Compares

Feature / Agentprocess-builder-to-flow-migrationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

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 Builder to Flow Migration

Use this skill when orgs still have active Process Builder processes that need to move to record-triggered Flows before the December 31 2025 end-of-support deadline. Process Builder new creation was blocked in Spring '25; existing processes continue to execute but receive no bug fixes. Migration is mandatory, not optional.

---

## Before Starting

Gather this context before working on anything in this domain:

- Inventory all active and inactive Process Builder processes: query `ProcessDefinition` via Salesforce CLI or Workbench SOQL
- Determine what action types each process uses — invocable Apex, callouts, tasks, and scheduled actions require manual rebuild; the tool cannot convert them
- Map all automation on each affected object (Process Builder, other Flows, Apex triggers) to plan execution order via Flow Trigger Explorer

---

## Core Concepts

### The Migrate to Flow Tool

Setup > Migrate to Flow converts supported Process Builder processes into **inactive** record-triggered flows for review before activation. The tool handles: field updates, email alerts, Post to Chatter, and immediate criteria + actions.

**The tool does NOT handle:**
- Invocable Apex actions
- Scheduled actions requiring async paths
- External callout actions
- Task creation (Create Task actions)
- `ISCHANGED()` / `ISNEW()` formula criteria — these have no direct Flow mapping
- Global variables in criteria
- Record-type-based criteria
- Related-record field updates (parent/child via relationship)

For any process using unsupported features, manual rebuild in Flow Builder is required.

### Order-of-Execution Change

Process Builder execution was determined by process creation date — oldest process on an object ran first. This was opaque. Record-triggered flows use **Flow Trigger Explorer** with explicit priority integers (lower = earlier execution).

When migrating: inventory all processes per object, determine intended order, and assign Flow Trigger Explorer priority integers accordingly. Running both an active Process Builder **and** an active Flow on the same object creates unpredictable execution order — disable the Process Builder process immediately after activating its Flow equivalent.

### Bulk Behavior Improvement

Performance gains from migration are significant: before-save Fast Field Updates run approximately **10× faster** than equivalent Process Builder field updates; after-save flows run approximately **50% faster**. These gains only materialize if the migrated flow is bulk-safe (no SOQL or DML inside loops).

---

## Common Patterns

### Tool-Eligible Migration

**When to use:** Process uses only field updates, email alerts, and Chatter posts with no ISCHANGED/ISNEW criteria and no Apex/callout actions.

**How it works:**
1. Setup > Migrate to Flow > select process > Convert
2. Review generated inactive flow in Flow Builder — verify Decision conditions match original criteria
3. Add a Fault Path to every DML element (not generated by tool)
4. Run bulk test in sandbox, then activate and deactivate source process

**Why not skip review:** The generated flow is inactive for a reason — the tool may drop criteria or generate incorrect conditions that look right but behave differently.

### Manual Rebuild for ISCHANGED/ISNEW Criteria

**When to use:** Process uses `ISCHANGED(FieldName)` or `ISNEW()` in its entry criteria or action criteria.

**How it works:** In the record-triggered flow Decision element, replace:
- `ISCHANGED(FieldName)` → condition: `{!$Record.FieldName} Is Changed` (entry criteria) or `{!$Record.FieldName} != {!$Record__Prior.FieldName}` (Decision node)
- `ISNEW()` → trigger: Only when record is created (entry criteria setting), or check `{!$Record__Prior.Id} Is Null`

### Scheduled Action Replacement

**When to use:** Process has scheduled actions (run 3 days after close date, etc.)

**How it works:** Create a Scheduled Path on the record-triggered flow. Set the time source field and offset. Note: scheduled actions in flight at Process Builder deactivation do NOT automatically transfer — they are cancelled. Plan cutover to minimize in-flight actions.

---

## Decision Guidance

| Scenario | Recommended Approach | Reason |
|---|---|---|
| Field updates, email alerts only | Migrate to Flow tool | Fastest, lowest risk |
| Invocable Apex or callout actions | Manual rebuild | Tool cannot convert |
| Scheduled actions | Manual rebuild with Scheduled Paths | Tool cannot convert async |
| Task creation | Manual rebuild with Create Records | Tool cannot convert |
| ISCHANGED/ISNEW criteria | Manual rebuild with `$Record__Prior` | No direct tool mapping |
| Multiple processes on same object | Consolidate into single flow + Decisions | Avoids execution-order ambiguity |

---

## Recommended Workflow

1. **Inventory all processes**: Use SOQL `SELECT Id, Name, TableEnumOrId, ActiveVersionId FROM ProcessDefinition WHERE Type='Flow'` and review each process for action types and criteria.
2. **Triage tool-eligible vs. manual-rebuild**: Any process using invocable Apex, callouts, tasks, ISCHANGED/ISNEW criteria, or scheduled actions requires manual rebuild — flag before running the tool.
3. **Run Migrate to Flow on eligible processes**: Setup > Migrate to Flow > select process > Convert. Tool creates an INACTIVE flow — do not activate yet.
4. **Rebuild unsupported actions**: Open the generated (or new) flow in Flow Builder; add missing elements (Apex actions, Create Records for tasks, Scheduled Paths for async).
5. **Assign Flow Trigger Explorer priorities**: Open Flow Trigger Explorer for the object; assign priority integers matching intended execution order. No two flows should share the same priority.
6. **Test in sandbox with 200+ records**: Verify governor limits hold, assert expected field values, confirm no SOQL-in-loop failures. Use Execute Anonymous to bulk-load test records.
7. **Activate flow and deactivate Process Builder simultaneously**: Never run both active on the same object. Deactivate PB process the moment the Flow is activated.

---

## Review Checklist

- [ ] All processes inventoried; unsupported actions identified before running tool
- [ ] Tool used only for supported action types; manual rebuild for the rest
- [ ] ISCHANGED()/ISNEW() criteria rebuilt using `$Record__Prior` comparisons
- [ ] Fault paths added to all DML elements in migrated flows
- [ ] Flow Trigger Explorer priorities assigned; no conflicts with existing flows
- [ ] Active PB process deactivated immediately after flow activation
- [ ] Bulk test with 200+ records passed in sandbox
- [ ] No SOQL or DML inside loops in migrated flow
- [ ] Scheduled actions rebuilt using Scheduled Paths (not kept as PB schedules)
- [ ] Pending scheduled actions in flight accounted for in cutover plan

---

## Salesforce-Specific Gotchas

1. **Scheduled actions are cancelled on Process Builder deactivation** — Any pending scheduled actions (e.g., "send email 5 days after close") queued from Process Builder are silently cancelled when you deactivate the process. There is no automatic handoff to the new Flow. Plan cutover timing to minimize in-flight actions, or notify stakeholders that pending scheduled actions will not fire.
2. **Active PB + active Flow on same object = undefined order** — Salesforce does not guarantee execution order when both a Process Builder process and a record-triggered flow are active on the same object. This creates impossible-to-debug bugs in production. Deactivate the Process Builder the moment the Flow is activated — no grace period.
3. **ISCHANGED()/ISNEW() is silently dropped by the tool** — The Migrate to Flow tool does not warn you when it encounters ISCHANGED or ISNEW criteria — it may omit those conditions or generate a flow that fires unconditionally. Always review Decision conditions in generated flows against original PB criteria.

---

## Output Artifacts

| Artifact | Description |
|---|---|
| Inactive record-triggered flow | Generated by tool or built manually; must be reviewed before activation |
| Flow Trigger Explorer configuration | Priority integers for all flows on affected objects |
| Migration test plan | Bulk-load scenarios and assertions for sandbox validation |
| Process Builder deactivation log | Timestamp record of each process deactivated |

---

## Related Skills

- `flow/workflow-rule-to-flow-migration` — companion skill for Workflow Rule migration
- `flow/record-triggered-flow-patterns` — canonical patterns for destination flow type
- `flow/fault-handling` — add fault paths to migrated flows
- `flow/flow-large-data-volume-patterns` — bulk-safety for migrated flows
- Decision tree: `standards/decision-trees/automation-selection.md`

Related Skills

ip-range-and-login-flow-strategy

8
from PranavNagrecha/AwesomeSalesforceSkills

Design and implement Salesforce Login Flows (Screen Flows assigned to profiles or Experience Cloud sites) that run post-authentication to enforce conditional MFA, IP-based branching, terms-of-service acceptance, or user data collection. Covers Login Flow creation in Flow Builder, profile/site assignment, IP-aware decision logic, and ConnectedAppPlugin extension points. NOT for static IP allowlisting or profile Login IP Ranges (see network-security-and-trusted-ips), org-wide session policies, or SSO/SAML IdP configuration.

customer-data-request-workflow

8
from PranavNagrecha/AwesomeSalesforceSkills

Implement GDPR/CCPA data subject rights (access, deletion, rectification) using Salesforce Privacy Center and/or custom workflow. NOT for general backup or org-level data retention policy.

vlocity-to-native-omnistudio-migration

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when migrating an org from the Vlocity managed package (vlocity_ins, vlocity_cmt, vlocity_ps) to native OmniStudio. Trigger keywords: Vlocity to OmniStudio migration, namespace migration, vlocity_ins to omnistudio, OmniStudio Migration Tool, DataRaptor namespace update, OmniScript JSON export, managed package to native. NOT for new OmniStudio setup in greenfield orgs, nor for migrating between OmniStudio-native orgs, nor for Salesforce CPQ to Industries CPQ migration.

omnistudio-vs-flow-decision

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when choosing between OmniStudio (OmniScript / Integration Procedure / FlexCard / DataRaptor) and Flow / Screen Flow / Apex for a given capability. Triggers: 'omnistudio or flow', 'omniscript vs screen flow', 'integration procedure vs subflow', 'flexcard vs lightning page'. NOT for general automation selection across Workflow/Process Builder/Apex (see automation-selection tree).

omnistudio-lwc-omniscript-migration

8
from PranavNagrecha/AwesomeSalesforceSkills

Migrate classic Visualforce-based OmniScripts to LWC-based runtime with feature parity and regression testing. NOT for new OmniScript design.

visualforce-to-lwc-migration

8
from PranavNagrecha/AwesomeSalesforceSkills

Migrating Visualforce pages and components to Lightning Web Components: controller-to-Apex-method translation, viewstate replacement, custom URL parameter handling, PageReference-to-NavigationMixin mapping, Lightning Out coexistence, and inline VF retention strategy. NOT for new LWC development from scratch (use lwc-fundamentals) or Aura-to-LWC migration (use aura-to-lwc-migration).

lwc-locker-to-lws-migration

8
from PranavNagrecha/AwesomeSalesforceSkills

Migrating LWCs from Lightning Locker Service to Lightning Web Security (LWS) — flipping the org switch safely, identifying components likely to break, removing Locker workarounds that are now insecure, and validating third-party libraries that previously failed under SecureWindow/SecureElement proxies. NOT for Aura → LWC migration — see lwc/aura-to-lwc-migration. NOT for general LWC security review (XSS, public-API hardening) — see lwc/lwc-security and lwc/lwc-public-api-hardening.

lwc-in-flow-screens

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when building, reviewing, or troubleshooting a custom Lightning Web Component that runs inside a Flow screen element, covering @api props exposed to Flow, FlowAttributeChangeEvent for output, validate() for user input validation, and flow navigation events. Triggers: 'lwc in flow screen', 'FlowAttributeChangeEvent', 'flow screen component not updating', 'flow validate method', 'flow navigation from lwc'. NOT for custom property editors (use custom-property-editor-for-flow), NOT for embedding a flow inside an LWC (use flow/screen-flows), NOT for auto-launched flows.

lwc-app-builder-config

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when an LWC needs to appear, be configured, and be constrained inside Lightning App Builder, Experience Builder, Home Page, or Flow screens via its js-meta.xml file — including isExposed, targets, targetConfigs, supportedFormFactors, objects scoping, and admin-facing design attributes. Triggers: 'lwc not appearing in app builder', 'expose lwc to record page', 'design attribute datasource picklist', 'supportedformfactors mobile small', 'targetconfigs for record page vs app page', 'masterlabel vs description'. NOT for custom property editors for Flow (see `custom-property-editor-for-flow`), and NOT for Experience Cloud theming at the page level.

custom-property-editor-for-flow

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when building or reviewing an LWC Custom Property Editor for Flow screen or action configuration, including the `configurationEditor` metadata hook, builder-side APIs, validation, and value-change events. Triggers: 'custom property editor', 'Flow configuration editor', 'builderContext', 'inputVariables', 'configurationEditor'. NOT for ordinary runtime screen-component behavior when no Flow Builder design-time customization is involved.

aura-to-lwc-migration

8
from PranavNagrecha/AwesomeSalesforceSkills

Migrating Aura components to LWC: feature mapping, interoperability wrappers, event translation, navigation patterns, and Aura-LWC coexistence strategies. NOT for new LWC development from scratch or Aura feature development.

slack-workflow-builder

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when designing or troubleshooting Slack Workflow Builder workflows that call Salesforce — especially the Salesforce connector step Run a Flow, mapping inputs/outputs, handling failures, and understanding limits. Triggers on: Slack Workflow Builder Salesforce, Run a Flow from Slack, autolaunched flow from Slack, Slack automation calling Salesforce. NOT for Salesforce Flow Builder tutorials unrelated to Slack (use flow skills), not for Flow Core Actions that send Slack messages from Salesforce (use flow-for-slack), not for initial org-to-workspace connection (use slack-salesforce-integration-setup), and not for building custom Slack apps outside Workflow Builder.