Best Practices for Managing Memory in Salesforce Spiff Statements
Calculation delays occur when the Salesforce Spiff takes too long to process a requested action. Statement processing can time out with errors, which are often related to large data filters, complex plan design, and inefficient rule structures.
Required Editions
Available in: both Salesforce Classic (not available in all orgs) and Lightning
Experience
Available in: Enterprise, Unlimited, and Developer
Editions
Available for an additional cost in: Professional Edition with Web
Services API Enabled
The statement size limit is 35 MB, or about 5,000 obligations. The maximum number of obligations varies depending on the number of rows and columns in the obligations.
To help reduce memory usage, consider these options when creating commission plans.
Rules
Optimize rule structures. Look for opportunities to simplify your compensation plan rules. Avoid unnecessary calculations or unnecessary dependencies that are contributing to processing times.
To resolve statement timeouts, first create another plan. Then, move payout rules with a large number of rows and columns of data from one statement to the new plan. This approach shares the data loading burden across multiple statements.
Filters
Enhance data filter efficiency through strategic reordering. Prioritize the most important and simple filters first. Save complex operations such as the contain function, double filters, and relationships for the end of the data filter.
Calculations
Identify calculations that can be encapsulated to improve efficiency.
Connectors
Get rid of unused connector fields from the logic or statement.
Identify deal-level calculations that you can convert to summary calculations.
Overwrites
Check for plan overwrites. Overwrites can cause unexpected delays when they interfere with downstream rules. Use overwrites sparingly, and make sure that overwrites aren’t causing longer processing times.
Note Spiff doesn’t support overwriting data in statements that exceed 35 MB.
Tracing
Turn off tracing for accumulated variables, relationships, double filters, and other QTD or YTD calculations as they generate a large amount of trace data. Turn off tracing for any unnecessary calculations for front-end statements or reporting purposes.
Trace-related issues can occur when a summary calculation appears in multiple locations within a formula and the calculation is visible for the statement card. To mitigate these issues, consider creating an untraced field, which references the original traced field.
Usually, you use the untraced field and reserve the traced field for a single location. This approach ensures the statement’s display while minimizing trace overhead for other uses of the field.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.