Dynamic CPQ Quote PDFs in Salesforce: Part 1 - Product Setup

July 2, 2024
Tsenko Aleksiev
Claudia Schneebacher
Stefanie Peijan

How to create CPQ PDFs in Salesforce

Part 1 - Product Setup

The story of Bikes Unlimited

In the dynamic and customer-focused business environment of Bikes Unlimited, Selina, a dedicated sales manager, and Dina, an innovative developer, face a common challenge: simplifying and accelerating the process of creating customized quotes for a diverse range of bicycles and accessories. Customer requests for individually tailored bicycles, from racing bikes to E-Mountain bikes, with specific requirements for motors, battery types, and additional features such as bottle holders and first-aid kits, demand a high level of flexibility and precision in quote generation. The existing processes and tools do not offer the necessary dynamism to efficiently and effectively adapt quotes, highlighting the need for an innovative solution that enables the creation of dynamic Quote PDFs tailored to the individual needs of customers.

Let us introduce you to our two protagonists:

Selina spent the last three years working as a Sales Manager for “Bikes Unlimited”. She successfully implemented Salesforce CPQ together with her great team. Previously Selina worked as a Sales Rep and therefore understands the issues coming up from her team. “Bikes Unlimited” just added a new branch (E-Mountain Bikes) to their product registry and her Sales Reps are struggling to accommodate all of the new features/terms of conditions in the existing Quote PDF.

Dina joined “Biked Unlimited” as a Junior Salesforce Developer 4 years ago, in the meantime she obtained the “CPQ Specialist” certification. She was able to build up her Salesforce CPQ knowledge and coding skills and is ready for the Quote PDF challenges. She is well aware of the options available for creating PDF files that CPQ has, but because her requirements are a bit more complex, she decides to use a combination of setup and custom code.

The story

So, do you want to know how Dina developed this dynamic quote PDF?

Follow the steps below:

Ok, let’s get to work. First thing’s first, we need the following basic structure:

Product ( Product2 )

Product Features ( SBQQ__ProductFeature__c )

Product Option ( SBQQ__ProductOption__c )

Price Book ( Pricebook2 )

Price Book Entry ( PricebookEntry )

So, we will create a new Price book for our bikes, but in order to include a new Price Book Entry inside a custom Price Book, we first need to add those entries to the Standard Price Book which comes with your org.

Go to App Launcher > Price Books

If you are presented with the list view Recently Viewed and  you are not able to see any records, on the right, click the gear icon and hit New in order to create a new list view:

Add a descriptive name to the new list view, like “All Price Books”, give access to all users to use the list view and click Save:

Ok, now we can see all the price books … which in my case is just the Standard one

Let’s create our new bikes price book. Click New on the list view level and enter the data needed.

Now, let’s create couple of products, but before that, go to

Setup > Object Manager > Product > Fields And Relationships > Product Family > add new value “Bikes”

This step is very important.

Go to Products, click New, and enter some data.

I will give my Product the name Racing Bike and I am setting it as Active right from the start

Scroll down to Salesforce CPQ Configuration and set the values like this:


Configuration Type -> Required

Configuration Event -> Always

Option Layout -> Tabs

Option Selection Method -> Click

(more information can be found here)

Leave everything else as default and click Save.

Repeat steps for another 2 main products, called Road Bike and E-Mountain Bike and for couple of Product Options we are just going to add the names of the options and leave everything else.

Add price books to those products.

Only on those 3 products, create couple of features for later use.

Product features for each one of our bikes:

Wheels

Tires

Brakes

Frame

Frame Size

Pedals

Accessories

Motor

Battery

Let’s give each feature the following values:

Min Options > 1

Number > it is a good practice to start from 10 and move by 10 for every next ( 20, 30, 40 etc ). The idea is, if you want to place a new feature at a later point, in between Tires and Brakes, you give it the number of 25

Configured SKU > the base product, in our case the bike we want this feature to be on

Ok, after you are done, we need to create all the products that are going to be used as product options. These are all the option, create them by using only the name and leave everything else blank. On every product you create, don’t forget to add the prices ( Standard and a custom one )

Type Wheels:

Wheels 27.5 inches

Wheels 29 inches

Type Tires:

Tubeless Tire

Tubed Tire

Type Brakes:

Hydraulic Brakes

Disc Brakes

Type Frame:

Aluminum Frame

Carbon Fiber Frame

Steel Frame

Type Frame Size:

S

M

L

Type Pedals:

Flat pedals

Clipless pedals

Type Accessories:

Bottle holder

