Chapter 12: CPQ Implementation Best Practices

So far, you have seen how Salesforce CPQ helps businesses close complex deals with speed and accuracy while improving customer satisfaction. It also helps you automate the sales process and avoid manual steps that may be error-prone. We have learned that CPQ helps in configuring customer-specific products, pricing them correctly, and selling the right products to the right customers. We have also discussed how using Salesforce Billing adds additional advantages by providing out-of-the-box billing for subscription, usage-based, and non-subscription products. This also helps create and automate invoices in one platform, avoiding additional integration costs.

The CPQ package provides you with all the customizations and controls that you need to automate your business processes. CPQ and its related customizations can be built on top of the Salesforce platform, and this gives you all the Salesforce automation, including standard configurations, code, and other capabilities, with integrations and third-party applications.

The way CPQ is implemented impacts the performance and scalability of a system when end users start using it. During implementation, it is critical that your company takes care of system optimizations and tunes automation accordingly.

In this chapter, we will learn some of the best practices related to CPQ:

  • The best practices for improving CPQ performance
  • The best practices for CPQ implementation

The best practices for improving CPQ performance

The term performance refers to the ability to process an action faster. For example, you want data to load, add, quick-save, and save records, complete calculations in the Quote Line Editor (QLE), and generate quote documents faster. When considering scale, we are discussing the increase in processing capacities. For example, you want to process as many records as possible. In addition, you want to load and save more quote lines, select more products, and calculate more rules.

CPQ performance and optimization depend on the Salesforce platform's and Sales Cloud's performance, as CPQ is built on top of them.

Make sure that your Salesforce environment is ready for a CPQ implementation and that you're not just adding the managed package to an already overburdened environment. For example, if the existing release management process continuously fails due to performance issues, then you should attack that problem first before trying to implement CPQ.

Within CPQ, you have several customizations that might have been configured as per the specific implementations for your business needs, as shown in the following figure:

Figure 12.1 – CPQ customizations on top of the Salesforce platform

Figure 12.1 – CPQ customizations on top of the Salesforce platform

CPQ is a managed package and all the Salesforce platform governor limits, such as Apex CPU time, Apex heap, SOQL queries, and DML statements, apply to it. For more details on Salesforce governor limits, refer to the Salesforce governor limit documentation here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm.

If a managed package developed by a Salesforce Independent Software Vendor (ISV) has passed a security review, then such a package is generally provided with a higher per-transaction limit. Also, CPQ is a qualified ISV-certified managed package. Salesforce CPQ has its own licensing and namespace, which is a unique identifier in the Sales Cloud. There's 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 per-transaction limits.

Configuration and customization complexity play a major role in CPQ performance. For implementation, we need to take into consideration both the CPQ system and Salesforce platform automation and customizations. In the CPQ QLE, the higher the configuration complexity, the higher the response time. Product selection plays a major role in the scalability of CPQ. More elaborate product selection criteria can only scale fewer number of quote lines. Any business will want to avoid these issues and complete the maximum number of quotes in the shortest time possible.

It is important to know which performance issues are annoyances versus which performance issues prevent deals from moving forward. For example, if my load time is latent because of the number of product rules being fired, that is frustrating. If my quotes fail to calculate because I have too many quote lines, that is a critical issue with the implementation.

Apex CPU Time Limit Exceeded is a very common error that users will encounter that prevents them from moving forward. For example, this error can occur while using an out-of-the-box contract or order generation method. It can also happen while saving and calculating a quote. This error can appear due to the following:

  • The record that is being created, edited, or renewed is too large.
  • The native Salesforce automation is being executed in parallel with CPQ package automation.

Salesforce package settings for large quotes can be used to resolve the error. The quote batch size will break down quotes into smaller chunks to send back and forth to Heroku.

Any transaction that fails with an Apex governor limit error message that points to the SBQQ namespace may not always be associated with the CPQ package. The underlying Salesforce platform and Sales Cloud customizations that interact with CPQ should be structured as shown in Figure 12.1.

