PracticeVideosBlogFlashcards

7.3 Automation Selection Strategy & Legacy Migration Patterns

Key Takeaways

  • Workflow Rules and Process Builder reached end of support on December 31, 2025; all new declarative business automations must be built using Salesforce Flow.

  • The native 'Migrate to Flow' tool assists in converting simple legacy rules, but complex enterprise architectures require manual consolidation to avoid creating redundant, unoptimized flows.

  • Record-Triggered Fast Field Updates (Before-Save) execute more efficiently than an extra same-record after-save update; Salesforce cites up to tenfold gains over equivalent record-change processes and should always be prioritized for same-record updates.

  • Approval Processes remain the required platform tool when human governance requires strict record locking, multi-tiered hierarchy routing, delegated approvers, and formal audit history.

  • Flow Trigger Explorer and the Trigger Order property (values 1 to 2000) provide deterministic control over the execution sequence of multiple Record-Triggered Flows on the same sObject.

Last updated: October 2026

Automation Selection Strategy & Legacy Migration Patterns

Over the past two decades, Salesforce has evolved through multiple generations of declarative automation engines. Early implementations relied heavily on Workflow Rules for simple field updates and email alerts, followed by Process Builder for graphical, multi-criteria decision trees. However, as enterprise orgs scaled, the coexistence of multiple overlapping declarative tools created severe performance bottlenecks, unpredictable execution order, and governor limit exhaustion.

To establish a unified, high-performance architecture, Salesforce ended support for Workflow Rules and Process Builder on December 31, 2025, and recommends Salesforce Flow. For the Platform App Builder, success requires not only mastering Flow Builder, but also understanding how to evaluate legacy technical debt, execute migration strategies, and choose the optimal architectural tool among Flow, Approval Processes, and Apex code.


The Retirement of Workflow Rules & Process Builder

Salesforce has disabled the creation of new Workflow Rules and Process Builders in modern orgs. While existing legacy automations continue to execute, Salesforce's end-of-support notice does not announce that all existing automation stops running. Maintaining legacy automations introduces significant technical liability:

  • Performance Overhead: Process Builder was architected on top of the original Workflow engine, resulting in excessive SOQL queries, redundant DML save cycles, and sluggish transaction times.
  • Order of Execution Ambiguity: When multiple Workflow Rules and Process Builders coexist on an object, Salesforce provides zero mechanism to dictate which rule fires first, leading to intermittent race conditions and validation errors.
  • Maintenance Friction: Administrators must navigate disparate Setup menus to diagnose automation failures across Workflow, Process Builder, and Flow.

The Migrate to Flow Tool

To assist administrators, Salesforce provides the native Migrate to Flow tool in Setup:

  • Functionality: Inspects active and inactive Workflow Rules and Process Builders on an sObject and converts their criteria and actions into corresponding Record-Triggered Flows.
  • Conversion Mapping:
    • Simple Workflow field updates and email alerts are converted to Record-Triggered Flows.
    • For migrated Process Builder processes, the tool creates after-save flows; optimize eligible same-record-only logic to before-save after migration. Workflow migration chooses its optimization according to supported actions.
    • Cross-object updates, outbound messages, and task creations are mapped to Actions and Related Records (After-Save) flows.
  • Tool Limitations: The tool supports record-triggered processes; event and invocable processes, custom metadata references, and criteria traversing related fields have limitations. Supported record create/update, Apex, email, and other action types can migrate. Review the actual migration report and test recursion and scheduled-action semantics.

Important

Avoid 1:1 Lift-and-Shift: The biggest architectural mistake an app builder can make during legacy migration is converting 20 individual Workflow Rules into 20 separate Record-Triggered Flows. This merely transfers legacy chaos into Flow Builder. The best practice is to audit, consolidate, and unify legacy logic into a streamlined, modular flow architecture before activation.


Architectural Decision Matrix: Flow vs. Approval Process vs. Apex

Selecting the right automation tool is one of the most heavily tested competency areas on the Platform App Builder exam. The table below delineates the precise technical criteria for choosing between Salesforce Flow, Approval Processes, and programmatic Apex:

