Salesforce provides several powerful declarative tools to automate business processes, enhance efficiency, and maintain data integrity. Understanding these tools and their appropriate use cases is crucial for a Salesforce Administrator.
## Workflow Rules
Workflow Rules are the oldest automation tool, primarily used for simple, single-object automation. While still functional, Salesforce recommends using Flow for new automation. They consist of evaluation criteria (e.g., created, created & every time it's edited) and rule criteria.
- Actions: Task (assigns a task), Email Alert (sends an email), Field Update (changes a field on the triggered record or its master in a master-detail relationship), Outbound Message (sends data to an external system).
## Process Builder
Process Builder is a more powerful, node-based automation tool that extends the capabilities of Workflow Rules. Salesforce is also deprecating Process Builder in favor of Flow.
- It can automate processes across multiple objects and perform more complex actions than Workflow Rules.
- Key capabilities: Creating records, updating any related record (parent, child, or unrelated via lookup), invoking a Flow, calling Apex code, posting to Chatter.
## Flow Builder
Flow Builder is Salesforce's most powerful and recommended declarative automation tool. It can handle almost any business process automation requirement, offering high flexibility and control.
- Flow types:
- Screen Flow: Guides users through a business process with screens for input.
- Record-Triggered Flow: Launches when a record is created, updated, or deleted (can be before-save or after-save).
- Schedule-Triggered Flow: Runs at specified times and frequencies.
- AutoLaunched Flow (No Trigger): Can be invoked by Apex, Process Builder, or REST API.
- Elements include: Get Records, Create Records, Update Records, Delete Records, Decisions, Assignments, and Actions.
## Approval Processes
Approval Processes are used to automate the process of approving records that require multiple steps or multiple approvers.
- They define the entry criteria, approval steps (with assigned approvers), and actions to be taken at each stage (initial submission, final approval, final rejection, recall).
- Actions are similar to Workflow Rules (Field Update, Email Alert, Task, Outbound Message).
## Choosing the Right Tool
- For new automation, Flow Builder is almost always the preferred choice due to its versatility and power.
- Use Approval Processes specifically for multi-step record approval workflows.
- Understand Workflow Rules and Process Builder for maintaining existing automation in an org, but avoid them for new implementations where Flow is capable.
What are the four types of actions available with Workflow Rules?
Task, Email Alert, Field Update, Outbound Message.
tap to reveal
Which automation tool is Salesforce's recommended solution for new declarative automation?
Flow Builder.
tap to reveal
When would you use an Approval Process?
To automate multi-step approval requirements for records.
tap to reveal
What is a key capability of Process Builder that Workflow Rules lack?
Creating records or updating related records (e.g., child records or unrelated records via lookup).
tap to reveal
Name two types of Flows.
Screen Flow, Record-Triggered Flow, Schedule-Triggered Flow, AutoLaunched Flow (any two).
tap to reveal
What is the primary difference between a 'before-save' and 'after-save' Record-Triggered Flow?
Before-save flows run before the record is committed to the database and are faster for updating the triggering record's fields, as they don't require an extra DML operation.
tap to reveal
Can Workflow Rules update fields on a related record (e.g., a child record or a lookup-related record)?
No, Workflow Rules can only update fields on the record that triggered the rule or its master record in a master-detail relationship.
tap to reveal