The most common reason for seeing the error Apex CPU Time Limit Exceeded in the CPQ package is that the record being created, edited, or renewed is too large. Another common cause is when there is also automation designed to execute in parallel with the CPQ package automation.
Depending on the object, there may be too many Quote Lines, Subscriptions, Order Products, etc. attached to the main object being edited. A large volume of child records is a common cause of transactions failing with CPU Time Limit errors in Salesforce CPQ. If this error occurs during quote calculation, the first thing that you should confirm is that the org is leveraging the Large Quote Performance Settings available to you in the managed package settings. The Quote Batch Size breaks down your quote into smaller chunks for sending back and forth to Heroku.
General best practices in Salesforce CPQ are to avoid writing a trigger, flow, workflow rule, or process builder on the Quote, Quote Line, and Quote Line Group objects whenever possible. These add significant overhead to the save process of Quotes, which involves updates to the Quote Line records (often numbering in hundreds or thousands). Whenever updating fields on these objects, you should attempt to make the updates via a Price Rule or a Quote Calculator Plugin (QCP) as opposed to the Salesforce native automation. The Salesforce CPQ calculation sequence is better optimized to include Price Rules and QCPs.
Automation on Orders and Contracts (and their related objects) can also put an org at risk for CPU Time Limit errors. It's important to remember that Orders and Contracts have related objects that generate at a one-to-one ratio with Quote Lines (or even one-to-one with quantity on Quote Lines). If Price Schedules need to be generated, a full calculation sequence also runs with Order creation. As a result, when Price Schedules are used, generating an Order from a Quote or Opportunity can't handle the same volume of Quote Lines as generating a contract from that same Quote or Opportunity due to the extra calculation and extra records being generated on the Order Products.
For more information related to Apex in CPQ, read our help article that provides tips for troubleshooting Apex Governor Limit errors.
If the error occurs during Document Generation, it can be due to factors such as the number of quote lines, quote line groups, size of the quote template, or a large number of image files (or a few larger sized images). The resolution for this is to reduce the number of Quote Lines/Quote Line Groups, or to simplify the Quote Template.
000383156

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 are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security 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 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.