The processes in the Salesforce CPQ namespace are not all designed to run multiple times in a single transaction. Custom code, flows, and process builders are some of the items that may cause managed package triggers to run multiple times, which can result in governor limit errors.

Important Note

Native Salesforce automation will add significant overload to a system while saving a quote. The general best practice in Salesforce CPQ is to avoid writing a trigger, workflow rule, flow, or process builder on a quote, quote line, or quote line group object. Updating fields on these objects using Salesforce CPQ configurations such as product rules, price rules, and the Quote Calculator Plugin (QCP) will optimize the performance.

There are three major functions performed on the Add Products page and the QLE that impact performance:

  • Load
  • Calculate
  • Save

Loading includes the static resources, the editor (which includes all the quote lines, bundles, and so on), the rules, and all the calculation details that happen in the background. Calculations can happen at the server level or locally, while local calculations are more efficient. Some of the calculations are at both the local and server level, and they will have a larger performance impact.

Let's learn about the key contributors in performance and scale while configuring the QLE and selecting products on the Add Products page:

  • The main performance and scalability impacts include Salesforce customizations and CPQ configurations and customizations. As per specific implementations, we have CPQ configurations such as the following:
    • Price rules, which perform automatic calculations and update the QLE fields. Lookup queries, which are used for fetching additional information that is not available on the quote, as well as reference fields, which are fields on the user interface and calculations.
    • Product rules are used to perform actions on a product, based on the conditions and queries. We have product bundles containing options, features, and constraints. Then, we have reference fields, which are fields on the user interface, product entity, and product option entity.
  • Standard Salesforce customizations, such as Apex triggers, and configurations such as process builders, workflow rules, and flows impact CPQ performance.

Any organization needs to balance these customizations as per their requirements and choose the right automation. We should minimize the number of automations for each object and only try to automate the most common uses cases. In this section, we will look at some CPQ configurations for achieving performance and scalability:

  • For implementations where we have the scenario of large quote lines, the CPQ Package Settings can be used. In the line editor settings for a large quote, Large Quote Threshold is disabled by default. When we have issues saving large quotes, this setting can be enabled. The threshold can be adjusted to improve the performance when the system throws governor limit errors. It's recommended that this value be set slightly lower than the number of lines on the quote.
  • Similarly, for loading large quotes, we can use the Quote Batch Size setting, which is set to 150 by default and can be changed as per a customer's needs. Quote load and save actions process the specified batch size. Smaller batches are less likely to hit governor limits. Larger batches cause better quote line performance because the editor makes fewer round trips to the server.
  • Enable the Improve Browser Performance checkbox in the CPQ Package Settings under the Additional Setting tab to take advantage of technology advancements in web browsers.
  • In Chapter 3, Configuring CPQ Products, we learned about nested bundles. But these have huge performance implications, and it is advised to avoid them as much as possible. Instead, we can use product features as an alternative. Nested bundles are more difficult to work within an integration layer as well, specifically creating quote lines via the CPQ API.
  • The configuration action on the Add Products page has load, edit, and save options. For better performance in the configuration phase, we need to use the load and save options.
  • There are a number of configurations that can be used in different ways. Using the right tools and automation can help improve performance. For example, formula fields with references are not good for performance, as they not only calculate the formula but also reference additional sObjects. Loading these formula fields to the QLE adds a significant load to a system, which is why we should minimize the usage of referenced formula fields. In this scenario, a price rule can be used because it is pre-cacheable and reduces the performance impact during loading.
  • Reuse referenced fields across different price rules.
  • Remove any unused fields from the QLE and referenced field sets.
  • While calculating the quote, we saw that we can have local calculation and server calculation. Most standard price rules are cached in the background, minimizing the performance impact. Some price rules may have to go back to the server to calculate the rule lookup queries, require local information, and gather additional data from the server to complete the calculations. This will add a round-trip, impacting performance. Adding lookup queries will increase the performance load. We can use summary variables as an alternative and use rollup summary fields for reference in a price rule. This can help pre-cache the price rule and avoid server calculation.

    Important Note

    Avoid unnecessary lookup queries for calculations and use platform optimizations.

  • For better performance, combine product rules/price rules with similar actions and conditions.
  • An evaluation event edit is inefficient, as it needs a server request. Instead, use load and save, which are more efficient. While configuring the evaluation scope, the quote-scoped product rule increases the performance impact, as it evaluates all the data under the quote, whereas product-scoped rules are only going to be evaluated based on the current data and bundle that you are configuring.
  • A combination of option constraints and dynamic features can be used as an alternative to price rules. These often perform similar types of actions and can be configured on products and bundles, rather than a product rule.
  • Prefer feature and option constraints in simple cases, where product rules are not required.
  • Avoid loading product images during configuration.
  • We have two ways of implementing the QCP – with the Apex legacy QCP or the JavaScript advanced QCP. The Apex QCP runs the calculations on the server side, impacting performance. It is preferred to use the JavaScript QCP, as the scripts run locally in a user's browser.
  • Automations built against opportunity and opportunity product will also have an effect, as users try to save a primary quote.

