Choosing the Right Declarative Automation Tool

5 minutes 5 Questions

Choosing the right declarative automation tool is a core skill for the Salesforce Certified Platform Administrator II exam. Salesforce has historically offered several declarative options—Workflow Rules, Process Builder, Approval Processes, and Flow Builder—but the platform's direction is clear: Flow is now the recommended tool for nearly all record-triggered and screen-based automation. Workflow Rules and Process Builder are retired for new creation, and Salesforce provides a Migrate to Flow tool to move legacy automation into Flow. When evaluating a requirement, start by identifying the trigger: Is the automation initiated by a record change, a schedule, a user action, or a platform event? Record-Triggered Flows handle inserts, updates, and deletes, and you must decide between a Before-Save flow (fast field updates on the same record, no DML needed) and an After-Save flow (creating related records, sending emails, calling subflows, or invoking actions). Scheduled-Triggered Flows run batch logic at set times, Screen Flows guide users through interactive steps, Autolaunched Flows are invoked by other processes or buttons, and Platform Event-Triggered Flows respond to events. Approval Processes remain the right choice when records require formal, multi-step sign-off with defined approvers, recall, and approval history tracking. Flow can submit records for approval but does not replace the approval engine itself. Also consider governance factors: order of execution, bulkification, governor limits, and avoiding multiple automations on the same object that could conflict. Best practice is to consolidate logic into one Before-Save and one After-Save flow per object where feasible, use entry conditions to limit when flows run, and document decisions. Choose declarative tools first; reserve Apex for complex logic, callouts, or performance needs that Flow cannot meet. Understanding these trade-offs helps administrators design scalable, maintainable automation aligned with Salesforce's roadmap.

Choosing the Right Declarative Automation Tool: A Complete Guide for the Salesforce Advanced Administrator Exam

Why This Topic Matters

Automation is the heart of what makes Salesforce valuable to a business, and as an Advanced Administrator you are expected to be the person who decides how a requirement gets automated. The Advanced Process Automation section of the exam carries significant weight, and a large portion of its questions are scenario-based: you are given a business requirement and asked which tool is the best fit. Choosing the wrong tool leads to brittle solutions, governor limit errors, recursion loops, duplicate logic across multiple tools, and difficult maintenance. Choosing the right tool leads to scalable, performant, and easily maintained automation. Salesforce has deliberately consolidated its declarative automation strategy around Flow Builder, retiring Workflow Rules and Process Builder, so the exam tests whether you understand the modern landscape, not the legacy one.

What Is Declarative Automation?

Declarative automation means building business logic with clicks instead of code. It includes any point-and-click feature that automatically performs an action when something happens in the org. The main declarative tools you must know are:

1. Flow Builder - the primary, Salesforce-recommended automation tool. Flow types include Record-Triggered Flows (before-save and after-save), Scheduled Flows, Screen Flows, Autolaunched Flows (no trigger), and Platform Event-Triggered Flows.
2. Approval Processes - structured, multi-step approval of records with submitters, approvers, entry criteria, and approval/rejection actions.
3. Validation Rules - prevent a record from being saved if its data does not meet defined criteria.
4. Formula Fields and Roll-Up Summary Fields - calculate values declaratively without any save-time automation at all.
5. Assignment Rules, Auto-Response Rules, Escalation Rules - specialized, object-specific automations for Leads and Cases.
6. Email Alerts - reusable notification actions called from Flows and Approval Processes.
7. Workflow Rules and Process Builder - retired. You can no longer create new ones, and Salesforce provides the Migrate to Flow tool. These appear on the exam mainly as distractors or in migration questions.

When declarative tools cannot meet the requirement, the answer is Apex (triggers, classes, invocable methods), which is programmatic, not declarative.

How It Works: The Decision Framework

To choose the right tool, walk through a consistent set of questions.

Step 1 - What triggers the automation?
- A record being created, updated, or deleted: Record-Triggered Flow.
- A specific time or recurring schedule with no record event: Scheduled Flow.
- A user needing to enter data or make choices through a guided UI: Screen Flow.
- A platform event message: Platform Event-Triggered Flow.
- A button, quick action, another flow, Apex, or an external system: Autolaunched Flow.
- A user requesting sign-off: Approval Process.
- Save-time data quality enforcement: Validation Rule.

Step 2 - Does the automation need to prevent a save or just react to it?
- Blocking a save with a user-facing error message: Validation Rule (simplest and most performant). A Record-Triggered Flow can also use a Custom Error element, but Validation Rules remain the first choice for straightforward criteria.
- Reacting after the record is saved: Record-Triggered Flow.

