
Salesforce App Limits Cheatsheet
DOWNLOAD
First things first !
To download this implementation guide, click the download button below.
If you need more information about the implementation guide, you can read the Table of Contents below.
SALESFORCE DEVELOPER LIMITS AND
ALLOCATIONS QUICK REFERENCE
Summary
Find the most critical limits
for developing Lightning
Platform applications
About This Quick Reference
This quick reference provides common limits and allocations for Salesforce and does not cover all limits
and allocations It might contain limits or allocations that dont apply to your Salesforce org Stated limits
arent a promise that the specified resource is available at its limit in all circumstances Load performance
and other system issues can prevent some limits from being reached
This guide doesnt include limits or allocations for
User interface elements in the Salesforce application
Field lengths of Salesforce objects
Desktop integration clients
Your Salesforce contract
Information for specific feature limits such as the number of total and active rules in your org are also in
Salesforce Help see the topics for using that feature For allocations per edition see Salesforce Features
and Edition Allocations Contractual limits might also apply as per your Salesforce contract
Apex Governor Limits
Read up on Apex limits details in Execution Governors and Limits
Because Apex runs in a multitenant environment the Apex runtime engine strictly enforces limits so that
runaway Apex code or processes dont monopolize shared resources
PerTransaction Apex Limits
These limits count for each Apex transaction For Batch Apex these limits are reset for each execution of
a batch of records in the execute method
This table lists limits for synchronous Apex and asynchronous Apex Batch Apex and future methods
when theyre different Otherwise this table lists only one limit that applies to both synchronous and
asynchronous Apex
Description
Total number of SOQL queries issued
Synchronous Asynchronous
Limit
Limit
Total number of records retrieved by SOQL queries
Total number of records retrieved by
DatabasegetQueryLocator
Total number of SOSL queries issued
Last updated February
Salesforce Developer Limits and Allocations Quick Reference
Apex Governor Limits
Description
Synchronous Asynchronous
Limit
Limit
Total number of records retrieved by a single SOSL query
Total number of DML statements issued
Total number of records processed as a result of DML statements
Approvalprocess or databaseemptyRecycleBin
Total stack depth for any Apex invocation that recursively fires triggers
due to insert update or delete statements
Total number of callouts HTTP requests or web services calls in a
transaction
Maximum cumulative timeout for all callouts HTTP requests or Web
services calls in a transaction
seconds
Maximum number of methods with the future annotation allowed
per Apex invocation
in batch and
future
contexts in
queueable
context
Maximum number of Apex jobs added to the queue with
SystemenqueueJob
Total number of sendEmail methods allowed
Total heap size
Maximum CPU time on the Salesforce servers
Maximum execution time for each Apex transaction
MB
MB
milliseconds
milliseconds
minutes
Maximum number of push notification method calls allowed per Apex
transaction
Maximum number of push notifications that can be sent in each push
notification method call
Maximum number of EventBuspublish calls for platform events
configured to publish immediately
In a SOQL query with parentchild relationship subqueries each parentchild relationship counts as an
extra query These types of queries have a limit of three times the number for toplevel queries The limit
for subqueries corresponds to the value that LimitsgetLimitAggregateQueries returns
The row counts from these relationship queries contribute to the row counts of the overall code execution
This limit doesnt apply to custom metadata types In a single Apex transaction custom metadata records
can have unlimited SOQL queries In addition to static SOQL statements calls to the following methods
count against the number of SOQL statements issued in a request
DatabasecountQuery
Salesforce Developer Limits and Allocations Quick Reference
Apex Governor Limits
DatabasegetQueryLocator
Databasequery
Calls to the following methods count against the number of DML statements issued in a request
Approvalprocess
DatabaseconvertLead
DatabaseemptyRecycleBin
Databaserollback
DatabasesetSavePoint
delete and Databasedelete
insert and Databaseinsert
merge and Databasemerge
undelete and Databaseundelete
update and Databaseupdate
upsert and Databaseupsert
EventBuspublish for platform events configured to publish after commit
SystemrunAs
Recursive Apex that doesnt fire any triggers with insert update or delete statements exists
in a single invocation with a single stack Conversely recursive Apex that fires a trigger spawns the trigger
in a new Apex invocation The new invocation is separate from the invocation of the code that caused it
to fire Spawning a new invocation of Apex is a more expensive operation than a recursive call in a single
invocation Therefore there are tighter restrictions on the stack depth of these types of recursive calls
Email services heap size is MB
CPU time is calculated for all executions on the Salesforce application servers occurring in one Apex
transaction CPU time is calculated for the executing Apex code and for any processes that are called from
this code such as package code and workflows CPU time is private for a transaction and is isolated from
other transactions Operations that dont consume application server CPU time arent counted toward
CPU time For example the portion of execution time spent in the database for DML SOQL and SOSL isnt
counted nor is waiting time for Apex callouts
Note
Limits apply individually to each testMethod
To determine the code execution limits for your code while its running use the Limits methods
For example you can use the getDMLStatements method to determine the number of
DML statements that have already been called by your program Or you can use the
getLimitDMLStatements method to determine the total number of DML statements
available to your code
PerTransaction Certified Managed Package Limits
Certified managed packagesmanaged packages that have passed the security review for
AppExchangeget their own set of limits for most pertransaction limits Salesforce ISV Partners develop
certified managed packages which are installed in your org from AppExchange and have unique
namespaces
Salesforce Developer Limits and Allocations Quick Reference
Apex Governor Limits
Theres no limit on the number of certified namespaces that can be invoked in a single transaction
However the number of operations that can be performed in each namespace must not exceed the
pertransaction limits Theres also a limit on the cumulative number of operations that can be made across
namespaces in a transaction This cumulative limit is times the pernamespace limit For example if
the pernamespace limit for SOQL queries is a single transaction can perform up to SOQL
queries In this case the cumulative limit is times the pernamespace limit of These queries can
be performed across an unlimited number of namespaces as long as any one namespace doesnt have
more than queries The cumulative limit doesnt affect limits that are shared across all namespaces
such as the limit on maximum CPU time
Note These crossnamespace limits apply only to namespaces in certified managed packages
Namespaces in packages that arent certified dont have their own separate governor limits The
resources they use continue to count against the same governor limits used by your orgs custom
code
This table lists the cumulative crossnamespace limits
Description
Cumulative
CrossNamespace
Limit
Total number of SOQL queries issued
Total number of records retrieved by DatabasegetQueryLocator
Total number of SOSL queries issued
Total number of DML statements issued
Total number of callouts HTTP requests or web services calls in a transaction
Total number of sendEmail methods allowed
Lightning Platform Apex Limits
The limits in this table arent specific to an Apex transaction Lightning Platform enforces these limits
Description
Limit
The maximum number of asynchronous Apex method executions batch
or the number
Apex future methods Queueable Apex and scheduled Apex per a hour of user licenses in your
period
org multiplied by
whichever is greater
Number of synchronous concurrent transactions for longrunning transactions
that last longer than seconds for each org
Maximum number of Apex classes scheduled concurrently
In Developer Edition
orgs the limit is
Maximum number of batch Apex jobs in the Apex flex queue that are in
Holding status
Maximum number of batch Apex jobs queued or active concurrently
Salesforce Developer Limits and Allocations Quick Reference
Apex Governor Limits
Description
Limit
Maximum number of batch Apex job start method concurrent executions
Maximum number of batch jobs that can be submitted in a running test
Maximum number of test classes that can be queued per hour period
production orgs other than Developer Edition
The greater of or
multiplied by the
number of test classes in
the org
Maximum number of test classes that can be queued per hour period
sandbox and Developer Edition orgs
The greater of or
multiplied by the
number of test classes in
the org
Maximum number of query cursors open concurrently per user
Maximum number of query cursors open concurrently per user for the Batch
Apex start method
Maximum number of query cursors open concurrently per user for the Batch
Apex execute and finish methods
For Batch Apex method executions include executions of the start execute and finish
methods This limit is for your entire org and is shared with all asynchronous Apex Batch Apex Queueable
Apex scheduled Apex and future methods To check how many asynchronous Apex executions are
available make a request to REST API limits resource See List Organization Limits in the REST API
Developer Guide The licenses that count toward this limit are full Salesforce user licenses or App Subscription
user licenses Chatter Free Chatter customer users Customer Portal User and partner portal User licenses
arent included
If more transactions are started while the longrunning transactions are still running theyre denied
HTTP callout processing time isnt included when calculating this limit
When batch jobs are submitted theyre held in the flex queue before the system queues them for
processing
Batch jobs that havent started yet remain in the queue until theyre started If more than one job is
running this limit doesnt cause any batch job to failexecute methods of batch Apex jobs still run in
parallel
This limit applies to tests running asynchronously This group of tests includes tests started through the
Salesforce user interface including the Developer Console or by inserting ApexTestQueueItem
objects using SOAP API
For example assume that cursors are open If a client application logged in as the same user attempts
to open a new one the oldest of the cursors is released Cursor limits for different Lightning Platform
features are tracked separately For example you can have all these cursors open concurrently Apex
query cursors for the Batch Apex start method each for the Batch Apex execute and finish
methods and Visualforce cursors
Salesforce Developer Limits and Allocations Quick Reference
Apex Governor Limits
Static Apex Limits
Description
Limit
Default timeout of callouts HTTP requests or Web services calls in a
transaction
seconds
Maximum size of callout request or response HTTP request or Web services MB for synchronous
call
Apex or MB for
asynchronous Apex
Maximum SOQL query run time before Salesforce cancels the transaction
seconds
Maximum number of class and trigger code units in a deployment of Apex
Apex trigger batch size
For loop list batch size
Maximum number of records returned for a Batch Apex query in
million
DatabaseQueryLocator
The HTTP request and response sizes count towards the total heap size
The Apex trigger batch size for platform events and Change Data Capture events is
SizeSpecific Apex Limits
Description
Limit
Maximum number of characters for a class
million
Maximum number of characters for a trigger
million
Maximum amount of code used by all Apex code in an org
MB
Method size limit
bytecode
instructions in compiled
form
This limit doesnt apply to Apex code in first generationGP or second generationGP managed
packages The code in those types of packages belongs to a namespace unique from the code in your
org This limit also doesnt apply to any code included in a class defined with the isTest annotation
Large methods that exceed the allowed limit cause an exception to be thrown during the execution of
your code
Push Notification Limits
An org can send up to iOS and Android push notifications per hour for example to
UTC
Salesforce Developer Limits and Allocations Quick Reference
API Request Limits and Allocations
Only deliverable notifications count toward this limit For example a notification is sent to employees
in your company but employees havent installed the mobile app yet Only the notifications sent to
the employees who have installed the mobile app count toward this limit
Each test push notification that is generated through the Test Push Notification page is limited to a single
recipient Test push notifications count toward an orgs hourly push notification limit
When an orgs hourly push notification limit is met any additional notifications are still created for inapp
display and retrieval via REST API
API Request Limits and Allocations
To maintain optimum performance and ensure that the Lightning Platform API is available to all our
customers Salesforce balances transaction loads by imposing two types of limits
Concurrent API Request Limits
Total API Request Allocations
When a call exceeds a request limit an error is returned
Concurrent API Request Limits
The following table lists the limits for various types of orgs for concurrent requests calls with a duration
of seconds or longer
Org Type
Limit
Developer Edition and Trial orgs
Production orgs and Sandboxes
Total API Request Allocations
The following table lists the limits for the total API requests calls per hour period for an org
Salesforce Edition
API Calls Per License Type
Per Hour Period
Total Calls Per Hour
Period
Developer Edition
NA
Enterprise Edition
Salesforce
Professional Edition with
API access enabled
Salesforce Platform
number of licenses x
calls per license type purchased
API Call AddOns
Lightning Platform One App
Customer Community
Customer Community Login
Customer Community Plus
Salesforce Developer Limits and Allocations Quick Reference
Salesforce Edition
API Request Limits and Allocations
API Calls Per License Type
Per Hour Period
Total Calls Per Hour
Period
Customer Community Plus
Login
External Identity SKU
External Identity SKU
External Identity
SKU
Partner Community
Partner Community Login
Lightning Platform Starter
per member for Enterprise
Edition orgs
Lightning Platform Plus
per member for Enterprise
Edition orgs
Unlimited Edition
Salesforce
Performance Edition
Salesforce Platform
Lightning Platform One App
Customer Community
Customer Community Login
Customer Community Plus
Customer Community Plus
Login
External Identity SKU
External Identity SKU
External Identity
SKU
Partner Community
Partner Community Login
Lightning Platform Starter
per member for Unlimited and
Performance Edition orgs
number of licenses x
calls per license type purchased
API Call AddOns
Salesforce Developer Limits and Allocations Quick Reference
Salesforce Edition
API Request Limits and Allocations
API Calls Per License Type
Per Hour Period
Total Calls Per Hour
Period
Lightning Platform Plus
per member for Unlimited and
Performance Edition orgs
Sandbox
NA
Note Load performance and other system issues can prevent you from using your entire allocation
of calls in a hour period
APIs that count toward this allocation include the Lightning Platform REST API the Lightning Platform
SOAP API Bulk API and Bulk API API calls issued by certain Salesforce connected apps for example
the Salesforce mobile app dont count To determine which APIs affect the allocation see Monitoring
Your API Usage
Calls that include DebuggingHeader have a separate allocation limit of calls per hour period
These calls can continue to be made after the total request limit for an org is reached
Limits and allocations are enforced against the aggregate of all API calls made to the org in a hour
period Limits and allocations are not on a peruser basis
Monitoring Your API Usage
To better monitor your orgs API usage and limits you can use these resources
The API Usage section of the System Overview page in Setup
The API Requests Last Hours item in the Organization Detail section of the System Overview page
in Setup
The API Request Limit per Month usagebased entitlement which shows you your orgs API calls
aggregated over days This can be found on the Company Information page in Setup
Information returned in the SforceLimitInfo response header for REST APIs
Information returned in the response body in typeAPI REQUESTStype for SOAP APIs
The limits call in the Lightning Platform REST API
You can configure your org so that email is sent to a designated user when the number of API requests
has exceeded a specified percentage of the amount allotted Perform this configuration from Setup by
entering API Usage Notifications in the Quick Find box and then selecting API Usage
Notifications
See also the Learn About Daily Rate Limits section in the App Development Without Limits Trailhead
module
What Happens If You Reach or Exceed Your API Request
Limit
If your org reaches or exceeds its daily API request limit Salesforce still allows the operations to proceed
by a certain amount if possible This helps avoid blocking your workflows during unexpected spikes in
Salesforce Developer Limits and Allocations Quick Reference
API Request Limits and Allocations
workloads and occasional peak periods A hard cap is in place to safeguard platform resources and prevent
API requests from exceeding the daily limit unimpeded
Note The ability to go over your normal daily limit is always subject to restrictions to protect the
overall health of the Salesforce instance that hosts your org You can monitor the health of your
instance on Salesforce Trust
This ability is designed to be used occasionally to help avoid interruptions in your workflow Dont
rely on it on an ongoing basis To increase your allocation contact your Salesforce account
representative
This ability only applies to paid orgs in active status It does not apply to trial orgs Developer Edition
or sandboxes
API request activity is aggregated into day periods starting with your contract start date and includes
calls that exceed the orgs entitled limit
Increasing Total API Request Allocations
The calculation of the API request amounts based on user licenses is designed to allow sufficient capacity
for your org based on your number of users If you need a higher amount and you dont want to purchase
extra user licenses or upgrade to Performance Edition you can purchase extra API calls For information
contact your account representative
Before you purchase more API calls perform due diligence of your API usage You can optimize a client
application whether its your own enterprise application or partner application to use fewer API calls and
still accomplish the same work If you use a partner product consult with the vendor to verify that the
product makes optimal use of the API A product that makes inefficient use of the API incurs unnecessary
costs for your company Use REST API composite resources to improve your applications performance by
minimizing the number of roundtrips between the client and server
Example API Usage Metering Calculations
The following examples illustrate API usage metering calculations for several scenarios
For an Enterprise Edition org with Salesforce licenses the request limit is requests
plus licenses x calls
For a Developer Edition org that made calls at AM Wednesday calls at PM
Wednesday only one more call can successfully be made until AM Thursday
Request Size Limits
In each REST call the maximum length for the combined URI and headers is bytes A request
exceeding this limit returns a Request Header Fields Too Large error If the URI itself exceeds this limit
the request returns a URI Too Long error
Note Other factors such as browsers and load balancers can lower the maximum length of the
URI and headers For publicfacing services its recommended to limit URI length to characters
and headers to approximately bytes
Salesforce Developer Limits and Allocations Quick Reference
Connect REST API Limits
Length of Stored ThirdParty Refresh and Access Tokens
Salesforce stores thirdparty access and refresh tokens of up to characters in length
Connect REST API Limits
Limits protect shared resources These are the limits for consumers of Connect REST API
Connect REST API requests are subject to rate limiting Connect REST API has a different rate limit than
other Salesforce APIs Connect REST API has a per user per application per hour rate limit When you
exceed the rate limit all Connect REST API resources return a Service Unavailable error code
For applications using a session ID from Salesforce the rate limit is per user per hourthere isnt a separate
bucket for applications All applications the user accesses with a session ID use this general quota To take
advantage of the per user per application per hour limit use OAuth tokens
Note Load performance and other system issues can prevent some limits from being reached
Limits can change without notice Applications should make efficient use of available requests and
gracefully handle the error code
Bulk API and Bulk API Limits and Allocations
Batch Allocations
You can submit up to batches per rolling hour period This allocation is shared between Bulk
API and Bulk API so every batch that is processed in Bulk API or Bulk API counts towards this
allocation
In Bulk API only ingest jobs consume batches Query jobs do not For details see How Requests Are
Processed in the Bulk API Developer Guide
In Bulk API batches are created for you automatically In Bulk API you must create the batches yourself
Limits Specific to Ingest Jobs
Item
Bulk API Limit
Bulk API Limit
Maximum number batches x records
of records uploaded per batch maximum
per hour rolling
period
Maximum time
before a batch is
retried
minutes
The API automatically handles
retries If you receive a message
that the API retried more than
times use a smaller upload file
and try again
Maximum file size
MB
MB
Salesforce Developer Limits and Allocations Quick Reference
Bulk API and Bulk API Limits and Allocations
Item
Bulk API Limit
Bulk API Limit
Maximum number
of characters in a
field
The same
Maximum number
of fields in a record
The same
Maximum number
of characters in a
record
The same
Maximum number
of records in a batch
NA
Maximum number
of characters for all
the data in a batch
NA
Limits Specific to Query Jobs
Item
Bulk API Limit
Bulk API Limit
Number of attempts to query
attempts at minutes each
to process the batch There is also
a minute limit on the time to
process the query If more than
attempts are made for the
query an error message of Tried
more than fifteen times is
returned If the query takes more
than minutes to process a
QUERYTIMEOUT error is
returned
The API automatically handles
retries If you receive a message
that the API retried more than
times apply a filter criteria and try
again
Number of retrieved files
files If the query returns more NA
than files add filters to the
query to return less data Bulk
batch sizes are not used for bulk
queries
Results lifespan
days
The same
Maximum retrieved file size
GB
NA
The API client can navigate
through the full set of results by
using the locator and
maxRecords query
parameters The client is not
bound to a set of files
Salesforce Developer Limits and Allocations Quick Reference
Item
Bulk API and Bulk API Limits and Allocations
Bulk API Limit
Number of query jobs that can be See Batch Allocations
submitted per hour rolling
window
Bulk API Limit
The current number can be seen
in the
DailyBulkVQueryJobs
value in the response to the
vXXXlimits REST API
method
Total query results that can be
generated per hour rolling
window
NA
TB
The current size can be seen in
the
DailyBulkVQueryFileStorageMB
value in the response to the
vXXXlimits REST API
method
Number of characters in a SELECT NA
clause
This limit pertains to all the fields
listed between SELECT and FROM
This includes the commas that
separate the fields and the
quotation marks that Salesforce
automatically wraps around each
field Salesforce automatically
removes any spaces between
fields
For example in this query
SELECT CloseDate
NameStageNameAmount
FROM Opportunity
Salesforce converts the SELECT
clause to
CloseDateName
StageNameAmount
The number of characters in this
example is
Salesforce Developer Limits and Allocations Quick Reference
API Query Cursor Limits
General Limits
Item
Bulk API Limit
Bulk API Limit
Batch and job
lifespan
Batches and jobs that are older than seven
days are removed from the queue if they are
in a terminal state completed or failed
regardless of job status The seven days are
measured from the youngest batch associated
with a job or the age of the job if there are no
batches You cant create batches associated
with a job that is more than hours old
Jobs that are older than days
are deleted if they are in a
terminal state completed or
failed
Batch processing
time
Batches are processed in chunks The chunk NA
size depends on the API version In API version
and earlier the chunk size is records
In API version and later the chunk size is
records Theres a minute limit for
processing each chunk Also if it takes longer
than minutes to process a whole batch the
Bulk API places the remainder of the batch
back in the queue for later processing If the
Bulk API continues to exceed the minute
limit on subsequent attempts the batch is
placed back in the queue and reprocessed up
to times before the batch is permanently
marked as failed
Binary content
The length of any file name cant exceed NA
bytes
A zip file cant exceed MB
The total size of the unzipped content
cant exceed MB
A maximum of files can be
contained in a zip file Directories dont
count toward this total
Maximum time that hours
a job can remain
open
The same But this only applies
to ingest jobs not query jobs
API Query Cursor Limits
A user can have up to query cursors open at a time If QueryLocator cursors are open when a
client application logged in as the same user attempts to open a new one then the oldest of the
cursors is released If the client application attempts to open the released query cursor an error results
Salesforce Developer Limits and Allocations Quick Reference
SOAP API Call Limits
SOAP API Call Limits
API Name
API Limit
Limit Description
create
Maximum number
of records created
Your client application can add up to records in a
single create call If a create request exceeds
records then the entire operation fails
describeSObjects Maximum number
of objects returned
emptyRecycleBin Maximum number
of records in the
Recycle Bin
getDeleted
Limits for returned
records
The describeSObjects call is limited to a
maximum of objects returned
Your org can have up to records per license in the
Recycle Bin at any one time For example if your org has
five user licenses records can be stored in the
Recycle Bin If your org reaches its Recycle Bin limit
Salesforce automatically removes the oldest records as
long as they have been in the recycle bin for at least two
hours
If your getDeleted call returns more than
records and the user is a system administrator
an exception EXCEEDEDIDLIMIT is returned
If your getDeleted call returns more than
records and the user is not a system
administrator an exception OPERATIONTOOLARGE
is returned Note that this error is returned when more
than records across the organization have been
deleted not just the records viewable by the user
login
Login request size
limit
The login request size is limited to KB
merge
Merge request limits Up to merge requests can be made in a single
SOAP call
Up to three records can be merged in a single request
including the master record This limit is the same as
the limit enforced by the Salesforce user interface To
merge more than records do a successive merge
External ID fields cannot be used with merge
If you selected the option to retain the most recently
updated data privacy record for merging leads and
contacts but the caller does not have CRUD
permission for the selected data privacy record the
merge process selects the data privacy record already
associated with the master record
update
Maximum number
of records updated
Your client application can change up to records in a
single update call If an update request exceeds
records the entire operation fails