Learn Process Automation (Admin II) with Interactive Flashcards

Master key concepts in Process Automation through our interactive flashcard system. Click on each card to reveal detailed explanations and enhance your understanding.

Choosing the Right Declarative Automation Tool

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.

Before-Save Versus After-Save Record-Triggered Flows

In Salesforce Flow Builder, record-triggered flows run automatically when a record is created, updated, or deleted. When configuring the trigger, you choose when the flow executes relative to the database save operation: before the record is saved or after the record is saved. Understanding this distinction is a key Platform Administrator II objective.

Before-save flows (labeled 'Fast Field Updates') execute before the record is committed to the database. They are designed solely to update fields on the triggering record itself using the $Record global variable. Because the record is already in memory and has not yet been written, no additional DML is required, making these flows roughly ten times faster than after-save flows or workflow rules. They run before most other automation, including before-save Apex triggers, assignment rules, and validation rules. Limitations: they cannot create, update, or delete other records, call actions, send emails, invoke subflows (except in limited cases), or make callouts. Use cases include setting default values, normalizing data formats, or calculating a field based on other fields on the same record.

After-save flows (labeled 'Actions and Related Records') execute after the record has been committed and has an ID. They can perform a full range of operations: create or update related records, delete records, send emails and custom notifications, post to Chatter, call invocable Apex, launch subflows, and schedule paths that run at a later time. However, updating the triggering record in an after-save flow requires an extra DML statement, which costs more performance and can cause recursion if not controlled with entry conditions.

Best practice guidance: use before-save flows whenever the requirement is simply to modify the same record; reserve after-save flows for cross-object updates, notifications, or scheduled actions. Many administrators consolidate automation into one before-save and one after-save flow per object to control order of execution and maintain performance.

Exam tip: if a question emphasizes speed and same-record field updates, the answer is before-save; if it involves related records, emails, or scheduled paths, choose after-save.

Entry Conditions and Run-When-Updated Criteria

In Salesforce Flow (record-triggered flows), Entry Conditions and Run-When-Updated Criteria control when automation actually fires, which is critical for performance, governor limits, and predictable behavior—key topics for the Platform Administrator II exam.

Entry Conditions are filters defined on the Start element of a record-triggered flow. They determine which records qualify to enter the flow after the trigger event (Created, Updated, or Created or Updated) occurs. For example, you might set Status = 'Closed Won' and Amount > 100000 so only qualifying Opportunities run the logic. Conditions can be combined with AND, OR, or custom logic, and you can also use a formula. Using entry conditions is a best practice because records that don't meet them never enter the flow, saving interview executions and reducing the risk of hitting limits.

Run-When-Updated Criteria (the option 'Only when a record is updated to meet the condition requirements') refines behavior for update triggers. By default ('Every time a record is updated and meets the condition requirements'), the flow runs on every save as long as the record currently satisfies the entry conditions—even if nothing relevant changed. With the 'updated to meet' option, Salesforce compares prior and current values (similar to ISCHANGED or the Process Builder 'only when specified changes are made' setting). The flow runs only when the record transitions from not meeting the conditions to meeting them. This prevents redundant executions, duplicate emails or tasks, and recursive loops.

For the exam, remember: entry conditions reduce which records enter the flow; run-when-updated criteria reduce how often qualifying records re-enter. Combine them with fast field updates (before-save) when possible, keep conditions simple and indexed, and use formulas for complex evaluations. Properly applied, these settings replace Workflow Rule and Process Builder evaluation criteria, aligning with Salesforce's recommendation to migrate all automation to Flow.

Scheduled Paths and Schedule-Triggered Flows

In Salesforce Flow, Scheduled Paths and Schedule-Triggered Flows are two distinct time-based automation tools that Platform Administrators must understand and differentiate.

