Before you design flows that contain one or more Wait elements, understand the limitations and guidelines.
Available in: both Salesforce Classic and Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions
After you deactivate a flow or flow version, the associated waiting interviews continue as usual. You can’t delete a flow or flow version if it has associated waiting interviews.
An interview can execute only one event path per Wait element. After one of its events is processed, the remaining events are removed from the queue.
An organization can process up to 1,000 events per hour. When an event is processed, the interview that it’s associated with is resumed and any other events for that interview are removed from the queue. If an organization exceeds this limit, Salesforce processes the remaining events in the next hour.
For example, an organization has 1,200 events scheduled to be processed between 4:00 PM and 5:00 PM. Salesforce processes 1,000 events between 4:00 PM and 5:00 PM and the additional 200 events between 5:00 PM and 6:00 PM.
An organization can have up to 30,000 interviews waiting at a given time.
If the user who started the interview is deactivated when Salesforce tries to execute an event path, the interview fails to resume.
Transactions and Waiting Interviews
A transaction ends as soon as a flow interview begins to wait for an event. When the flow interview resumes, a new transaction begins. Everything after the Wait element is executed as part of a batch transaction that includes other resumed interviews.
Interviews aren’t resumed independently. They’re grouped into a single batch that starts resuming within one hour after the first interview enters the batch. Any actions that fire as a result of those grouped interviews are also executed in that transaction. This behavior can cause you to exceed your Apex governor limits if the resumed interview executes DML operations or SOQL queries through:
Flow elements such as Record Create or Fast Lookup
If a Wait element precedes any flow elements that execute DML operations or SOQL queries:
Ensure that your flows don’t perform more DML operations or SOQL queries between Wait elements than the Apex governor limits allow.
Consider using multiple Wait elements so that the DML operations and SOQL queries are performed in multiple transactions.
Add fault paths for those elements so that the flow returns to the Wait element if the fault message contains:
Too many SOQL queries
Too many DML operations
If an interview fails after it’s resumed:
Prior interviews in that batch’s transaction are successful.
Operations that the interview executed before it waited are successful.
If a fault connector handles the failure, operations that the interview executed between when it resumed and when it failed are successful. The operation that caused the interview to fail isn’t successful.
If a fault connector doesn’t handle the failure, operations that the interview executed between when it resumed and when it failed are rolled back. The operation that caused the interview to fail isn’t successful.
The remaining interviews in that batch are tried.
Limitations for General Alarms
Alarms don’t support minutes or seconds.
If an interview is waiting for an event that’s set for a time in the past, Salesforce resumes the interview within one hour.
For example, a flow is configured to email an opportunity owner seven days before the close date. An interview is started for an opportunity with the close date set to today. Salesforce resumes the interview within an hour.
Limitations for Absolute Time Alarms
Absolute time alarms are evaluated based on the time zone of the user who created the flow.
Limitations for Relative Time Alarms
Relative time alarms are evaluated based on the organization’s time zone.
Across all your flow versions, your organization can have up to 20,000 defined relative time alarms.
Alarms can’t reference the following:
DATE or DATETIME fields that contain automatically derived functions, such as TODAY or NOW.
Formula fields that include related-object merge fields.
If you change a date field that’s referenced by an unexecuted relative time alarm in a waiting interview, Salesforce recalculates the events associated with the interview.
For example, a flow is configured to email an opportunity owner seven days before the opportunity close date and the close date is 2/20/2014. The following things could happen.
The close date isn’t updated before the interview resumes. Result: Salesforce resumes the interview on 2/13/2014 and sends the email.
The close date is updated to 2/10/2014 before the interview resumes. Result: Salesforce reschedules the relative time alarm and the interview resumes on 2/3/2014.
The close date is updated to a date in the past. Result: Salesforce recalculates the relative time alarm and resumes the interview shortly after you save the record.
If a relative time alarm references a null date field when the interview executes the Wait element, Salesforce resumes the interview within an hour.
If a relative time alarm references a date field that’s that has a non-null value when the flow interview executes the Wait element and it’s updated to null before the alarm is processed, Salesforce resumes the interview within an hour after the date field is updated.
If a waiting interview has a relative time alarm and the referenced record or object is deleted, the alarm is removed from the queue. If the interview has no other events to wait for, the interview is deleted.
You can’t archive a product or price book that’s referenced in a relative or absolute time alarm in a waiting interview.
Lead Convert Limitations
You can’t convert a lead that has associated relative time alarms in waiting interviews.
If Validation and Triggers from Lead Convert is enabled, existing operations on leads after a Wait element aren’t executed during lead conversion.
If a campaign member based on a lead is converted before a waiting interview that’s associated with that record finishes, Salesforce still executes the interview.