Who can use this feature?
A Scheduled Trigger Distro Flow runs on a schedule you define – on a recurrence, on a specific date, or on demand – rather than reacting to a Salesforce event. A Records for Processing node fetches the records to route, using a SOQL query you define.
Table of Contents
- When to use a Scheduled Trigger
- Create the Distro Flow
- Choose the trigger type
- Define which records to process
- Build the rest of the Distro Flow
- Run an On Demand Distro Flow via the Edge API or MCP
- Recommendations on record volumes
- Limitations
When to use a Scheduled Trigger
A standard Salesforce Events trigger fires when a record is created or updated. A Scheduled Trigger fires on time. Use it when:
- You want to reprocess a population of records on a recurring basis (for example, route every Lead in a given status each morning);
- You want to run a one-off job at a chosen date and time (for example, route an imported list after an event);
- You want to kick off a routing job from outside Distro (for example, from an external workflow tool or an AI agent).
Create the Distro Flow
- In the left-side menu, expand Flows and click Distro. The Distro Flows page lists every Distro Flow, with its trigger object and trigger type;
- Click Create Distro Flow in the top right;
- Open the Trigger node and select the Salesforce object the Distro Flow will operate on (any standard or custom object that has been activated for routing).
For full context on creating a Distro Flow, see Creating a Distro Router.
Choose the trigger type
On the Trigger node, toggle on On Scheduled (the in-app label for the Scheduled Trigger described in this article). A Schedule Type section then appears with three options:
- Recurring Schedule – the Distro Flow runs repeatedly, on the cadence you set;
- Specific Date – the Distro Flow runs once, at a chosen date and time. Set the Date for Flow to start, Time for Flow to start, and Timezone;
- On Demand – the Distro Flow does not run automatically. You start each run yourself, either from the Distro Flow UI or via the Edge API / MCP.
Set a recurring cadence
With Recurring Schedule selected, use the Flow starts every dropdown to choose the cadence.
Each option asks for the fields that cadence needs:
| Flow starts every | Fields to set | When the Distro Flow runs |
|---|---|---|
| Hour | Start Date, Start Time, Timezone | Every hour, from the start you set |
| Day | Start Date, Time, Timezone | Once a day, at that time |
| Week | Start Date, On Day of Week, Time, Timezone | Once a week, on that day |
| Month | Start Date, On Day of Month (1-28), Time, Timezone | Once a month, on that day |
| Custom (Cron) | Cron expression, Start Date, Start Time, Timezone | On every occurrence the expression matches |
The Timezone you select is the timezone the schedule is evaluated in.
Use a cron expression
Select Custom (Cron) when the cadence you need does not fit the fixed options – for example, weekdays only, or twice a day at set times.
A Cron expression field appears. Enter a Quartz-style expression of six fields, separated by single spaces:
[Second] [Minute] [Hour] [Day of Month] [Month] [Day of Week]
Each field accepts a single value, a list (1,15), a range (1-5), a step (0/15), or * for every value:
| Field | Accepted values |
|---|---|
| Second | 0 to 59 |
| Minute | 0 to 59 |
| Hour | 0 to 23 |
| Day of Month | 1 to 31, or ?
|
| Month | 1 to 12, or JAN to DEC |
| Day of Week | 1 to 7, or SUN to SAT, or ?
|
Two rules apply to the day fields:
- Exactly one of Day of Month and Day of Week must be
?, which means "no specific value". Quartz cannot honour both at once, so setting both, or neither, is rejected; - Numeric Day of Week runs from 1 for Sunday to 7 for Saturday. To avoid the ambiguity, use the three-letter names –
MON,TUE, and so on.
The day fields also accept the Quartz shorthands: L (last day), LW (last weekday), L-3 (three days before the last day), 5L (last Thursday), 15W (the weekday nearest the 15th), and FRI#3 (the third Friday).
Examples
| Expression | Runs |
|---|---|
0 0 8 ? * MON-FRI |
8 AM, Monday to Friday |
0 0 9,17 * * ? |
9 AM and 5 PM, every day |
0 0/15 * * * ? |
Every 15 minutes |
0 0 7 ? * MON |
7 AM every Monday |
0 30 6 1 * ? |
6:30 AM on the first of each month |
0 0 8 L * ? |
8 AM on the last day of each month |
0 0 8 ? * FRI#3 |
8 AM on the third Friday of each month |
Set the Second field to 0, as the examples above do.
Note: With Custom (Cron), the expression alone decides when the Distro Flow runs. Start Date and Start Time set the earliest point from which the expression is allowed to fire – they do not add a run of their own. Selecting Custom (Cron) sets them to the start of the next hour; you can override that to any date and time you choose.
The expression is checked as you type, and again when you publish. A Distro Flow with an invalid expression cannot be published.
Define which records to process
When On Scheduled is enabled on the Trigger node, a Records for Processing node appears in the flow. This node tells Distro which records to fetch from Salesforce on each run.
There are two ways to define the query:
Visual Builder
The Visual Builder lets you set conditions using the same familiar UI you use elsewhere in Distro. For each condition, pick the object, the field, the operator, and the value. Combine conditions with Add Condition (AND / OR within a group) or Add Group (nested logic).
You can also set an Order Records By field and direction, so records are processed in a deterministic order on each run.
SOQL
If you need a query the Visual Builder does not support, switch to the SOQL tab and write the query by hand. Your query must include the Id field in the SELECT statement (for example, SELECT Id FROM Lead).
A preview shows how many records the query matches against your Salesforce data, so you can confirm the population before publishing.
Build the rest of the Distro Flow
Once the Records for Processing node is configured, the rest of the Distro Flow is built the same way as any other Distro Flow – Routing Rules, Paths, Assign & Update Ownership nodes, Field Update nodes, and so on.
See Creating a Distro Router for the full reference.
When you are ready, click Publish.
Run an On Demand Distro Flow via the Edge API or MCP
When the trigger type is set to On Demand, you can start a run from outside Distro – for example, from an AI agent connected via MCP, a workflow automation tool, or a custom integration.
The Edge API endpoint is resource-scheduler-run. The same operation is registered as an MCP tool with the same name.
For the full Edge API setup, see Edge API References.
For the MCP setup, see How do I connect Chili Piper via MCP?.
Recommendations on record volumes
There is no hard cap on the number of records a single run can process. For larger jobs, we recommend:
- Run smaller batches – use the Record Limit field on the Records for Processing node, or write a SOQL query that targets a narrower slice;
- Schedule runs outside business hours, or over the weekend, so the run does not overlap with live routing;
- The SOQL preview shows the match count before publishing. For first-time runs, kick off a small actual run against the live Distro Flow and verify the results in Salesforce before scaling up.
Limitations
- A cron expression must use all six fields. Five-field Unix cron expressions, which omit seconds, are rejected;
- The Month cadence option accepts a Day of Month from 1 to 28, so that the day exists in every month. A cron expression accepts 1 to 31, and
Lfor the last day of the month.
Comments
0 comments
Please sign in to leave a comment.