Scheduled Paths are a feature of Record-Triggered Flows. When a record is created or updated and meets the entry criteria, the flow can execute actions immediately on the main path and also branch into one or more Scheduled Paths that run at a specified time offset. The offset can be based on the trigger time (for example, 2 days after the record is saved) or on a date/time field on the record (for example, 1 day before the Close Date). Scheduled Paths always run in the context of a single triggering record, run asynchronously, and effectively replace time-dependent actions in Workflow Rules and scheduled actions in Process Builder. Common use cases include sending a reminder email a week before a contract expires or escalating a case if it remains open for 48 hours. If the record no longer meets the entry criteria when the scheduled time arrives (and the flow is configured to re-evaluate), the pending action is removed. Pending scheduled paths can be monitored in Setup under Time-Based Workflow.

Schedule-Triggered Flows, by contrast, are a separate flow type that run on a recurring schedule you define: once, daily, or weekly at a chosen start date and time. Rather than reacting to a single record change, they execute for a batch of records. You can optionally specify an object and filter conditions, and the flow runs once for each matching record, exposing it as the $Record global variable. Schedule-Triggered Flows run in system context and are ideal for nightly data cleanup, bulk field updates, periodic status checks, or generating recurring tasks. They count against the daily limit of 250,000 scheduled flow interviews per org (or more based on licenses).

In summary: Scheduled Paths react to individual record events with delayed actions, while Schedule-Triggered Flows proactively process sets of records on a fixed cadence.

Screen Flows

Screen Flows are a type of Salesforce Flow in Flow Builder that guide users through an interactive, step-by-step process with a visual interface. Unlike record-triggered or scheduled flows, which run automatically in the background, Screen Flows require user interaction and are launched manually from Lightning pages, utility bars, quick actions, Experience Cloud sites, custom buttons, or embedded in other flows. For Platform Administrator II candidates, understanding Screen Flows is essential because they bridge declarative automation with guided user experience.

A Screen Flow consists of Screen elements that display inputs (text, picklists, checkboxes, lookups, dates, file uploads, display text, and custom Lightning Web Components) and logic elements such as Decision, Assignment, Loop, and Collection Sort/Filter. Data elements (Get, Create, Update, Delete Records) interact with the database. Variables, formulas, and resources store and manipulate values throughout the flow. Subflows allow reuse of common logic, and Fault paths handle errors gracefully with meaningful messages instead of unhandled exceptions.