Step 3 - Which fields are being changed?
- Updating fields on the same record that triggered the flow: use a before-save Record-Triggered Flow (Fast Field Updates). It is the fastest option, requires no DML, and avoids an extra save cycle.
- Creating or updating related or unrelated records, sending emails, posting to Chatter, calling Apex, or sending outbound messages: use an after-save Record-Triggered Flow (Actions and Related Records).
- Deleting a record and acting on it: Record-Triggered Flow with the delete trigger.

Step 4 - Is a calculation enough?
- If you only need to display a value derived from other fields on the same record or parent record: Formula Field. No automation needed.
- If you need a count, sum, min, or max of child records in a master-detail relationship: Roll-Up Summary Field. This beats a flow because it is always accurate and requires no save logic.
- If the relationship is a lookup (not master-detail) or needs filtering beyond roll-up capabilities: Record-Triggered Flow on the child object that updates the parent, or a scheduled recalculation.

Step 5 - Does it need to happen later or repeatedly?
- Delayed action relative to a record event (for example, 3 days after Close Date): Scheduled Paths in a Record-Triggered Flow.
- Batch processing of many records at a fixed time, regardless of record changes (for example, nightly cleanup of stale leads): Scheduled Flow.
- Waiting for a condition or event in the middle of a process: Wait element in an Autolaunched or Record-Triggered Flow.

Step 6 - Does it involve people making decisions?
- Formal approval with approve/reject, delegated approvers, and approval history: Approval Process. Use a Flow to submit records for approval automatically when criteria are met, and use Flows as approval actions for more complex behavior than field updates and email alerts.
- Guided user input, wizards, or multi-screen data entry: Screen Flow, launched from a button, quick action, Lightning page, utility bar, or Experience site.

Step 7 - Is it a specialized object with a native tool?
- Routing Leads or Cases to users or queues on creation: Assignment Rules (and Omni-Channel for skills-based or capacity-based routing).
- Automatically replying to web-to-lead or email-to-case submissions: Auto-Response Rules.
- Escalating Cases that have not been resolved in time: Escalation Rules.
- Entitlement and milestone tracking: Entitlement Processes.
Native tools win because they are purpose-built, do not count against flow limits, and are expected by support teams.

Step 8 - Does it exceed declarative capabilities?
Choose Apex when you need complex logic over very large data volumes, intricate loops that risk flow element limits, custom callouts not supported by External Services, complex transaction control, or performance requirements that flows cannot meet. Even then, consider exposing Apex as an Invocable Action so Flow remains the orchestrator.

Key Design Principles the Exam Expects

- One automation tool per object where possible. Mixing legacy Workflow Rules, Process Builder, Flows, and Apex triggers on the same object creates unpredictable behavior and recursion. Consolidate into Flow.
- Favor before-save over after-save whenever the change is on the triggering record itself.
- Use entry conditions on Record-Triggered Flows (including the option to run only when specified changes are made) to avoid unnecessary executions and recursion.
- Understand the order of execution. Before-save flows run before validation rules complete and before Apex before-triggers finish; after-save flows run after assignment rules, auto-response rules, workflow rules, and escalation rules, and before roll-up summary recalculation finishes. Validation Rules run before any after-save automation.
- Bulkification. Flows are bulkified automatically, but you should avoid DML or Get Records elements inside loops. Collect records in a collection variable and perform one Create/Update outside the loop.
- Trigger order and subflows. You can set a Trigger Order on Record-Triggered Flows and break logic into reusable subflows to keep a single orchestrating flow per object per trigger type.
- Fault handling. Add fault paths to elements that can fail, and use a custom notification or error log so administrators are informed.
- Debug and test. Use Flow Debug, Flow Tests for Record-Triggered Flows, and sandbox validation before deploying.

Worked Scenarios

Scenario 1: When an Opportunity is marked Closed Won, set a hidden Won Date field on the same Opportunity. Answer: Before-save Record-Triggered Flow. Same-record field update, no DML needed.

Scenario 2: When an Opportunity is Closed Won, create a Project record and email the Account Owner. Answer: After-save Record-Triggered Flow, because it creates a related record and sends an email alert.

Scenario 3: Users must not be able to save a Case with Priority High and no Description. Answer: Validation Rule.

Scenario 4: Show the total of all Opportunity Amounts on the Account. Answer: Roll-Up Summary Field. Account-Opportunity is master-detail-like for roll-ups.

Scenario 5: Every Sunday night, update all Leads untouched for 90 days to Status Unqualified. Answer: Scheduled Flow.

Scenario 6: Seven days after a Contract is activated, send a reminder if no renewal Opportunity exists. Answer: Record-Triggered Flow with a Scheduled Path and a Decision element.