Capability / RequirementSalesforce FlowApproval ProcessProgrammatic Apex
Same-Record Field UpdatesOptimal (Fast Field Updates / Before-Save)Supported (via Initial/Final Actions)Supported (Overkill for simple logic)
Cross-Object Data OperationsOptimal (Actions & Related Records)Cannot use cross-object field-update actionsOptimal (Unlimited object spanning)
Record Locking During ReviewFlow Approval steps and supported locking actionsSupported (Classic approval locking)Supported (Programmatic Approval.lock)
Multi-Tier Hierarchical SignoffFlow Approval processes support multi-stage routingOptimal (Native manager & custom hierarchy)Complex (Custom coding required)
Audit Trail & Delegated ApproversFlow Approvals provide work items and audit surfacesClassic Approval HistoryCustom objects required
Interactive Guided User FormsOptimal (Screen Flows)Not supportedSupported (Custom Lightning Web Components)
Time-Based / Recurring BatchOptimal (Schedule-Triggered Flows)Not supportedOptimal (Scheduled & Batch Apex)
High-Volume (>250k records) / Complex MathRisk of CPU governor timeoutsNot applicableOptimal (Optimized bulkified Apex)
Transactional Rollbacks (Savepoint)Custom Error / Roll Back Records for supported contexts; Apex for savepointsNot supportedOptimal (Database.rollback(sp))

Hybrid Patterns: Orchestrating Flows & Approval Processes

Modern enterprise architectures do not treat Flow and Approval Processes as mutually exclusive; rather, they combine them into synergistic hybrid patterns:

┌────────────────────────────────────────────────────────────────────────┐
│                      HYBRID AUTOMATION ARCHITECTURE                    │
│                                                                        │
│  1. RECORD-TRIGGERED FLOW (Automated Submission)                       │
│     • Evaluates record changes (e.g., Discount > 20%)                  │
│     • Validates field completeness                                     │
│     • Executes Core Action: "Submit for Approval"                      │
│                                │                                       │
│                                ▼                                       │
│  2. APPROVAL PROCESS (Governance & Locking)                            │
│     • Imposes Record Lock against standard edits                       │
│     • Routes to Manager Hierarchy / Delegated Approvers                │
│     • Tracks timestamps & comments in Approval History related list    │
│                                │                                       │
│                                ▼                                       │
│  3. FINAL APPROVAL ACTION (State Transition)                           │
│     • Updates Opportunity Status = 'Approved'                          │
│     • Unlocks Record                                                   │
│                                │                                       │
│                                ▼                                       │
│  4. AFTER-SAVE RECORD-TRIGGERED FLOW (Downstream Integration)          │
│     • Detects Status change to 'Approved'                              │
│     • Creates Contract and Asset records                               │
│     • Dispatches HTTP Callout to external ERP billing system           │
└────────────────────────────────────────────────────────────────────────┘

Automated Submission via Flow

Instead of relying on end-users to remember to submit records manually, an app builder configures an After-Save Record-Triggered Flow that evaluates criteria (e.g., Opportunity.StageName == 'Negotiation' and Discount__c > 0.20). When met, the flow executes the platform core action Submit for Approval, automatically placing the record into the appropriate approval process without user friction.

Flow Orchestrator Awareness

For complex, multi-user business processes that span disparate departments and timelines (such as employee onboarding or complex loan origination), Salesforce provides Flow Orchestrator.

  • Flow Orchestrator organizes automations into Stages and Steps.
  • Steps can execute background flows (headless automation) or assign interactive Screen Flows directly to specific users, groups, or queues as work items that appear in the user's Flow Orchestration Work Guide component on the record page.
  • While Approval Processes handle hierarchical document signoffs, Flow Orchestrator orchestrates entire end-to-end enterprise journeys.

Flow Trigger Explorer & Execution Order Management

In legacy Salesforce orgs, having multiple automations on a single object frequently produced non-deterministic execution order. In modern Flow architecture, Salesforce provides two critical tools to enforce determinism:

1. Trigger Order (1 to 2000)

Every Record-Triggered Flow includes an advanced configuration setting: Trigger Order.

  • Administrators enter an integer value between 1 and 2000.
  • When multiple Record-Triggered Flows exist on the same object in the same execution context (e.g., three After-Save flows on the Case object firing upon record update), Salesforce executes them sequentially in ascending numerical order (e.g., Flow with order 10 executes before Flow with order 20).
  • Orders 1–1,000 run first; unordered flows follow by activation date; orders 1,001–2,000 run last. Equal orders are resolved by API name.

2. Flow Trigger Explorer

Flow Trigger Explorer is a visual management console within Setup that displays all Record-Triggered Flows associated with a specific sObject.

  • Flows are categorized into three execution phases: Fast Field Updates (Before-Save), Actions and Related Records (After-Save), and Run Asynchronously.
  • Administrators can filter by trigger event (Create, Update, Delete) and visually drag-and-drop flows to adjust their Trigger Order without manually editing each flow's metadata.

Avoiding Recursive Loops & Conflicting Automations

A primary cause of platform crashes and governor limit exhaustion is the Recursive Loop, where automation on Object A updates Object B, which triggers an automation that updates Object A, creating an infinite cycle.

