Enabling Quote PDF Generation and Emailing in Salesforce Mobile

Overview

Quotes in Salesforce represent the proposed prices of your company’s products and services. They are typically created from Opportunities and include product details, pricing, discounts, and terms for customers. Salesforce CPQ further enhances the quoting process by allowing businesses to configure products, automate pricing rules, and generate accurate quotes efficiently. You can create a quote from an opportunity and its products. You can create quote PDFs from a standard template or from your company’s design and can email quotes to your customers.

In many sales scenarios, quotes include multiple related products that are sold together as a package. Salesforce CPQ supports product bundles, which allow businesses to combine multiple products into a single offering with simplified pricing and configuration. Product bundles help sales teams streamline the quoting process and provide customers with packaged solutions.

Business Challenge

In Salesforce 1 (Mobile), there is no way to create the quote PDFs or to view the existing PDFs or to email the PDFs to your customers. Every time you need to use the desktop version of Salesforce to perform these activities.

How it was solved

To solve this, we created a trigger on the Quote object. Whenever its stage changes to ‘Presented’, it will fire the trigger and will create a Quote PDF. The template for the PDF will be decided from the id of the template stored in a custom setting. To view the PDF in mobile, users need to view it under ‘Notes & Attachments’ related list.

To solve this challenge, we created a trigger on the Quote object. Whenever its stage changes to ‘Presented’, it fires the trigger and automatically generates a Quote PDF. The template used for the PDF is determined from a template ID stored in a custom setting. This approach allows organizations to automatically generate quote documents based on Salesforce data. Salesforce developers often use Visualforce pages to generate formatted PDF documents directly from Salesforce records.

Note: This can also be achieved on a click of button, without the need of the trigger.
For email, a lightning component was created, which will pick the latest created PDF for the Quote and will mail it to the recipients.

ScreenShots

The button and component for email

Quote-PDF-And-Email-In-Salesforce

In the screenshot below, you can see two records for ‘Notes & Attachments’ and preview of one of them.

Quote-PDF-And-Email-In-Salesforce

Conclusion

In this project the functionality to create Quote PDFs, view Quote PDFs & to email it to your customer from Salesforce 1 (Mobile), was achieved easily by writing some code (lightning component/web component & apex class).

Salesforce CPQ provides a comprehensive solution for managing product configuration, pricing, quoting, and document generation within the Salesforce ecosystem. By integrating automated quote generation, mobile accessibility, and document sharing capabilities, organizations can significantly streamline their sales operations. To explore more tutorials, best practices, and implementation guides related to Salesforce CPQ, visit our Salesforce CPQ page.

For any query on Quote PDF in Salesforce1, contact support@astreait.com