Dynamic text when bottle holder for road bikes and racing bikes is selected: Our bottle holders are designed to fit seamlessly on road bikes and racing bikes. The adjustable design ensures a secure fit on various frame shapes and sizes, providing a hassle-free solution for cyclists across different disciplines.

Dynamic text when bottle holder for E-Mountain bike is selected: Our bottle holders are exclusively designed to meet the unique demands of E-Mountain biking. The form factor is optimized for E-Mountain bike frames, providing a secure and integrated solution for carrying your hydration.

Bike lock

Phone mount

Saddlebag

Kickstand

Bell

First aid kit

Dynamic text for all bike types: Crafted from high-quality and water-resistant materials, our first aid kit is built to withstand the demands of various cycling environments. Whether you're navigating off-road trails on an E-Mountain bike or cruising on smooth roads, our kit is designed to keep your essential medical supplies secure and dry.

Type Motor:

Hub Motor

Mid-Drive Motor

Performance Line

Add dynamic text on the quote / Only for product “E-Mountain Bike” and only per type

Hub Motor:

Experience a smooth and responsive ride with our hub motors, integrated seamlessly into the wheel hub. Hub motors are known for their simplicity and ease of maintenance, making them an excellent choice for various riding conditions.

Mid-Drive Motor:

Our mid-drive motors are strategically positioned at the bike's bottom bracket, offering a balanced and natural feel. These motors excel in challenging terrains, providing efficient power transfer directly to the chain for enhanced climbing and overall performance.

Performance Line: Elevate your riding experience with the Performance Line CX motor. Renowned for its powerful assistance, this mid-drive motor features responsive torque sensing, ensuring optimal support on any trail.

Type Battery:

Li-ion Battery

Li-Po Battery

21700 Battery

NCR18650GA Battery

Add dynamic text on the quote / Only for product “E-Mountain Bike” and only per type

Li-ion Battery:

Our standard lithium-ion batteries are a tried-and-true choice for e-mountain biking. Known for their excellent energy density, Li-ion batteries provide a reliable and efficient power source, ensuring a consistent and enjoyable riding experience. They strike a balance between weight, capacity, and longevity, making them a popular choice among riders.

Li-Po Battery:

For those seeking a compact and lightweight solution, our lithium polymer batteries are an excellent choice. Li-Po batteries, with their polymer electrolyte, offer a high energy-to-weight ratio. This design makes them suitable for riders looking to maximize power in a sleek and lightweight package, ensuring an exhilarating ride without compromising on performance.

21700 Battery:

Elevate your e-mountain biking experience with the 21700 battery. Renowned for its higher energy density, this battery type provides increased capacity and efficiency, translating to longer ride times and improved overall performance. The 21700 cells are at the forefront of battery technology, delivering a powerful and reliable energy source for your adventures.

NCR18650GA Battery:

Our e-mountain bike batteries also feature the trusted NCR18650GA cells. These 18650 lithium-ion cells are known for their high capacity and stable performance. Riders can expect a robust and consistent power supply, ensuring they can conquer challenging terrains with confidence and reliability.

This is a lot of work, so let’s get on to it! Your product option should look like something like this

On every new product option, don’t forget to add the relevant feature. This is done for a better user experience in the Quote Line Editor, by grouping all the product options, like this ( the end result ):

Whenever you click on a tab, you will see the product options you added to that feature

*There are different variants to present the product options here, this is one of those, which is more common.

When we are in the Quote Line Editor, we have a search bar to look for a product and a filter.

“But, where are all the additional products ( the product options ), that we just created? Why aren’t they visible? Yes, this is the way we wanted it to behave, but still… I am confused”

Don’t be, you are right to wonder and to ask that. The reason behind it is because we are using a very powerful tool, called Search Filter. That is an object in CPQ and you can find it in the App Launcher. Click New to create new record and set it up like this:

Remember when we first created our bikes and we added “Bikes” as a new value in the product family picklist? This is why – we are using that new value to filter by it. With this new record, we are telling the system to use this as pre-defined filter in the Quote Line Editor, without first loading all products, than the user to click the Filter icon, choose the product family etc… Yahk! All that clicking!

Keep in mind that the name of the Search filer ( Search Bikes ) is used in the Quote Line Editor.

Ok, we have our base structure for the quote and the products we want to use, as well as the features and product options … and a search filter as a bonus ☺

Next and the more interesting step, is to create the Quote Template with those conditional texts.

Decoration IconLet's get started Image
Are you ready?

Let's get started

Ready to unclutter your customer relations and digital pipelines? Whether quick chat or detailed discussion: we would love to hear from you. To work out what you really need – and if we’re the right fit for you – we offer a trial day.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Update cookies preferences