Salesforce Workflow Rules and Process Builder
Salesforce can perform actions automatically when certain conditions are met — sending an email, updating a field, or creating a task — without anyone clicking a button. This is automation. For years, the two primary automation tools in Salesforce were Workflow Rules and Process Builder. Understanding them matters because millions of Salesforce orgs still run on these tools, even as Salesforce now recommends migrating to Flow Builder for new automation.
What Is a Workflow Rule?
A Workflow Rule is a simple "if this, then that" automation on a single object. When a record is created or edited and meets the rule's criteria, Salesforce fires one or more automated actions.
The Thermostat Analogy
THERMOSTAT RULE:
IF temperature drops below 18°C
THEN turn on the heater
WORKFLOW RULE:
IF Opportunity.StageName changes to "Closed Won"
THEN send a congratulations email to the sales rep
AND create a task: "Kick off onboarding within 3 days"
Workflow Rule Components
Every Workflow Rule has these building blocks:
1. Evaluation Criteria
Defines when Salesforce checks the rule:
- Created — only when a new record is created
- Created and every time it's edited — checks every time the record is saved
- Created, and any time it's edited to subsequently meet criteria — checks only when the record moves from not meeting the criteria to meeting it
2. Rule Criteria
The condition that must be true for the rule to fire. You build this using field comparisons:
Opportunity: Stage EQUALS "Closed Won" AND Opportunity: Amount GREATER THAN 100000
Alternatively, you write a formula that evaluates to TRUE when the rule should fire.
3. Immediate Actions
These fire the moment the rule's criteria are met. Four types of immediate actions:
- Email Alert — send a predefined email to a user, contact, or email address
- Field Update — automatically change a field value on the record (or a related record)
- Task — create a new task and assign it to someone
- Outbound Message — send an XML message to an external web service
4. Time-Dependent Actions
These fire at a scheduled time relative to a date field. Example: 3 days before the Opportunity's Close Date, send the sales rep a reminder email. Or 7 days after a Case is created without being closed, escalate it to a manager.
TIMELINE: Day 0: Opportunity created (rule fires, criteria met) Day -3: [Time Trigger] Email: "Deal closing in 3 days — follow up!" Day 0: [Close Date] Deal closes Day +1: [Time Trigger] Task: "Send thank-you gift to customer"
Workflow Rule Limitations
Workflow Rules are simple and reliable, but they have significant limits:
- They work on only one object — cannot update a grandparent record or create related records on different objects.
- They cannot make decisions with multiple branches (no if/else logic beyond the main criteria).
- They cannot loop or process collections of records.
- They are now in maintenance mode — Salesforce no longer adds new features to Workflow Rules.
What Is Process Builder?
Process Builder is a visual automation tool introduced to replace Workflow Rules. It offers a flowchart-style canvas and supports more complex logic — multiple criteria groups with different actions for each group. Process Builder can also call Apex code and launch Flows.
How Process Builder Works
TRIGGER: When does it start?
(Record created, record edited, another process)
|
CRITERIA NODE 1: IF StageName = "Closed Won"
|-- YES → ACTION GROUP 1:
| - Field Update: IsWon__c = TRUE
| - Email Alert: Notify Manager
| - Launch Flow: Onboarding Flow
|
CRITERIA NODE 2: IF StageName = "Closed Lost"
|-- YES → ACTION GROUP 2:
- Task: Follow-up in 30 days
- Field Update: Lost_Reason_Required__c = TRUE
Process Builder Advantages Over Workflow Rules
- Multiple criteria groups — different actions for different conditions in one process
- Create records (not just tasks) — you can create any related record
- Update related records — update fields on parent or child records
- Invoke Apex — call custom code when built-in actions are not enough
- Launch a Flow — trigger a Flow Builder automation
- Post to Chatter — automatically post updates on records
Process Builder Limitations
Despite being more powerful than Workflow Rules, Process Builder has its own limits:
- It is also in maintenance mode — Salesforce stopped building new features for it.
- It can be slow when multiple processes stack on top of each other on the same object.
- Debugging is harder than with Flow Builder.
- Complex logic becomes confusing to read and maintain.
Workflow Rules vs. Process Builder vs. Flow
| Feature | Workflow Rule | Process Builder | Flow Builder |
|---|---|---|---|
| Visual canvas | No | Yes | Yes (more advanced) |
| Multiple conditions | Limited | Yes | Yes |
| Create any record type | Task only | Yes | Yes |
| Loop through records | No | No | Yes |
| Screen interactions | No | No | Yes (Screen Flow) |
| Salesforce recommended | No (migrate away) | No (migrate away) | Yes |
Should You Learn Workflow Rules and Process Builder?
Yes — for two reasons. First, most existing Salesforce orgs have hundreds of active Workflow Rules and Process Builder automations that need to be maintained and eventually migrated to Flow. Second, Salesforce certification exams still test knowledge of both tools. Understanding them makes you a well-rounded administrator.
Key Points
- Workflow Rules automate simple "if this, then that" actions on a single object — email alerts, field updates, tasks, and outbound messages.
- Time-dependent actions in Workflow Rules fire at a scheduled point relative to a date field.
- Process Builder offers a visual, multi-branch automation builder that can create records, update related objects, and launch Flows.
- Both tools are in maintenance mode — Salesforce recommends using Flow Builder for all new automation.
- Understanding Workflow Rules and Process Builder remains important for maintaining existing orgs and passing Salesforce certifications.