There are many things that can slow down CPQ performance. We can also measure some of the limitations on runtime, CPU utilization time, and other governor limits in test instances using Salesforce Event Monitoring, debug options, or third-party AppExchange tools. We are just scratching the surface here; there are lots of factors that can impact system performance.

In the next section, we will look into some of the implementation best practices.

The best practices for CPQ implementation

CPQ implementation is no different from any standard Salesforce implementation, and we need to follow the standard best practices. CPQ implementation is also a transformation product, and we need to think about additional best practices. Let's learn some of them:

  • Thoroughly understand your company's sales process and analyze whether there is a need for CPQ. Are the sales reps struggling to close deals? Do you have disconnected systems? Generically, there needs to be a very strong business case for bringing CPQ into a Salesforce environment, but what that business case is can vary widely from client to client.
  • Clearly define the implementation objectives and identify the right time to implement CPQ.
  • Analyze whether you need Industries CPQ with Industry Cloud or the standard Salesforce CPQ.
  • Understand how the existing processes and integrated systems will be affected by CPQ implementation and make sure that the user adoption is taken care of right from inception.
  • Provide necessary training to the technical team and business stakeholders.
  • It is equally important to understand your back office and finance processes along with the sales process.
  • Make sure you have seamless integrations with all the dependent systems.
  • Return on investment with CPQ implementation is significant. CPQ implementation will impact multiple stakeholders, such as legal, finance, sales, pre-sales, product management, product pricing, and downstream ordering systems. Make sure all these stakeholders are involved from the beginning by clearly defining the business process.
  • It's always better to go with a Minimum Viable Product (MVP) solution in the first phase, and once the business process stabilizes, introduce automation to expedite deal velocity.
  • Make sure you plan for phased deployment for a specific segment of the business or a specific region before expanding it to other regions.
  • Product catalogs need to be cleaned up and maintained to remain up to date.

Again, there is no right or wrong way to perform a specific implementation. It totally depends on the budget, tools, and resources that are available to you and your business.

Summary

Salesforce CPQ provides your company with the tools you need to take control of the Quote-to-Cash (Q2C) process. Using CPQ, you can easily configure unique solutions for your customers. CPQ provides controls to your sales manager and sales operation team, which include controls over discounts, approvals, and processes.

CPQ helps generate proposals and contracts in minutes, whether it is a new sale, an amendment, or a renewal. You can track all the deal data in one system, as everything is built on top of the Salesforce platform. Closing the deal and using automatic order and invoice generation integrates billing into the same platform, unifying the sales and finance teams into one system.

Integrated payment options make collections fast and easy. Scheduled reports and dashboard alerts can help the sales and finance teams monitor any potential issues. You can also generate revenue recognition schedules for orders with multiple products and different subscriptions. Managers and executives will have complete visibility of the related data from forecasted opportunities to recognized revenue for all deals, including new sales and renewals. You can connect with your customer in a new and different way and produce accurate quotes using CPQ!

Further reading

CPQ implementation is complex, and it is recommended to involve an implementation partner. For additional help and CPQ knowledge, do the following:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.70.21