Flow Actions

Delay

Introduction

The CloudFiles: Delay action can be used in flows to add a pause to the flow execution, especilly in Asynchronous flow executions. As the Salesforce flow flow builder doesn't provide the option to add a Pause element orr schedule a an asynchronous flow , this flow action come in handy in scenarios where you might need it.

The image below provides an overview of the input parameters and how this action appears in a Salesforce flow. Detailed descriptions of the input and output parameters are provided in the following sections.

Document image


What this action does

Example Use Case

You have automations set up to create Lead folders for every new Lead record and Account folders for Account records. When a Lead is converted, you want to move its folder into the newly created Account folder automatically.

Challenges:

  • Lead conversion creates an Account record.
  • Account folder creation is triggered asynchronously when an Account is created.
  • Moving the Lead folder immediately might fail if the Account folder hasn’t been created yet.

Solution: Use the CloudFiles Delay action to introduce a safety pause in the Lead folder movement automation. This ensures that the Account folder is created before attempting to move the Lead folder into it.

Steps

  1. Trigger the Automation: Configure the flow to trigger when a Lead is converted (an Account record is also created ismultaneously )
  2. Add a Delay: Use the CloudFiles Delay action to pause the flow for a duration (e.g., 10 seconds or 10,000 milliseconds).
  3. Move the Folder: After the delay, proceed with the logic to move the Lead folder into the corresponding Account folder.
Document image


Key Benefits

  • Ensures Sequential Execution: Handles asynchronous processes by providing a buffer for dependent operations.
  • Improves Reliability: Reduces risks of errors caused by unavailability of resources (e.g., Account folder).
  • Simplifies Automation: Adds flexibility to flows that involve time-sensitive operations.

This action is especially helpful in scenarios where external processes or asynchronous operations must complete before proceeding.

Input Parameters

Delay(milli seconds)

  • Description: Specify the pause duration in milliseconds.
  • Example: To add a pause of 10 seconds, input 10000.

Use Caution

Avoid specifying a delay longer than 20 seconds, as Salesforce flows may time out due to platform limits.

Output Parameters

This action does not produce any output. Its sole purpose is to introduce a delay in the flow execution.