Defensive Design Strategies

  1. Use Strict Entry Conditions: Always configure Record-Triggered Flows with explicit filter conditions and select 'Only when a record is updated to meet the condition requirements'. This ensures the flow executes solely when a field value transitions into the target state, rather than re-firing on every subsequent edit.
  2. Leverage Prior-Value Checks: In formulas and decision nodes, compare $Record.Field against $Record__Prior.Field to verify that an actual data change occurred before executing child updates.
  3. Consolidate Same-Record Updates into Before-Save Flows: Updating the triggering record in an After-Save flow causes Salesforce to fire a second DML save cycle, re-executing validation rules, triggers, and duplicate checks. Placing same-record updates into Fast Field Updates (Before-Save) modifies fields in-memory before the initial database write, completely eliminating the second save cycle.

Best Practices & Common Exam Traps

Note

Process Builder Depreciation: If an exam scenario asks how to implement a new multi-criteria decision automation, do not select Process Builder even if it sounds technically viable. Salesforce Flow is the current, supported standard for all new declarative automations.

Tip

Fast Field Updates Performance: Fast Field Updates execute with up to tenfold gains documented over equivalent record-change processes; the result depends on the actual logic. For any requirement that sets default field values, calculates values based on same-record attributes, or cleanses data, always select Fast Field Updates.

Important

Order of Execution in Migrated Orgs: Remember the platform Order of Execution: Before-save flows run before before-Apex triggers and custom validation. Immediate after-save flows run after the initial save but before commit. Queued asynchronous paths run after commit.

Common Exam Traps

  • Trap 1: Choosing Process Builder for new implementations. Any answer choice recommending Process Builder on modern exams is incorrect due to its formal deprecation.
  • Trap 2: Using After-Save Flows for same-record updates. While After-Save flows can update the triggering record, doing so triggers an unnecessary additional database transaction. Exam questions specifically test your ability to recognize when a Fast Field Update (Before-Save) is the architecturally superior choice.
  • Trap 3: Believing Flow fault paths execute database rollbacks. A Flow fault path allows you to handle errors gracefully (e.g., sending an admin email or displaying an error screen), but it does not roll back previously committed DML statements within earlier flow transactions. Use Custom Error to roll back a triggering save or Roll Back Records for supported pending screen-flow work. Apex savepoints provide granular control; none of these can undo work committed in an earlier transaction.

Official Source Check

Checked October 19, 2026: Workflow end of support and continued runtime.

Checked October 19, 2026: Migrate to Flow supported cases.

Loading diagram...
Architectural Automation Selection Decision Tree
Test Your Knowledge

Universal Containers has accumulated 18 legacy Workflow Rules and 4 Process Builders on the Case object over the past six years. Case edit transactions are experiencing noticeable latency, and customer support representatives report occasional save errors due to conflicting updates. An app builder is tasked with modernizing the automation architecture. What is the recommended strategy?

A

Use the Migrate to Flow tool to automatically convert each individual Workflow Rule and Process Builder into an identical individual flow, then keep the original automations active alongside the migrated flows so every Case edit is processed twice and reconciled for consistency

B

Audit all existing legacy automations, consolidate redundant criteria, and re-architect the logic into unified Record-Triggered Flows using Before-Save flows for same-record updates and After-Save flows for cross-object actions

C

Re-create all Workflow Rules and Process Builders in an unmanaged AppExchange package and deploy to production to bypass governor limits

D

Deactivate all legacy automations and implement a single autolaunched Screen Flow embedded in the Case utility bar

Test Your Knowledge

A financial services firm requires that when a commercial loan application record transitions to the 'Underwriting' stage, the record must be locked from editing, routed to the applicant's credit officer's direct supervisor for review, allow the supervisor's appointed proxy to sign off if the supervisor is traveling, and log an auditable history of all approval actions and comments. Which offered solution most directly provides this declarative approval workflow?

A

A Record-Triggered Flow configured with an Asynchronous Path

B

A Screen Flow with dynamic component visibility embedded on the Loan Lightning Record Page

C

A Schedule-Triggered Flow executing an automated Apex action nightly

D

A Multi-Step Approval Process with manager routing and delegated approver support

Test Your Knowledge

An app builder has configured three separate Record-Triggered Flows on the Opportunity object that all execute in the 'Actions and Related Records' after-save phase upon record update. The app builder must ensure that 'Flow A' executes first, followed by 'Flow B', and finally 'Flow C'. How should the app builder enforce this deterministic execution order?

A

Assign Trigger Order values (such as 10, 20, and 30) to each flow and verify the sequence in Flow Trigger Explorer

B

Rename the flow API names alphabetically so Salesforce processes them in alphabetical sequence

C

Combine all three flows into a single Screen Flow distributed via a Lightning Record Page quick action

D

Set the Version Number of Flow A higher than Flow B and Flow C, then deploy the flows in reverse order so the flow with the largest version number always executes first on every transaction

Sections you finish are checked off in the contents.