Salesforce flows are essential for automating tasks and creating custom processes within your Salesforce org. Understanding their limitations is crucial to ensuring efficient and effective flow execution.

This blog post outlines the key flow limits and offers strategies for optimizing your flows to remain within those constraints.

General flow limits

Salesforce flows are available in Salesforce Classic (in some orgs) and Lightning Experience. They are accessible in Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions.

Salesforce flow limits


The maximum size for a flow interview is 1,000,000 bytes (approximately 1 MB). It cannot be paused or saved if it exceeds this size.

Optimize your Flows

  • If your flow is too large, consider breaking it into smaller, more manageable sub-flows.
  • Ensure that your flows use decision elements effectively to avoid unnecessary steps.
  • Regularly check the size of your flow interviews to ensure they are within the 1 MB limit.

Also read- How to Delete a Flow in Salesforce.

Total SOQL Queries per Transaction (Limit: 100)

This limit restricts the number of Salesforce Object Query Language (SOQL) queries a single flow can execute in one transaction. SOQL queries are used to get data from Salesforce objects.

In complex processes, multiple SOQL queries can easily hit this limit, especially when gathering data from related objects or retrieving large datasets without proper filtering.

There are two main ways to manage this limit:

  • Consider splitting complicated flows into smaller, more manageable ones, each using fewer SOQL queries. This approach keeps each transaction within the limit.
  • By adding filters to your SOQL queries, you can reduce the amount of data retrieved. This ensures you only get the specific information needed for the flow’s function.

Total DML Statements per Transaction (Limit: 150)

This limit restricts the number of Data Manipulation Language (DML) operations, such as creating, updating, or deleting records that a flow can perform in a single transaction.

Flows that focus on handling large amounts of data, such as creating many new records or updating existing ones in bulk, can quickly reach this limit.

Review your flow to identify ways to optimize data handling steps. This may involve reducing the number of records processed or updating in smaller batches.

Total Records Retrieved by SOQL Queries

The maximum number of records retrieved by all SOQL queries in a transaction is 50,000, regardless of the number of queries. This prevents the server from being overwhelmed with large datasets.

Flows that attempt to retrieve a vast amount of data, especially when dealing with large datasets or lacking proper filtering, can easily hit this limit.

Effectively utilize filters in your SOQL queries to retrieve only the data relevant to the flow’s purpose. This significantly reduces the overall amount of data retrieved.

Want to Learn Salesforce Flows? Checkout our Salesforce Flow Course

Total Number of Records Processed by DML

DML statements can process 10,000 records in a flow to ensure data integrity and efficient updates. This limit applies to the combined effect of all DML operations within a single flow transaction.

Consider using asynchronous flows for scenarios involving substantial data manipulation. These flows process data in stages, allowing for better management of record processing within the flow’s transaction.

Maximum CPU Time on the Salesforce Servers

Salesforce allocates a maximum of 10,000 milliseconds (10 seconds) as the CPU time on its servers for processing a transaction. Staying within this limit is critical to prevent overconsumption of server resources and ensure efficient flow execution.

Maximum Number of Executed Elements at Runtime per Flow

The maximum limit for the number of executed elements at runtime per flow is 2,000. To address this limit, we can optimize flow by avoiding the overuse of data elements, minimizing the use of elements within loops, and building strict entry criteria.

It’s important to note that if you have a loop, the elements within the loop (including the loop itself) will be multiplied by the number of iterations. For instance, if you have 50 records that enter a loop with two elements, the total elements will be 100.


1. What is an Asynchronous flow in Salesforce?

An asynchronous flow in Salesforce is a process that runs separately from other tasks and doesn’t execute immediately. Instead of running all at once, these processes execute one at a time, often using a queue to ensure each task is handled in the order it was received.

2. How can we ensure my flow stays within the SOQL query records limit?

Salesforce has a capacity of 50,000 records retrieved by all SOQL queries in a single transaction. To stay within this limit, apply filters to your SOQL queries to fetch data relevant to the flow’s specific needs. This strategy helps in minimizing the total data retrieved.


Understanding and managing flow limits in Salesforce is crucial for maintaining efficient and effective automation processes. By optimizing your flows, using decision elements wisely, and properly filtering data queries, you can ensure that your Salesforce implementations run smoothly and within the platform’s constraints.

Get a complete Roadmap To Learn Salesforce Admin And Development

Share Now

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *