Governance and Quotas

Salesforce B2C Commerce was designed to be used as an ecommerce system. With that usage scenario in mind, certain constraints and limits were set during design and implementation to ensure the efficiency and stability of solutions built on top of B2C Commerce. These limits concern memory usage, resource consumption, API calls, and the number of business objects. Quotas are part of B2C Commerce. They are used to monitor resource usage in custom code. Resources include memory, application server threads, database table sizes, and so on. Typically, when a quota is exceeded, custom code is using supported capabilities inefficiently, and a more efficient solution is possible.

The quota status is aggregated across all application servers of the instance. Object quotas status is updated with an up to 20 minute delay. Object relation quotas are checked and status is updated when relations are modified, not when they are traversed. The status of object relation quotas and API quotas is shown for the last 24 hours or since server start.

Note: While most object quotas have a 20 minute delay, the Private Keys and Certificates quotas will be updated every 24 hours..

See Quota Log Files for more information on where violations occurred. When an enforced quota is violated, a detailed message is written to the error log.

See the latest B2C Commerce API documentation (Quotas) for quota limits.

What Happens When a Quota Is Exceeded?

All API/Object quotas have a default action, as follows, that occurs at the instance level (PRD, STG, DEV, Sandbox).

Action The quota is... B2C Commerce will... You should...
log_only In the evaluation stage (by Salesforce). Report usage levels against the quota limit within quota log-files (only). Ignore the reported information for now.
warn A valid indicator of potential performance or stability concerns. Report usage levels against the quota limits within quota log-files as well as within the Quota Status dashboard within Business Manager. Take corrective action at the warning thresholds (60% of limit). B2C Commerce will not prevent usage beyond the error threshold (100% of limit). Consequential realm instability or non-performance can occur.
error A valid indicator of potential performance or stability concerns. Report usage levels against the quota limits within quota log-files as well as within the Quota Status dashboard within Business Manager. Take corrective action immediately. B2C Commerce will prevent usage beyond the Error threshold (100% of limit), and prevent consequential realm instability or non-performance.

B2C Commerce enforces API/Object quotas for all new B2C Commerce realms. All API/Object quotas that are set to error are enforced on all instances (PRD, STG, DEV, Sandbox) unless they are softened (reset to warn) in one of the following ways:

A quota is either enforced or not enforced. If an enforced quota is exceeded, an exception is thrown, which prevents the current operation from completing. The exception can't and shouldn't be caught within a customization. The design criteria must be avoidance of quota violations.

Examples of quota violations are:

If an enforced quota is exceeded in a storefront request, the general error page opens. If an enforced quota is exceeded during a standard import, a warn or error is reported. If a quota isn't enforced, B2C Commerce doesn't take an action when the limit is exceeded. B2C Commerce plans to enforce all quotas in the future. See Viewing Quota Status.

How safe is my implementation

Information on API and object usage levels, number of violations on a particular instance, and which quotas are enforced, can all be found by selecting Administration > Operations > Quota Status. Business Manager shows quota usage/violations since server restart or within the last 24 hours.

With the proper permission, you can view details on:

A quota status can be:

Some quotas also specify a warning threshold, to give you an early indication that a quota limit might soon be exceeded.

When the warning threshold is exceeded and when the quota limit is exceeded, messages are written to the quota log files. This happens for all quotas, enforced and unenforced. The log files are written to the log files folder and have the prefix quota. Keep in mind that quota log files are written with a time delay. The log files contain information about where the quota violation occurred. Also, they might contain information about quotas that do not appear in Business Manager. These are experimental quotas, still under review by B2C Commerce, and not enforced; you can safely ignore them.

Best Practices

Review the quotas and see how you can stay within the limits. For any quota exception, the display will show Action required. Unless a quota is enforced, no action is required to fix an exception. However, you can use this real-time data (in conjunction with the Quota Log Files) to assess your current API/Object usage. For example, you should evaluate this data for any site that is experiencing performance issues, and check the quota logs to help identify pipelines that exceed limits.

Related Links

Before You Begin Coding

Implementing Quota Overrides

Viewing Quota Status

Quota Log File Format

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. By continuing to use this site you are giving us your consent to do this.