Document Generation in Salesforce CPQ

Document Generation in Salesforce CPQ

What is Document Generation In Salesforce CPQ?

Document Generation in Salesforce CPQ generates documents related to custom and standard objects like orders, quotes, contracts, and opportunities. It gives a summarized view of quote line items that are associated with a particular quote.

With this, we can customize the Template content as per requirement and can export as per the chosen file format. Users can generate and preview the document from the quote record only and send it to the respective user as per requirement.

What is the Use of Template Content?

Template Content is used to store the specific data that can be used in template sections. Template Content includes Line Items, Customer Details, a Cover Page, Signature Section. Once we have created a template section, we can use it multiple times to include in the Quote Template as per user requirement. 

There can be a requirement where in one Quote Template it should not contain Customer Information, so we can select the sections accordingly but in another quote template, we require all sections to be included.

Template Content is categorized into various types:


Used to display static text, freeform, merge fields, Formatted data(Bold, Italic, Underline), and so on. This covers the areas like Signature Section, customer Details, and Cover Page.

2. Line Items 

Used to cover the area to display Quote Line Items which show the information and data related to the quote line items.

3. Quote Terms

Quote Terms are categorized as Template Top and Template Bottom. Template Bottom includes notes and a signature section whereas Template Top includes logo, street address, ship to, and bill to details.

4. Custom 

This type of Template Content allows us to include a Visualforce page to show the Quote Line Item details. To refer to your specific Visualforce page, enter /apex/c__MyVFPageName in the Custom Source field. Replace MyVFPageName with the name of your Visualforce page.

How to Create Template Content?

1. Navigate to the Template Content Tab.

Document Generation - Template Content

2.  After clicking new, we need to select a type of template Content. You can select the type of Template Content as per your requirements. Click Continue

3. In this step, you can create Template Content, and you can format the styling of content in markup.

Note: You can add the merge fields. The syntax of the merge field is: {!objectname.Fieldname}. If the merge field contains a lookup field, it views the ID of the respective record. If we are required to show related data of the respective record, we need to create a formula field that shows the data of the respective record. We can show the formula field in the merge field.

You can observe that HTML-type template content includes both Static data and dynamic data.

Document Generation - Template Preview

After successfully drafting your content. Click Save

4. Navigate to the Quote Template object and create a New record under Quote Template.

Also Read –  How Discounting Schedule Works in Salesforce CPQ

5. After creating a record, navigate to the related List. You will observe two major related List i.e. Line Items and Section

a. Line Items include the Line Items columns which you need to show on the Document.

b. Section links Quote Template and Template Content. Let’s create a section now.

6. Click on the New section under Section Related List.

Make sure to include the recently created Template Content in the Content lookup field and Display Order as 1. Click Save

That’s all, We learned how to Create Template Content and how to reuse sections in different Quote Templates. Let’s quickly see how it works.

  1. Navigate to Quote Record.
  2. Click on Generate Document/Preview Document. Observe the Document is displayed


1. What type of Document format does Salesforce CPQ support?

It supports MS Word and PDF

2. Can we translate the Document we created?

Yes, we can make sure to enable MultiTranslationis enabled under the Salesforce CPQ package setting.

3. Can we send a document for E-Signature?

Yes, In Salesforce CPQ, we can send documents through Adobe Sign or DocuSign.


Document Generation in Salesforce CPQ transforms the sales process by offering a complete solution for generating quotations, contracts, and proposals within the Salesforce ecosystem. Sales teams can swiftly produce precise and polished documents by utilizing automation features, dynamic content, and configurable templates.

This improves operational efficiency and guarantees compliance and uniformity in all communications with customers. Additionally, Salesforce CPQ’s Document Generation feature makes it easier to integrate seamlessly with other Salesforce modules, like CRM and Billing, which streamlines end-to-end sales processes.

All things considered, it gives businesses the ability to provide outstanding customer service, increase sales, and increase productivity.

Get a complete Roadmap To Learn Salesforce Admin And Development

Share Now

Simran Thakur, a 3x Certified Salesforce professional working as a Salesforce Developer. In addition to her role as a Salesforce Developer, she is the Group Leader of the Salesforce User Group, Indore. As an active community member, she channels her passion into continuously learning new things and sharing valuable knowledge with the community.

Similar Posts

One thought on “Document Generation in Salesforce CPQ

Leave a Reply

Your email address will not be published. Required fields are marked *