Sub topic 1
Why Workflow Rules and Process Builder are being retired
Prerequisites
This chapter assumes you have the following:
- Basic Salesforce Setup skills, including objects, fields, and records.
- Some familiarity with Workflow Rules or Process Builder in an existing org.
- Basic formula syntax, such as
AND(),IF(), andISPICKVAL(). - Access to a sandbox or Developer Edition org, so you can look at your own automation as you read.
You don't need to know Flow yet. Later chapters cover it.
What "retired" means
Salesforce has ended support for Workflow Rules and Process Builder. Flow is the single declarative automation tool going forward. The announced end-of-support date for both tools is December 31, 2025. Check the current Salesforce documentation for the latest wording, because the details of the policy have been refined over time.
"End of support" does not mean the automation disappears. It has these practical effects:
- Existing automation keeps running. Active Workflow Rules and processes continue to fire unless Salesforce announces a later change.
- Salesforce stops fixing defects. New bugs in either tool are no longer fixed, and support cases about them are not handled.
- You can't count on new functionality. All new automation features ship in Flow.
- Creation is being restricted. Workflow Rules can no longer be created in new orgs, and Salesforce has indicated it will restrict creating new processes and rules.
So the risk is gradual. Your org carries automation that nobody maintains, and the longer you wait, the more costly the migration becomes.
Why Salesforce is consolidating on Flow
Salesforce had several declarative tools with overlapping jobs. Each tool had its own limits, and the overlap made orgs harder to reason about.
| Tool | Typical use | Main limitations |
|---|---|---|
| Workflow Rule | Field update, email alert, task, or outbound message when a record meets criteria | Only four action types. Can update only the same record or, in some cases, its parent. No branching, no loops, no record creation |
| Process Builder | Multiple criteria nodes with actions such as create record, update related records, post to Chatter, and call Apex | Slower than Flow because it runs after save. One action cannot read the results of another. Hard to debug, with limited fault handling |
| Flow (record-triggered) | All of the above, plus branching, loops, subflows, fault paths, and before-save updates | A larger tool with more design choices |
Flow improves on both older tools in these ways:
- Performance. A before-save flow updates fields on the triggering record without an extra DML (database write) operation. Process Builder and Workflow Rules cannot do this in the same way.
- Logic. Flow supports decisions, loops, collections, variables, and subflows.
- Error handling. Fault paths let you handle a failed element instead of failing the whole transaction with a generic message.
- Debugging. Flow has a Debug mode and detailed run history, and it records errors in a way you can follow.
- One place to look. Instead of checking workflow rules, processes, and flows on one object, you review flows.
What migration involves
A migration is more than a conversion. You move behavior from one engine to another, and the new engine has different rules.
The later chapters follow these stages. These are the problems a careful migration must prevent:
- Duplicate firing. The old automation and its new flow both run on the same record.
- Lost behavior. The old tool did something implicitly, and the flow does not. An example is a Workflow Rule that fires only when a record is created or edited to meet criteria.
- Bulk failures. A flow that works for one record hits limits or errors when 200 records save together.
- Changed order. Flows run at a different point in the order of execution than workflow rules do.
Behavior that changes during migration
Even simple automation can behave differently after you rebuild it in Flow. The syntax of formulas is one example. A picklist comparison in a Workflow Rule uses ISPICKVAL, while a flow formula uses TEXT():
Workflow Rule formula:
AND(ISPICKVAL(StageName, "Closed Won"), Amount > 100000)
Flow entry condition (Formula Evaluates to True):
AND(TEXT({!$Record.StageName}) = "Closed Won", {!$Record.Amount} > 100000)
Workflow ISCHANGED(StageName) in a flow:
{!$Record.StageName} <> {!$Record__Prior.StageName}ISCHANGED has no flow formula equivalent. A flow compares $Record with $Record__Prior, and that comparison works only when the flow is triggered on update. Later chapters cover these mappings in detail.
Finding out what you have
Before you plan anything, find out how much automation your org contains. Process Builder processes are stored as flow definitions with the process type Workflow. You can list the active ones with a Tooling API query:
SELECT ApiName, Label, ProcessType, IsActive
FROM FlowDefinitionView
WHERE ProcessType = 'Workflow' AND IsActive = trueRun it in the Developer Console Query Editor with the Tooling API option checked, or in a Tooling API client. Workflow Rules have their own query, which lists each rule with the object it belongs to:
SELECT Id, Name, TableEnumOrId
FROM WorkflowRuleGroup the results by object. The objects with the most rules and processes are the riskiest to migrate, so they deserve the most testing. A later chapter covers inventory in more detail.
A sensible order of work
The retirement does not require migrating everything in one release. Most teams get better results by working in this order:
- List all active Workflow Rules and processes, grouped by object.
- Retire anything that is unused, duplicated, or obsolete rather than migrating it.
- Migrate one object at a time, combining that object's automation into a small number of flows.
- Test in a sandbox with bulk data, then deploy.
- Deactivate the old automation only when the new flow is active and verified.
Deleting dead automation is the cheapest part of the migration. Many orgs find that a large share of their old rules no longer matter.
Exercise
An admin says, "Salesforce ended support for Workflow Rules, so they stopped working on the deadline." Is this correct? Give two practical consequences of end of support that do apply.
Show answer
No. End of support does not turn off active automation, which keeps running. Two consequences that apply: Salesforce no longer fixes defects in these tools, and all new automation features ship only in Flow. Restrictions on creating new rules and processes are a third consequence.
Exercise
A Workflow Rule formula is AND(ISPICKVAL(Status, "Open"), ISCHANGED(Priority)). Name the two things that must change when you write this as a record-triggered flow condition.
Show answer
ISPICKVAL becomes TEXT({!$Record.Status}) = "Open". ISCHANGED(Priority) becomes {!$Record.Priority} <> {!$Record_Prior.Priority}, and the flow must be triggered on update (or on create or update with care) so that $Record_Prior is available.
Exercise
Why is it a mistake to activate a new flow while the old Workflow Rule or process is still active on the same object?
Show answer
Both run for the same record change, so actions can happen twice. Examples are duplicate tasks, duplicate emails, or conflicting field updates. Cut over by activating the flow and deactivating the old automation as one planned step.