Question

Difficulty: MediumFlow Types and Triggers

A system administrator is designing an automation strategy for a custom object named Warehouse_Transfer__c. The business requires two specific automation behaviors:

1. Automatically calculate and update the Total_Weight_KG__c field on the Warehouse_Transfer__c record itself immediately before the record is saved to the database.
2. Execute an outbound HTTP callout to an external logistics provider's API whenever a transfer record is confirmed.

Which TWO flow trigger configurations should the administrator implement to meet these requirements efficiently? (Choose two.)

  1. A Record-Triggered Flow optimized for Fast Field Updates (Before-Save) to populate the weight field on the triggering record.Answer
  2. A Record-Triggered Flow configured for Actions and Related Records (After-Save) with an Asynchronous Path to perform the external API callout.Answer
  3. C
    A Record-Triggered Flow configured for Actions and Related Records (After-Save) to update the Total_Weight_KG__c field on the triggering record.
  4. D
    A Schedule-Triggered Flow configured to run every minute to query newly created transfer records and execute the external API callout.

Answer

The administrator should use a Record-Triggered Flow optimized for Fast Field Updates (Before-Save) to calculate the weight field on the triggering record, and a Record-Triggered Flow configured for Actions and Related Records (After-Save) with an Asynchronous Path to handle the HTTP callout.
Updating fields on the triggering record before it is written to the database is best achieved using a Fast Field Updates (before-save) flow, as it modifies values in memory before the initial insert/update. Outbound integration callouts require an asynchronous context after the record transaction is committed, which is provided by an Asynchronous Path on an Actions and Related Records (after-save) flow.

Step-by-Step Solution

1
Evaluate requirement 1 (same-record field update prior to save)
Determine that Fast Field Updates (Before-Save) flows run before the record is saved to the database, allowing field modifications on the $Record object without issuing an explicit Update Records DML statement.
Before-save flows offer significantly higher performance and avoid triggering additional order-of-execution cycles.
2
Evaluate requirement 2 (external HTTP API callout after record creation/update)
Identify that callouts are prohibited during synchronous trigger transaction execution unless handled asynchronously.
An Asynchronous Path in an after-save Record-Triggered Flow executes in a separate thread after the original transaction completes, permitting HTTP callouts without uncommitted work errors.

Key Concept

Flow Trigger Types and Execution Timing (Before-Save vs. After-Save Async Callouts)
Rate this question