Scenario 7: Discounts over 20% require VP sign-off with an audit trail. Answer: Approval Process, optionally submitted automatically by a Flow.

Scenario 8: Support agents need a guided script that creates a Case, a Contact, and logs a Task in one go. Answer: Screen Flow launched from a quick action or Lightning page.

Scenario 9: The org has three Workflow Rules and two Process Builder processes on Account and needs a new automation. Answer: Migrate existing automations to Flow with the Migrate to Flow tool and build the new logic in a consolidated Record-Triggered Flow, not in a new Process Builder process.

Scenario 10: A flow must process 200,000 records nightly with complex nested logic that risks exceeding element execution limits. Answer: Batch Apex (or an Apex invocable action), because declarative limits are exceeded.

Exam Tips: Answering Questions on Choosing the Right Declarative Automation Tool

1. Read for the trigger first. Underline what starts the automation: a record change, a schedule, a user click, or an approval request. This immediately narrows the tool.
2. Look for the words 'same record' versus 'related record'. Same record points to before-save flow; related or external points to after-save flow.
3. If the requirement says 'prevent' or 'must not be able to save', think Validation Rule first. Only pick a flow if the logic needs data from other records that a validation rule formula cannot reach.
4. If a Formula or Roll-Up Summary field satisfies the need, it beats any flow. The exam rewards the simplest tool that fully meets the requirement.
5. Eliminate Workflow Rules and Process Builder as answers for any new automation. They are retired. If they appear, the correct answer usually involves migrating them to Flow.
6. Prefer declarative over Apex unless the question explicitly mentions limits, extremely large volumes, complex callouts, or logic that flows cannot handle. Phrases like 'without writing code' or 'the admin should' are strong clues for Flow.
7. Watch for timing keywords. 'After X days', 'at a specific time', or 'every night' signals Scheduled Paths or Scheduled Flows. 'Immediately upon save' signals a standard Record-Triggered Flow.
8. Recognize the native specialty tools. Lead and Case routing points to Assignment Rules, response emails to Auto-Response Rules, overdue cases to Escalation Rules, and sign-offs to Approval Processes. Do not reinvent these with flows.
9. Apply best-practice reasoning to 'what should the administrator recommend' questions. Correct answers typically consolidate automation into one tool per object, use entry conditions, avoid DML in loops, and include fault handling.
10. Beware of answers that work but are not the best. Many distractors are technically possible (a flow can update the same record after save, for example) but are not the recommended or most efficient choice. The exam asks for the best tool.
11. Know the order of execution well enough to answer why a value is or is not visible to a given automation, and why a before-save flow cannot send emails or create records.
12. Manage your time. Scenario questions are long; identify the trigger, the target (same vs related record), the timing, and the user interaction, then match to the tool. This four-point checklist resolves most questions in under a minute.

Summary

Choosing the right declarative automation tool is about matching the requirement to the simplest, most performant, Salesforce-recommended feature. Flow Builder is the center of the modern automation strategy, with before-save flows for same-record updates, after-save flows for related actions, scheduled paths and scheduled flows for time-based logic, and screen flows for user interaction. Surround Flow with purpose-built tools - Validation Rules, Formula and Roll-Up Summary fields, Approval Processes, and Lead/Case rules - and escalate to Apex only when declarative limits are reached. Master the decision framework, practice with scenarios, and you will handle this section of the Advanced Administrator exam with confidence.
Test mode:

Admin II - Choosing the Right Declarative Automation Tool Example Questions

Test your knowledge of Choosing the Right Declarative Automation Tool

Question 1

At Universal Containers, when a sales rep saves an opportunity with a discount above 20%, the sales director must approve it. Reps often forget to submit these requests, so submission must happen as soon as the record is saved. While a decision is pending, the opportunity must stay locked. On approval, the stage must change to Negotiation and a follow-up task must be assigned to finance. The administrator wants the simplest combination of tools that meets every requirement. What should the administrator recommend?

Question 2

At Universal Containers, each opportunity has a Contract End Date field. When an opportunity reaches Closed Won, a renewal opportunity must be created exactly 60 days before its Contract End Date. If the original opportunity is moved out of Closed Won before that day, the renewal must not be created. The administrator wants the simplest solution that meets both requirements. Which solution should the administrator configure?

Question 3

Ursa Major Solar has several thousand active contracts in Salesforce, and most of them will not be edited again before they expire. The administrator must make sure a renewal opportunity is created 60 days before each contract's End Date. This applies to these existing contracts and to every contract created from now on. Which solution meets the requirement?

More Choosing the Right Declarative Automation Tool questions
29 questions (total)