Conga Composer Tutorial - Create Quotes in Salesforce
Step-by-step guide to build a quote with Conga Composer—templates, queries, email, and parameters.
One of the most common tasks people do in Salesforce is sending documents. This could be quotes, invoices, contracts, and more. Unfortunately, Salesforce doesn't support custom document merging out-of-the-box.
Thankfully, we can use Conga Composer to merge our Salesforce data into any document we would like.
Conga uses known tools like:
- Word
- Excel
- Powerpoint as the base for a template, and uses merge fields to populate our Salesforce data.
Today, I want to walk you through how to send quotes like this using Conga Composer.
Requirements
Before we get started, we need to perform a few tasks to get the base package configured.
We can install it from the AppExchange like usual.
From here, we will need to configure the connected app to allow our Salesforce instance to communicate with Conga's servers. We can do so by:
- Going to setup
- Searching for
Manage Connected Apps - Clicking on the
Conga Composer - Scrolling to the
Permission Setsection and adding theComposer Userpermission set.
One last thing we can do to streamline setup is add the Conga URLs to our remote site settings.
We can do this by:
- Going to the
Conga Solution Settingstab - Pressing
Add sitefor the 4 urls.
Additionally, we need to ensure the quote object is enabled. We can do this by:
- Going to "Quote Settings" in Setup
- Press Enable Quotes
Create A Quote
To start off building this quoting template, we need a Conga Solution. This will hold all the related data for creating the quote.
We can start by going to the Conga Solutions tab, and creating a new record.
We can give the record a name, and select the quote as our base object.
From here, we can create an action to run on our quote page by creating the button, then adding to the page layout.
Now that we have a way of running the solution, let's go to a test record, and press create quote. You can see the conga interface, but we are still missing a template.
We can get the necessary merge field names to build our template by going to Tools & Settings, and pressing View Data.
This will download a spreadsheet of all the merge field names, and associated data. We can switch sheets to see data from additional sources and queries.
Base Template
To get started with the actual template, Conga has a few starter templates on their website. We are going to convert the Invoice Template to suit our needs for quoting.
We will take this word document, and turn it into a dynamic quote that will include our customer information, as well as the data from our quote line items.
Let's start by changing the references from invoice to quote.
Next, let's remove additional data we won't need for our quote. We can also delete conga's explanation page of the template.
Now, let's tackle the merge fields. We can see the merge field format as follows:
{{QUOTE_AMOUNT}}
This is broken down where the first part of the formula is the object name, and the second part is the api field name.
We can reference our View Data spreadsheet to find and insert the appropriate field names.
For dates and numbers, the raw data is not in a presentable format.
We can format dates using the \@ inside the merge field. Then, we can append the date format to get the American date formatting. We can also use the Today value to get the current date.
And, we can use \# to format numbers, where:
- the
currencykeyword uses the default currency from the Salesforce org. - And, the number represents the amount of decimals we are looking to show.
Also, we can also add a logo to brand our form.
Once this is in a good place, we can run the solution using a local template. To do so, run the solution, then go to local template, and select our template to run.
You can choose the output to be a word document, or a pdf.
From here, we can see the merged data. This is a good start, but we still need to add additional data to make a complete quote.
Account
The first thing we want to do is show the customer's address. We can use the standard address fields on the quote to format the data as needed.
If Statement
To add an additional note based on the customer level, we can use conditional logic to display this note. There are two ways of performing this:
- If statements in the Conga Document
- Salesforce Formula Fields
If you can spare the formula fields, it is HIGHLY recommended to go down this route. If statements in conga are very difficult to get right, and Conga support will not assist with complex if statements.
In contrast, we can use standard Salesforce logic for getting the data we need, which streamlines our development process.
To create the field, we can make a standard formula field, and choose the text output. Then add the logic to output the necessary data.
From here, this field is now treated like a normal merge field, so add this to the document as usual.
Line Items
To add line items to our template, we can use the data from the QuoteLineItems dataset.
To access this data, we can use the TableStart / TableEnd
{{TableStart:Dataset}}{{TableEnd:Dataset}}
format, where the data set is the repeating data.
Let's change the existing template to use the QuoteLineItems dataset.
We can also highlight this in red, for easy readability.
Then, add the fields inside the data set like so.
And while we CAN sum the line items through Conga's merge function, I prefer to do as little math as possible through Conga for continuity.
Now, we can upload the template, and run to see the final product.
And if we needed additional data from our quote line items, say a custom field from the pricebook entry, we can rebuild this dataset using Conga Queries.
Queries
Conga queries are the best way of grabbing additional data. To do so, we can:
- Go to
Conga Querytab - Create a new record
- Use the
Conga Query Builder - Select the Quote Line Item object
- Select the necessary fields
- We can even select fields from parent records by traversing relationships
- From here, we can select the field that we are looking to filter off of. In this case,
QuoteId. - Now, we can pass in a sample record id to see the related data, which will open in a new tab.
Once the record is saved, we can see the entire SOQL query. To add this to our solution, we can
- Press
Add Query Dataon our solution - Select the query we just made
- give it a nice alias
- Press
Add Conga Query to Solution Record
Now when we return to our solution, and update our button, we can see the new query data as it's own sheet.
Add Template to SF
Additionally, we can upload our template to Salesforce so all users can create quotes without the local file. We can do so by:
- Going to the
Conga Templatestab - Creating a new record
- Ensuring that set a
Template Groupis set - And, uploading the template file
Now that the template is in Salesforce, we can:
- Return to the solution and press
Add Templates - Select the template that we just created
- Add the template to the solution.
- Go back and update the button
Now when we press Create Quote on the quote object, we can see the template is preselected for every user.
Parameters
With the template complete, it's time to customize the solution with parameters. Parameters allow us to streamline the end user experience by doing things like:
- Logging an activity
- Naming the output file
- Restricting the output as a PDF
To add these parameters to your solution, we can use the Add parameter button on the solution.
Each parameter consists of a name, value pair. We can get these pairs when we read the friendly manual.
- To log an activity we will use the
ac0parameter wth a value of1 - The output file name will use the
ofnparameter with a formula for our name format - And we can default the output as a pdf with
DefaultPDF.
Also, we can future proof our implementation by using the TemplateGroup that we used when first creating the template.
Once the button has been updated, we can run and see our results.
Now that we are happy with the merged document, we can continue to automate the process. One of these ways is to send an email to the contact. We can use Composer's built in features (parameters) to accomplish this.
First, let's create the body of the email we are going to send. We can do so using a Conga Email Template
Inside this template, we can specify a subject, and include merge fields as needed.
We can also edit the body using the Advanced Editor
Now when we go back to the solution, we can add the email template to the solution.
Additionally, to target the Contact Name on the quote, we can pass in the contact id to the EmailToId parameter. I used a custom field referencing the standard field since there were difficulties using the standard field in the button.
Now, when we update the button, we can run from the quote, and see that the default option is Email. When we press Merge & Email, we can see the email template is populated with data from our merge fields.
And once we send, the email also contains the merged quote.
And that's everything you need to get started with Conga Composer.
Video Overview
Complete Conga Composer Tutorial in 9 Minutes
This tutorial covers:
- Templates
- Solutions
- Queries
- Email Templates
- Parameters
Learn how to use Conga Composer with the video below.
#salesforce #conga #quoting