Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Paused Flow Interview Considerations

          Paused Flow Interview Considerations

          Before you design flows that contain one or more Wait elements, understand the behavior and guidelines.

          Required Editions

          Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience

          Time-based resume events are available in: Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions

          Platform event-based resume events are available in: Enterprise, Performance, Unlimited, and Developer Editions

          General Considerations

          • After you deactivate a flow version, its paused interviews continue to wait for the configured resume events. If a flow version has paused interviews, you can’t delete it.
          • An interview can execute only one connector per Wait element. After one of its resume events is processed, the remaining resume events are removed from the queue.
          • If the user who started the interview is deactivated when Salesforce tries to execute a wait connector, the interview fails to resume.
          • If a flow is paused and the flow interview exceeds 1 MB, the interview fails to save and can’t be resumed.
          • You can’t call flows that contain wait elements .
          • Wait elements in screen action autolaunched flows don't work when the screen flow runs.

          Transactions and Paused Interviews

          A transaction ends as soon as a flow interview pauses for one or more resume events. 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. Actions that execute as a result of the grouped interviews are also executed in that transaction. The batch can have other interviews that resume at the same time, have the same flow version ID, and are executed by the same user ID. This behavior can cause you to exceed your Apex governor limits if the resumed interview executes DML operations or SOQL queries through. For details, see Per-Transaction Flow Limits.

          • Flow elements, such as Create Records or Apex Action (Legacy)
          • Apex triggers
          • Immediate workflow actions

          If a Wait element precedes a flow element that executes DML operations or SOQL queries:

          • Ensure that your flows don’t let a single user execute DML operations or SOQL queries that can exceed limits between Wait elements.
          • 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 or 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 paused are successful.
          • If a fault path 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 path 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.

          Platform Events

          Tip
          Tip Make sure to also review the considerations and allocations for platform events.
          • Supported Platform Events

            Flows can subscribe to custom platform events and these standard platform events.

            • AIPredictionEvent
            • BatchApexErrorEvent
            • FlowExecutionErrorEvent
            • FOStatusChangedEvent
            • OrderSummaryCreatedEvent
            • OrderSumStatusChangedEvent
            • PlatformStatusAlertEvent
          • Formulas—To reference a platform event in a formula, pass the event data into a record variable in the Wait element. Then reference the appropriate field in that record variable.
          • Value Truncation—When you filter platform event messages, values for conditions can’t be more than 765 characters.
          • Subscriptions Related List—On the platform event’s detail page, the Subscriptions related list shows which entities are waiting to receive that platform event’s messages. The related list includes a link to each subscribed process. If flow interviews are waiting for that platform event's messages, one “Process” subscriber appears in the Subscriptions related list.
          • Uninstalling Events—Before you uninstall a package that includes a platform event, delete the interviews that are waiting for that platform event’s messages.
          • Einstein Predictions—A prediction event is sent for each Einstein prediction result, so use event condition filters if you want your flow to be triggered only by predictions on a specific object. For example, if your flow uses a Wait element that acts only on predictions written to Lead records, add a resume event to check that the AIPredictionEvent.TargetId field equals the current record.

            If your flow updates a field that is used by an Einstein prediction, Einstein runs the prediction again and writes back the new results. The new results generate a new prediction event that could trigger your flow again, resulting in a loop. To avoid creating a loop, only update fields that aren’t used in Einstein predictions.

          Platform Cache

          When a flow contains a Wait element, make sure that later elements in the flow don't invoke Apex code that stores or retrieves values from the session cache. The session-cache restriction applies to Apex actions and to changes that the flow makes to the database that cause Apex triggers to fire.

          Time-Based Resume Events

          • Time-based resume events don’t support minutes or seconds.
          • If an interview is waiting for a time in the past, Salesforce resumes the interview as soon as possible. Depending on how many actions Salesforce is processing at the time, actions are executed within one hour.

            For example, a flow is configured to email an opportunity owner seven days before the close date. An interview starts for an opportunity with the close date set to today. Salesforce resumes the interview within an hour.

          • An org can process up to 1,000 time-based resume events per hour. When a resume event is processed, its associated interview resumes and any other resume events for that interview are removed from the queue. If an org exceeds this limit, Salesforce defers the remaining resume events to be processed in the next hour.

            For example, an org has 1,200 resume events scheduled to be processed between 4:00 PM and 5:00 PM. Salesforce processes 1,000 resume events between 4:00 PM and 5:00 PM and the additional 200 resume events between 5:00 PM and 6:00 PM.

          • You can’t archive a product or price book that’s referenced in a time-based resume event in a paused interview.

          Flow-Based Time

          For resume events based on a specific time, the resume time is evaluated using the time zone of the user who created the flow.

          Record-Based Time

          • For resume events based on a record field value, the resume time is evaluated using the org’s time zone.
          • Resume events can’t reference:
            • 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 resume event in a paused interview, Salesforce recalculates the resume 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 resume event and the interview resumes on 2/3/2014.
            • The close date is updated to a date in the past. Result: Salesforce recalculates the resume event and resumes the interview shortly after you save the record.
          • If a resume event references a null date field when the interview executes the Wait element, Salesforce resumes the interview as soon as possible. Depending on how many actions Salesforce is processing at the time, actions are executed within one hour.
          • If a resume event references a date field that has a non-null value when the flow interview executes the Wait element and it’s updated to null before the resume event is processed, Salesforce resumes the interview within an hour after the date field is updated.
          • If a record or object that’s referenced by a resume event is deleted, the resume event is removed from the queue. If the interview has no other resume events to wait for, the interview is deleted.
          • Lead Convert Limitations
            • You can’t convert a lead that’s referenced in a paused interview’s resume event.
            • 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 paused interview that’s associated with that record finishes, Salesforce still executes the interview.
           
          Loading
          Salesforce Help | Article