Salesforce CPQ & Billing (CPQ) is a popular package from the AppExchange that helps your sales team create fast, accurate and professional quotes.
CPQ stands for Configure Price Quote. Using CPQ a sales rep can:
- Configure the combination of products and services which suit the customer.
- Adjust the price to handle volume pricing or special discounts.
- Create and send a quote to the customer.
Unlike many other packages, CPQ configuration is stored as data, so migrating changes to CPQ between environments involves data rather than metadata deployments.
In the rest of this post, we'll look at how to deploy CPQ changes with Gearset.
Customizing CPQ in Salesforce
First, we'll take a look at making some basic configuration changes to CPQ within Salesforce. Once we've made some changes, we'll dig into using Gearset to migrate those changes to another org.
Product
A common task is to deploy quotes between environments, but before we can create quotes, we'll need some products. A product has its own details, as well as some related objects.


The product details contain the name of the product, as well as some settings to specify how to use that product throughout the CPQ package.
It's worth noting that the product doesn't contain a price - instead, each product can have one price set in each related price book. When we create a quote, we'll choose a price book to provide the list prices for products in that quote. This price book can either be CPQ's standard price book, or a price book that you've created for a different region or market segment, for example.
As well as associated price books, a product can also have related product options and product features. These describe components which make up the product, as well as add-ons for the product.
Finally, to use a product in a quote, the product must have the Active
field set to true, and must have a price set in a price book.
Quote
Once configured, your sales team will create quotes for customers using the products available. The quote has its own details, including who the quote is for, and quote lines to document the products included in the quote.


The quote details specify the account, opportunity and contact that the quote is for. They also specify the price book that the quote uses, which needs to be set before we can start adding quote lines.
Deploying CPQ changes with Gearset
Now we've configured a product or two and some associated quotes, we can look at how to deploy this configuration to another environment.
What to deploy
Deploying the quote is a little counter-intuitive. When we look at the quote we see the quote lines, and it wouldn't be unreasonable to expect that deploying the quote would deploy these quote lines along with it. However, it's actually the other way around - a quote doesn't know about its own quote lines, but each quote line has a master-detail field to quote instead.

Because of this, when deploying quotes using Gearset's data loader, we'll actually deploy the quote lines, and include the related quotes as a dependency. Gearset's data deployment planner will look at all of the dependencies of the quote lines you're looking to deploy, determine the quotes that they depend on, and deploy the quotes first. Once these quotes have been deployed, Gearset will deploy the quote lines and point them to their associated quotes.
Setting up the deployment
We'll select the quote line (SBQQ__QuoteLine__c
) object for deployment. We've used the filters to narrow down to the quote from above, but we could equally leave the filters blank to deploy everything.

Now we have to select the related objects. We'll select:
SBQQ__Quote__c
to create the quoteAccount
to create the account associated with the quoteOpportunity
to create the opportunity associated with the quoteContact
to create the contact associated with the quotePricebook2
to create the price book associated with the quoteProduct2
to create the Products on the quote linesSBQQ__ProductOption__c
to create the product options associated with the productsSBQQ__ProductFeature__c
to create the product features associated with the productsPricebookEntry
to create the prices in the price book for the products in the quote

How the deployment works
Once you've made these selections, Gearset will plan the steps required to successfully deploy the hierarchy of data required for the quote line records we originally selected. There are lots of relationships between the records we want to deploy, and as a result the deployment plan that Gearset generates is quite long.

Let's take a look at the key steps:
Object | Step | Explanation |
---|---|---|
Pricebook2 | Fetch All (Target) | This fetches all price books from the target, so we can find the corresponding price book in the target to add prices to. |
SBQQ__QuoteLine__c | Fetch | This fetches the quote lines from the source that we want to deploy. |
SBQQ__Quote__c | Fetch Referenced | This fetches the quotes from the source that are referenced by those quote lines. |
Pricebook2 | Cross Reference | This matches price books in the source with those in the target, so that we can add prices to the correct record. |
Pricebook2 | Exclude Missing References | This removes price books from the deployment if the target doesn't have a matching price book. |
SBQQ__QuoteLine__c | Upsert | This upserts the quote lines in the target. |
There's several Fetch Referenced and Fetch Loop steps throughout the deployment. These steps fetch all the dependencies required to create the Quote & Quote Line records.
Once the deployment has finished, we'll see the quote in the target.


We need your help!
There's much more to CPQ - we can use different pricing methods to change the quote, set rules about which product combinations are valid, create quote templates to send to customers, and much more, but hopefully this provides an overview of deploying basic changes. We're working to improve our CPQ support, and if you regularly work with CPQ then we'd love to hear from you. Found a CPQ deployment that we don't handle well? Get in touch, and we'll work together to make sure you're able to deploy the changes that matter to you - just email us at [email protected], or leave a message in the in-app chat and we'll get back to you as soon as possible.