Sub topic 10
Planning a migration from legacy automation to Flow
This chapter assumes you know what Workflow Rules and Process Builder do, and that you can open Flow Builder and the Object Manager. It covers how to plan the move to Flow, not how to build each flow.
Why plan instead of converting one by one
Salesforce no longer enhances Workflow Rules or Process Builder, and Flow is the supported tool going forward. A migration still carries risk. Legacy automation on one object often depends on its own run order and on field updates that re-trigger other rules. If you rebuild pieces in isolation, you can change behavior without noticing.
Step 1: Inventory what exists
List every Workflow Rule and Process Builder process, grouped by object. For each one, record:
- The object and the trigger event (create, edit, or both).
- The criteria and the actions it performs.
- Whether it is active, and whether anyone still relies on it.
- Which fields it updates, since those updates can fire other automation.
Retire anything inactive or obsolete instead of migrating it.
Step 2: Map each action to a Flow equivalent
| Legacy action | Flow equivalent |
|---|---|
| Field update on the same record | Before-save record-triggered flow, using an Assignment element |
| Create or update related records | After-save record-triggered flow, using Create Records or Update Records |
| Email alert | Action element that calls the email alert, or Send Email |
| Time-dependent action | Scheduled path in a record-triggered flow |
| Process Builder call to Apex | Apex action in Flow |
Choose before-save for same-record updates. It is faster and does not use an extra save.
Step 3: Consolidate, then build
Plan roughly one before-save flow and one after-save flow per object and event. Several flows on one object are harder to order and debug. Inside each flow, use Decision elements to keep the original criteria separate. Give each flow entry conditions so it only runs when it should.
Salesforce provides a Migrate to Flow tool in Setup. It converts some Workflow Rules and Process Builder processes automatically. Treat its output as a draft. Review it, because not every action converts, and the result may not follow your consolidation plan.
Step 4: Test and cut over
- Build and test the new flow in a sandbox, using bulk data as well as single records.
- Compare results against the legacy behavior for the same inputs.
- Deactivate the legacy rule or process and activate the flow in the same deployment, so both never run together.
- Keep the old automation deactivated, not deleted, for a short period so you can roll back.
Common errors
- Running the legacy rule and the new flow together, which makes updates happen twice.
- Missing a field update that used to re-trigger another rule, so a downstream step never fires.
- Testing only one record and missing bulk behavior.
- Migrating inactive automation that nobody needs.
Exercise
A Process Builder process updates a field on the Opportunity being saved, and also creates a Task for the owner. How would you rebuild it in Flow?
Show answer
Use two flows, or two paths of consolidated automation. A before-save record-triggered flow updates the field on the same record. An after-save record-triggered flow creates the Task. Test both in a sandbox with bulk data, then activate them and deactivate the process in the same deployment.