Common use cases include guided data entry (e.g., creating an Account, Contact, and Opportunity together), call scripts for service agents, wizards for complex onboarding, and replacing custom Visualforce or Lightning components with no-code solutions. Screen Flows support conditional field visibility, validation on input components, and reactive components (Winter '24+) where one component responds to changes in another on the same screen.

From an administrative standpoint, Screen Flows run in user context by default, respecting field-level security and sharing, though they can be set to system context without sharing when necessary. Admins must manage versions, activate the flow, test thoroughly using the Debug tool, and assign access via profiles or permission sets (Run Flows permission or specific flow access). Best practices include avoiding DML inside loops, using descriptive labels, limiting screens to reduce user fatigue, and documenting with descriptions. Screen Flows exemplify Salesforce's shift toward Flow as the primary automation tool following the retirement of Workflow Rules and Process Builder.

Autolaunched Flows and Subflows

In Salesforce Flow, an Autolaunched Flow is a flow that runs in the background without user interaction or screens. Unlike Screen Flows, which present a UI to collect input, Autolaunched Flows execute automatically when triggered by something else in the platform. For the Platform Administrator II exam, you should know the common ways they are launched: from Record-Triggered Flows (before or after save), Schedule-Triggered Flows (running at a set time for a batch of records), Platform Event-Triggered Flows, Apex code (via the Interview.start method), REST API, custom buttons or quick actions, and legacy Process Builder. Autolaunched Flows typically perform data manipulation such as creating, updating, deleting, or querying records, sending emails, posting to Chatter, or calling invocable Apex actions. Because they run without a user watching, they must handle errors gracefully using Fault Paths connected to Get, Create, Update, or Delete elements, and they are bound by governor limits such as SOQL query and DML limits. A Subflow is a flow that is called from within another flow using the Subflow element. This allows administrators to build reusable, modular logic once and reference it from multiple parent flows. For example, a Subflow that calculates a discount or validates an address can be shared across several record-triggered or screen flows. Subflows receive data through input variables (marked Available for Input) and return results through output variables (marked Available for Output). The parent flow passes values into the Subflow, waits for it to complete, and then continues with the returned values. Key benefits include reduced duplication, easier maintenance, and cleaner design. An important rule: an Autolaunched Subflow cannot contain Screen elements if the parent is autolaunched, since there is no user interface available. Best practices include limiting the number of record-triggered flows per object, using Subflows to centralize shared logic, naming variables clearly, and testing with Debug mode before activating in production.

Platform Event-Triggered Flows

Platform Event-Triggered Flows are a type of autolaunched flow in Salesforce Flow Builder that start automatically when a platform event message is received. Platform events are part of Salesforce's event-driven architecture, enabling publish/subscribe communication between Salesforce and external systems or between different parts of the platform. For the Platform Administrator II exam, understanding this automation type is important because it extends declarative process automation beyond record changes and schedules.

How they work: First, an administrator defines a custom platform event (e.g., Order_Shipped__e) in Setup with custom fields that carry the message payload. When a publisher (Apex, an API call, another flow, or an external system via the Streaming API/REST) publishes an event, Salesforce delivers it to all subscribers. A Platform Event-Triggered Flow subscribes to that event; each published message launches a new flow interview, and the event's field values are available via the $Record global variable.

Key characteristics: These flows run asynchronously in system context, meaning they ignore the running user's permissions and sharing (the flow runs as the Automated Process user by default). They cannot have screens since there is no user interaction. They support standard elements such as Get Records, Create/Update/Delete Records, Decisions, Loops, Assignments, subflows, and Actions, so they can update related records, send notifications, or call external services.

Use cases include integrating with external systems (e.g., updating a Case when a shipping system publishes a delivery event), decoupling complex processing from record saves, and reacting to high-volume events without tightly coupling systems.

Considerations: Debugging is harder because execution is asynchronous; failures appear in the Automated Process user's email or Paused and Failed Flow Interviews. Admins should monitor event delivery limits, understand that events are not stored as records (though they are retained for 72 hours for replay), and design flows to be idempotent since redelivery may occur. Comparing them to Record-Triggered and Schedule-Triggered Flows helps clarify when each is appropriate.

Get Records, Loops, Collections and Decisions in Flow

In Salesforce Flow, four core building blocks enable data-driven automation and are essential knowledge for the Platform Administrator II exam.

Get Records retrieves Salesforce records into a flow. You choose an object, define filter conditions, set sort order, and specify whether to store only the first record or all matching records. Results can be stored automatically in a flow-created variable or manually in a record variable (single record) or record collection variable (multiple records). You can also choose to store all fields or selected fields. A key best practice is to use Get Records outside loops to avoid hitting SOQL governor limits (100 queries per transaction).

Collections are variables that hold multiple values of the same data type, such as text, numbers, or records. Record collection variables are the most common, typically populated by Get Records or assembled via Assignment elements using the 'Add' operator. Collections allow bulk processing and are critical for bulkification—for example, adding updated records to a collection inside a loop, then performing one Update Records element after the loop finishes, rather than executing DML on each iteration.

Loops iterate over a collection one item at a time. Each iteration exposes a loop variable (the current item) that you can read or modify using Assignment elements. The loop has two paths: 'For Each Item' (executed per record) and 'After Last Item' (executed once when finished). Never place Get Records, Create, Update, or Delete elements inside a loop, as this risks governor limit failures.

Decisions act as branching logic, similar to IF/ELSE statements. You define one or more outcomes with conditions using AND/OR logic or custom condition logic, plus a default outcome. Decisions route the flow based on record field values, variables, or formula results, and are often used within loops to evaluate each record.

Together, these elements form the pattern: Get Records → Loop → Decision → Assignment → DML after loop.

Bulkification and Governor Limits in Flows

In Salesforce, bulkification refers to designing automation so it processes many records efficiently in a single transaction rather than one record at a time. Governor limits are the per-transaction ceilings Salesforce enforces on a multi-tenant platform to prevent any single process from monopolizing shared resources. For Platform Administrator II candidates, understanding how these two concepts interact in Flow is essential for building scalable, reliable automation.

Key governor limits relevant to Flows include: 100 SOQL queries per transaction, 150 DML statements per transaction, 2,000 executed elements per flow interview (including loop iterations), 50,000 records retrieved by queries, and CPU time limits (10 seconds synchronous, 60 seconds asynchronous). Exceeding any of these causes the entire transaction to fail with an unhandled fault.

Salesforce automatically bulkifies record-triggered flows: when a data load or bulk update triggers a flow on 200 records, the platform batches the interviews and combines their Get Records, Create, Update, and Delete operations into bulk calls. However, this automatic bulkification only works if the flow is designed correctly. The most common anti-pattern is placing a Get Records, Create Records, Update Records, or Delete Records element inside a Loop. Each iteration then issues its own query or DML statement, quickly hitting the 100 or 150 limits.

Best practices include: query records once before the loop and store them in a collection; inside the loop, use Assignment elements to modify records and add them to a collection variable; after the loop, perform a single Create or Update Records element on the entire collection. Use Collection Filter and Transform elements instead of repeated queries. Apply entry conditions to limit when record-triggered flows fire, and choose before-save flows for same-record field updates since they avoid extra DML. For heavy processing, consider scheduled paths or asynchronous paths, which run in separate transactions with higher limits. Fault paths should be added to handle errors gracefully.

Fault Paths and Error Handling in Flows

In Salesforce Flow, Fault Paths (also called fault connectors) are the primary mechanism for handling errors that occur during flow execution, a key topic for Platform Administrator II and Process Automation certifications. When a flow element that interacts with the database or external systems—such as Create Records, Update Records, Delete Records, Get Records, Action (Apex, Email Alert, Submit for Approval), or Subflow—fails at runtime, the flow would normally terminate with an unhandled fault. For screen flows, the user sees a generic error message; for autolaunched or record-triggered flows, the transaction rolls back and the flow administrator (or the Apex Exception Email recipients) receives an email containing the error details. A fault path lets you intercept that failure and define what should happen instead. You add it by dragging a connector from the element to another element and selecting the 'Fault' option, shown as a red dashed line. Within the fault path, you can reference the system variable $Flow.FaultMessage to capture the exact error text, which is useful for displaying a friendly message on a screen, logging the error to a custom object, sending an email alert to an administrator, posting to Chatter, or gracefully ending the flow. Best practices include adding fault paths to every DML and callout element, centralizing error handling by routing multiple fault connectors to a single logging or notification element, avoiding exposing raw technical messages to end users, and using Debug mode and the Flow Error Email to test failure scenarios. Note that fault paths do not catch everything: errors like unhandled exceptions in Apex invoked outside the fault connector, or faults caused by hitting governor limits, may still fail. Also remember that in record-triggered flows, a fault during a before-save or after-save operation can block the triggering record from saving, so thoughtful error handling improves both user experience and data integrity. Rollback behavior and transaction boundaries should also be considered.

Approval Processes: Steps, Approvers and Actions

An Approval Process in Salesforce is an automated process your organization uses to approve records, defining the steps necessary for a record to be approved and who must approve it at each step. For the Platform Administrator II exam, you should understand three core components: Steps, Approvers, and Actions.

Steps define the sequence a record follows. Each approval process has entry criteria (which records qualify), and each step has its own criteria to determine whether the record enters that step, skips it, or is automatically approved/rejected. Steps are evaluated in order, and you can configure whether a rejection at any step sends the record back to the previous step or performs the final rejection actions. Only one approval process can be active per object/criteria combination at a time, though multiple processes can exist.

Approvers are the users responsible for responding at each step. Options include: a specific user or users, a queue (for certain objects), the record owner's manager (via the user's Manager field or a custom hierarchical relationship field), or allowing the submitter to choose the approver manually. When assigning multiple approvers, you choose whether unanimous approval is required or the first response wins. Delegated approvers can act on behalf of assigned approvers if enabled.

