Sub topic 10
Replacing time-dependent actions with scheduled paths
This chapter assumes you can build a basic record-triggered flow and that you have already mapped entry conditions from your Workflow Rules and processes. Here you replace time-dependent actions with scheduled paths.
What changes
A Workflow Rule can queue a time-dependent action, such as "7 days before Close Date, send an email." A Process Builder process can do the same with a scheduled action. Both store pending actions in a time-based workflow queue.
In a record-triggered flow, you get the same result with a scheduled path. A scheduled path is a branch of the flow that runs after a time offset from a reference date. The flow still starts when the record meets the entry conditions. The path then waits and runs later.
| Old concept | Flow equivalent |
|---|---|
| Time trigger (for example, 3 days after) | Scheduled path with an offset |
| Date field as the base | Time Source (a date or date/time field, or the time the record is triggered) |
| Immediate actions | Run Immediately path |
| Rule re-evaluated, pending actions removed | Flow re-evaluates the entry condition before each scheduled run |
Build a scheduled path
Suppose a Workflow Rule creates a follow-up Task 3 days after an Opportunity becomes Closed Won.
- Create a record-triggered flow on Opportunity. Trigger it when a record is created or updated.
- Set the entry condition to the Closed Won formula from the earlier chapter, and set the run frequency to match the old rule.
- Choose Add Scheduled Paths on the Start element.
- Name the path, and set Time Source to CloseDate. Set Offset Number to 3, Offset Options to Days After.
- Add a Create Records element on that path to create the Task.
Scheduled paths run in the after-save context, so you can create related records and send emails there. You can also add a Run Immediately path to the same flow for the old immediate actions.
Behavior to check
- Re-evaluation. Workflow Rules removed a queued action if the record stopped meeting the criteria. A flow does not remove a queued path just because the record changes. If the record no longer meets the entry conditions when the path is due, the path does not run. Test this case, because it depends on how you configured the flow.
- Time source. If the date field changes, queued paths are recalculated. Confirm this in a sandbox with a real date change.
- Run as user. Scheduled paths run as the Automated Process user, not the user who saved the record. Check any sharing or ownership logic.
- Past dates. If the calculated time is already past, the path runs right away.
- Limits. Salesforce limits how many scheduled path executions you can queue per 24 hours. Estimate your volume before cutover.
Exercise
A Workflow Rule sends an email 5 days before a Contract's EndDate. How do you build this as a scheduled path, and what Run As user should you expect?
Show answer
Create a record-triggered flow on Contract with the old rule's criteria as the entry condition. Add a scheduled path with Time Source set to EndDate, Offset Number 5, and Offset Options Days Before. Add a Send Email action on that path. The path runs as the Automated Process user.