Actions occur at four key moments: Initial Submission Actions (when the record is submitted, such as locking it and setting a status field), Approval Actions (per step, when approved), Rejection Actions (per step, when rejected), Recall Actions (if the submitter recalls the request), and Final Approval/Final Rejection Actions (when the entire process concludes). Available action types are Field Update, Email Alert, Task, and Outbound Message. Records are typically locked during approval, and you can allow admins or current approvers to edit locked records.

Mastering these components lets you design robust, auditable approval workflows aligned with business requirements.

Multi-Step and Parallel Approvals

In Salesforce, approval processes automate how records (like opportunities, expense reports, or discount requests) are reviewed and approved. For the Platform Administrator II exam, you need to understand how multi-step and parallel approvals extend basic approval logic.

Multi-Step Approvals: A multi-step approval process contains two or more approval steps executed in sequence. Each step defines who the approver is (a specific user, the submitter's manager, a queue, or a user lookup field on the record), the entry criteria for that step, and what happens on approval or rejection. For example, a discount request might go first to the Sales Manager, then to the VP of Sales if the discount exceeds 20%. Each step can have its own step criteria, so some records skip steps that don't apply. Rejection behavior can be configured per step: either perform all rejection actions (final rejection) or go back to the previous step. Approval actions (field updates, email alerts, tasks, outbound messages) can be attached to each step, as well as to initial submission, final approval, final rejection, and recall.

Parallel Approvals: Within a single step, you can assign the record to multiple approvers simultaneously. This is configured by selecting 'Automatically assign to approver(s)' and adding up to 25 users or related users. You then choose the approval type: 'Unanimous' requires all assigned approvers to approve before the step passes, while 'First response' means the first approver to act decides the outcome for that step. Parallel approvals are useful when, for instance, both Legal and Finance must sign off on a contract at the same time.

Key Considerations: Delegated approvers can act if enabled; records are locked during approval; and the Approval History related list tracks each step. Combining multi-step sequencing with parallel approvers lets administrators model complex business processes declaratively, without code, while ensuring compliance and visibility.

Troubleshooting Approval Processes and Record Locking

Troubleshooting Approval Processes in Salesforce Platform Administrator II requires understanding how records move through approval steps and why records become locked. When a record enters an approval process, Salesforce locks it by default so that only approvers and administrators can edit it. This prevents data changes while a decision is pending. A common troubleshooting scenario is a user reporting they cannot edit a record; the first check is whether the record is currently in an approval process. The Approval History related list shows the current step, pending approver, and any comments. Administrators can use Approval Request Settings to allow the record owner or administrator to edit locked records, and from Spring '19 onward, Apex (Approval.lock and Approval.unlock) and Flow can programmatically lock or unlock records when the 'Enable record locking and unlocking in Apex' setting is active. Troubleshooting entry criteria is another frequent task. If a record does not enter the process, verify that the entry criteria match the record's field values and that the submitting user is in the allowed submitter list. Check that the initial submitter and approver assignments resolve correctly, since a blank manager field or inactive user can cause the submission to fail with an error. Field updates in Initial Submission, Approval, and Rejection actions can conflict with validation rules, producing errors at the approval step, so review validation rules and ensure the fields being updated exist on the page layout if required. Email alerts not firing usually indicate deliverability settings or missing email addresses. Also review process order: only one approval process evaluates per submission based on order and criteria. Use Debug Logs with Workflow category set to Finer to trace evaluation. When a process must be changed while records are pending, Salesforce restricts edits to active processes; cloning, deactivating, and recalling pending records is often necessary. Finally, remember that record locking interacts with Flows and Apex triggers, which may fail when attempting to update a locked record, so design automation to respect approval states.

Formula Fields and Validation Rules in Automation Design

In Salesforce Platform Administrator II, Formula Fields and Validation Rules are foundational declarative tools that often reduce the need for heavier automation like Flows or Apex. Understanding when to use them is key to sound automation design.

Formula Fields are read-only fields that calculate values in real time based on other fields, related records (via lookup or master-detail), or system values. They never store data; they compute on display or when referenced. Common uses include deriving a status (e.g., IF(Amount > 100000, 'Enterprise', 'Standard')), displaying parent data on a child record, calculating date differences, or building image indicators with IMAGE() and HYPERLINK(). Because they are always current, they are ideal for values that must reflect live data without triggering updates. Limitations include a 3,900-character compile size, inability to reference child records (use Roll-Up Summaries instead), and no ability to trigger workflows or be edited directly.

Validation Rules enforce data quality by evaluating a formula at save time; if the expression returns TRUE, the record is blocked and an error message is shown at the top of the page or on a specific field. They use functions like ISBLANK, ISCHANGED, ISNEW, PRIORVALUE, and $Profile or $User to make rules conditional on who is editing and what changed. Admins should design rules to be bypassable for integrations or admins (e.g., checking a custom permission or profile) and keep error messages clear and actionable.

In automation design, Formula Fields and Validation Rules represent the 'first choice' layer: they execute before record-triggered Flows, run synchronously, and consume no automation limits. Best practices include using formulas for derived data instead of field updates, using validation rules to guard data integrity rather than Flow fault paths, documenting rules, testing in a sandbox, and remembering that validation rules fire during Flow and Apex updates too, which can cause automation failures if not accounted for.

Email Alerts and Outbound Messages

In Salesforce Process Automation, Email Alerts and Outbound Messages are two declarative actions that can be triggered by Workflow Rules, Approval Processes, Flows (email alerts), and Entitlement/Milestone processes, allowing admins to automate communication without code.

Email Alerts: An Email Alert is an action that sends a predefined email template to specified recipients when triggering criteria are met. Key components include: (1) the email template (Text, HTML, Custom, or Visualforce) containing merge fields; (2) recipients, which can be users, roles, public groups, the record owner, account team members, email fields on the record, or related contacts/leads; and (3) the From address, which can be the current user or an organization-wide email address. Email Alerts are reusable across automation tools and are object-specific. Important limits: 1,000 emails per standard license per day across the org, and up to 2,000,000 per 24 hours org-wide. Email Alerts are commonly used for approval notifications, case escalation, and reminders. In Flow, use the 'Send Email Alert' action (preferred) or the 'Send Email' core action.

Outbound Messages: An Outbound Message sends a SOAP XML message containing specified field values from the record to a designated external endpoint URL when triggering criteria are met. It is a point-and-click integration mechanism. Configuration includes: the object, endpoint URL, the user whose session ID can optionally be sent, and the fields to include. Salesforce retries failed deliveries for up to 24 hours, and admins can monitor the Outbound Message queue (Setup > Outbound Messages > View Message Delivery Status). Unlike Email Alerts, Outbound Messages are available in Workflow Rules and Approval Processes, and in Flow via record-triggered flows (added in recent releases). Note that Workflow Rules are being retired in favor of Flow, so new automation should be built in Flow Builder.

Exam tip: choose Email Alerts for human notification and Outbound Messages for system-to-system integration without Apex.

Debugging Flows and Flow Error Emails

Debugging Flows and Flow Error Emails are essential troubleshooting tools for Salesforce administrators preparing for the Platform Administrator II certification. In Flow Builder, the Debug feature lets you run a flow in a safe mode before activating it. When you click Debug, you can choose options such as 'Show details of what's executed and render flow in Lookup' and 'Run flow in rollback mode,' which prevents database changes from being committed. You can also input test values for variables, and for record-triggered flows, select a sample record to simulate the trigger. As the flow runs, the Debug Details panel displays each element executed, the values of variables and resources at every step, decision outcomes, and any errors or fault paths taken. This granular visibility helps you pinpoint logic mistakes, null values, or unhandled faults. Additionally, 'Debug on Canvas' highlights the executed path visually, making it easier to trace complex branching. Flow Error Emails are automatically sent when an active flow fails at runtime without a fault connector handling the error. By default, these emails go to the user who last modified the flow, but administrators can change this in Process Automation Settings to send them to the Apex Exception Email recipients instead, ensuring the right team is notified. The email contains the flow name, the interview ID, the user running the flow, the error message, and a detailed list of elements executed up to the failure, including variable values. Common errors include 'Too many SOQL queries' (governor limits), 'Unable to obtain exclusive access' (record locking), and null pointer issues from referencing unset variables. Best practices include adding fault paths to DML and Get elements, using Custom Error or screen components to display friendly messages, and reviewing the Paused and Failed Flow Interviews list in Setup. Mastering both features enables proactive error handling and faster resolution of automation issues.

Troubleshooting Automation with Debug Logs

Troubleshooting automation with Debug Logs is a core skill for a Salesforce Platform Administrator II, especially when flows, approval processes, validation rules, or Apex triggers behave unexpectedly. Debug Logs capture a detailed, chronological record of what happens on the platform during a transaction, letting you see exactly which automations fired, in what order, and where errors occurred.

To begin, navigate to Setup > Debug Logs and create a Trace Flag. A trace flag specifies the traced entity (a user, Apex class, or Apex trigger), a start and expiration time, and a Debug Level. The Debug Level controls verbosity across categories such as Workflow, Apex Code, Database, Validation, Callouts, and System. For automation troubleshooting, set Workflow to FINER or FINEST to capture flow and process details, and Apex Code to DEBUG or higher if triggers are involved. Keep other categories lower to avoid hitting the 20 MB per-log limit or the 1,000 MB per-org retention limit.

Once the trace flag is active, reproduce the issue by performing the action as the traced user. Then open the generated log and review key events: CODE_UNIT_STARTED and CODE_UNIT_FINISHED show entry and exit points, FLOW_START_INTERVIEW and FLOW_ELEMENT_BEGIN reveal which flow elements executed, WF_RULE_EVAL_BEGIN shows workflow and approval evaluation, VALIDATION_RULE shows pass/fail outcomes, and DML_BEGIN shows record operations. Lines containing FATAL_ERROR or EXCEPTION_THROWN pinpoint failures such as null references, unhandled faults, or governor limit violations. The LIMIT_USAGE_FOR_NS section helps identify SOQL query, DML statement, or CPU time overages caused by recursive automation.

Best practices include understanding the order of execution (validation rules, before-triggers, after-triggers, assignment rules, record-triggered flows, workflow, escalation rules), checking Setup Audit Trail for recent changes, using Flow Debug mode alongside logs, and leveraging the Developer Console's Log Inspector for filtering and timeline views. Delete expired trace flags afterward to preserve log storage and avoid performance impacts.

Migrating Workflow Rules and Process Builder to Flow

Salesforce is retiring Workflow Rules and Process Builder in favor of Flow Builder as the single declarative automation tool. For Platform Administrator II candidates, understanding the migration path is essential. Salesforce stopped allowing creation of new Workflow Rules and Processes (Winter '23), and existing ones are planned for end of support, so admins must move legacy automation into Flow.

Salesforce provides the Migrate to Flow tool (Setup > Migrate to Flow). It lists active Workflow Rules and Process Builder processes and converts them into record-triggered flows. Workflow Rule migration supports field updates, email alerts, outbound messages, and tasks, including time-dependent actions, which become scheduled paths. Process Builder migration supports many action types such as record updates, record creation, email alerts, and invoking other processes or flows, though some features (certain formula functions, custom notifications, Chatter posts in some cases) may require manual rework. After conversion, the tool creates the flow in an inactive state; the admin reviews the logic, tests in a sandbox, activates the flow, and then deactivates the original rule or process to avoid duplicate actions.

Best practices include: inventory and document all automation per object before migrating; consolidate multiple rules into one or a few record-triggered flows per object to simplify order of execution and improve performance; use Fast Field Updates (before-save) for same-record field changes and Actions and Related Records (after-save) for related records, emails, or external calls; leverage entry conditions and 'only when a record is updated to meet condition requirements' to replicate ISCHANGED behavior; add fault paths and use the debug tool; and set Flow Trigger Explorer or trigger order to control sequencing.

Migration also changes order of execution, since before-save flows run earlier than Workflow Rules did, so recursion and validation interactions must be retested. Communicating changes, using change sets or DevOps Center for deployment, and monitoring with Flow error emails complete a successful migration.

Order of Execution

Order of Execution in Salesforce describes the sequence of events that occur when a record is saved (inserted, updated, or upserted). Understanding it is essential for Platform Administrator II candidates because it determines how declarative automation and code interact, which can affect data integrity, recursion, and unexpected results.

When a record is saved, Salesforce follows these steps: First, the original record is loaded from the database (or initialized for an insert). Next, system validation rules run, such as required fields, field formats, and maximum field lengths. Then, before-save record-triggered flows execute, allowing fast field updates on the same record without additional DML. After that, before triggers (Apex) run. Custom validation rules, duplicate rules, and layout-specific required fields are then evaluated. The record is saved to the database but not yet committed. After triggers execute next, followed by assignment rules (for Leads and Cases), auto-response rules, and workflow rules. If workflow field updates change the record, before and after triggers may run again (once more). Escalation rules follow, and then processes built in Process Builder and after-save record-triggered flows run, in an order that admins can define using the flow trigger order setting. Entitlement rules are evaluated, roll-up summary fields on parent records are recalculated, and cross-object workflows may fire. Criteria-based sharing rules are evaluated, and finally all DML operations are committed to the database. Post-commit logic, such as sending emails, enqueued asynchronous Apex, and outbound messages, occurs last.

For exam purposes, remember key implications: before-save flows are the most efficient for same-record updates, validation rules can be bypassed by workflow field updates running later, and after-save automation can cause recursion or governor limit issues if poorly designed. Salesforce recommends consolidating automation into Flow and following the 'one automation tool per object' principle to keep behavior predictable.

Flow Trigger Explorer and Trigger Order

Flow Trigger Explorer is a Salesforce Setup tool that lets administrators view and manage all record-triggered flows for a specific object in one place. Instead of digging through individual flow definitions, you select an object (such as Account or Opportunity) and a trigger type—when a record is created, updated, or deleted—and the Explorer displays every active and inactive flow that fires on that event. Flows are grouped by run timing: before-save (fast field updates), after-save (actions and related records), and asynchronous paths. This gives admins a clear picture of what automation executes and in what sequence, which is essential for troubleshooting unexpected behavior, avoiding duplicate logic, and planning new automation without conflicts. From the Explorer you can open flows, activate or deactivate them, and reorder them directly.

Trigger Order is the mechanism that controls the execution sequence of multiple record-triggered flows on the same object and event. Each flow has a Trigger Order field (Advanced settings in Start element) accepting a value from 1 to 2000. Flows run in ascending order of this number. Salesforce recommends spacing values (10, 20, 30) so future flows can be inserted without renumbering. Flows without a Trigger Order value run after ordered flows, sorted alphabetically by flow API name; those with a value of 1001 or higher are considered unordered and also run in that alphabetical group after those with explicit lower values. Trigger Order applies within the same run timing: before-save flows are ordered among themselves, then after-save flows among themselves.

For the Platform Administrator II exam, remember: Flow Trigger Explorer provides visibility and management, while Trigger Order provides deterministic sequencing. Together they replace the unpredictable ordering that existed with Workflow Rules and Process Builder, support the shift to flow-only automation, and help enforce one-flow-per-object-per-event best practices or, where multiple flows exist, ensure dependent logic (like setting a field before another flow reads it) executes reliably in the correct order.

More Process Automation questions
592 questions (total)
Practice questions
One session at a time, always new questions