Plan, use and schedule Salesforce data in Conga solutions and Conga batch

Akshay Lonari
Cloudwerx
Published in
10 min readMay 20, 2022

--

Introduction

Conga Composer is an easy-to-use and frequently used document-generation tool. Conga Composer is a useful tool for documenting Salesforce tasks. Using templates that integrate Salesforce data from any standard or custom item, reports this application makes it simple to create and send a wide range of documents.

About Conga Courier

Conga Courier is a sales tools software solution that delivers sales information to people using Salesforce. Users can choose the sort of report they want to send, the recipients they want to send it to, and the subject line of the email they want to send. The application can then send reports out on a periodic or immediate basis.

Conga Courier

Courier’s final days

Conga has decided to End of Life the Conga Courier product on May 1, 2022, after many years of success on the market. They have suggested that existing Conga Courier users should upgrade to the Conga Composer + Batch solution as soon as feasible, or when their contract expires, to ensure their success and business continuity.

Conga Composer

Salesforce users can use Conga Composer to personalize, streamline, and scale document generation and reporting. Composer can populate fully designed templates with data from any standard or custom Salesforce object and send them via a variety of delivery mechanisms.

Composer’s operation

  1. The administrator sets up Composer Solutions so that end users can launch Composer from a button or link on a Salesforce object.
  2. The administrator selects which Salesforce object data to use, creates document templates, specifies formatting, and limits end-user modification possibilities.
  3. The solution can then be launched by clicking the button.
  4. End-users can make choices, such as which template to use for the final merged files, or the administrator can pre-select templates and other options and run the solution entirely in the background. The administrator can also automate solutions using Salesforce workflows or on a schedule using Conga Batch and Conga Trigger.

Let’s have a look at how the Conga Solution is configured in Salesforce.

  1. We must first add remote site settings:

2. Search for Conga Solution in the app launcher and use the Standard new button to create your first solution.

The Master Object can be any object, but we’ll use Conga Global Merge for now. We chose this object because we can use the conga global merge record Id to schedule the solution we’re about to generate.

Solution record created:

As we can see, there are many other options below the button URLs :

Add Report Data
Add Query Data
Add Template
Add Conga Email Template
Customize with Parameter

a. Add Report Data:

Using the ‘Add report’ data button in Reports, we can access all of the data in the report. Report Name can be anything, whereas Report ID is simply the Salesforce report ID. Aliases can be anything as per your need.

In this scenario, Advanced Filter Configuration is critical since setting PV0 Value to + ensures that the report contains all of the data. Otherwise, it will take a single record, and that is not what we needed.

Click on add report to solution record.

b. Add query data:
You may also use the Conga query builder to create SOQL queries on reports, such as getting all report data and including a where clause with Id=” Your Report ID.” Like we did in Add report data setup.

You can also immediately create a Conga Query Record. That option is visible in the lower-left corner.

On click of create new conga query record you will see the following pop-up :

Just save the record

In the dropdown list, you should now see the Conga Query Builder option.

We can build our query on a number of different objects.

Instead of report data, we can utilize this conga query record. However, I like to use Report data.

When you refresh the Query data page, you’ll see the new Conga Query Record that you made.

Also, Setting PV0 Value to + assures that the report contains all of the data in this scenario, therefore Advanced Filter Configuration is crucial. Otherwise, a single record will be required, which is not what we required.

Click Add Conga Query to Solution Record.

Click Return to Solution record, You will see the below view.

Create Global Merge is the next step — click Create Conga Global Merge. This will create a salesforce record under the object conga global merge.

The Conga global merge record ID has been modified to “a4B9r00000007MT,” as shown. As you can see, the URL for the Current Button has been updated, so you can test your solution right now just by clicking on launch Composer. To update the solution, click the Update Global Merge button. We’ll see how the update button works soon.

Click launch composer:

Click on template builder- this will create the template for your report data.

Our actual report data is CongaSolutionTest, while our query data is TestSolution. Choose CongaSolutionTest to generate a new template, which will be downloaded as a word document later. Let’s have a look at it.

When we choose CongaSolutionTest, conga allows us to choose fields from the report to be included in the template.
Let’s look at the word file and how it looks with the template. The symbol file with the arrow highlighted downloads the word template with the fields we selected.

This is how the template appears in a word document with the report field included. This word file will be attached to the Conga template record, which will be sent via email as an attachment.

Let’s have a look at how to make a conga template. Please return back to the Conga Solution Screen. Click the highlighted Add template button.

Click create conga template record. Created Conga template record will look like this.

As shown in the image below, go to the related tab and upload your word document file in Notes and Attachments.

When you return to our Conga solution page, you should see the newly created Conga template record on refreshing it.

Click Add Conga Template to Solution Record to add the newly created record to our solution. Return to the solution record after the template has been added.

We’ll upload another email template right now. The highlighted button is Add Conga Email Template. The purpose of this button is to make a record named Conga email template, to which we can add our email template from our word document. Let’s take a closer look.

Let’s start by making a record of the conga email template. This is how the newly created Conga Email Template record will look.

There is an option “Advanced Editor” in the drop-down menu. This will make it easier for us to insert our template into the HTML body. Copy the template from the downloaded Word document.

Copy the template from the downloaded word file and paste it into the HTML body of our newly created record.

As shown in the image below, our record will look like this

To add the newly created record to our solution, click Add Conga Email Template to Solution Record. After you’ve inserted the template, go back to the solution record. Tip: Only one record of the Conga Email Template can be added to our solution.

Select “Customize the parameter

Let’s add some additional parameters, such as SendtoID, AdditionalReplyTo, and so on. Parameters reference link: https://documentation.conga.com/composer/latest/conga-composer-parameter-guide-143899233.html

Let’s now add some Email parameters, such as EmailToId and EmailAdditonalTo.
EmailToId- Here, we’ll use the Salesforce userID.
EmailAdditionalTo- I’ll use my own email address here.

Now let’s add this parameter to our solution and use update conga global merge to update it. As you can see in the image below, the template and parameters for the Current Button URL have been modified.

Conga Trigger:

Conga Trigger is a brand-new feature in Conga. Our conga solution is stored in a field created by the conga trigger. Let’s have a look at how it works.

Look for the Conga trigger set up in the App launcher. If your Salesforce refresh token is old or missing, create a new one or update your existing one.

Search for Conga trigger formula builder in the App launcher:
Select Conga Global Merge as the master object.
There is a field called “Name” under the button link section that will display all of the solutions that are built on Object Conga Global Merge.

When our solution is used in the Conga formula builder trigger to create the field, it will look like this. On the Conga Global Merge object, this field will be created.
Edit Field Level Security is important because if a profile does not have access to this newly generated field, Conga Batch will fail to schedule this solution.

Conga Batch:

Conga Batch Setup can be found in the App Launcher. Enable the checkbox scheduled conga batch master switch and If you have any outdated or missing tokens create a salesforce refresh token or update to new.

After that, go to the App launcher and look for Conga Batches. Make a record of the Conga Batch.

URL Field Name: Conga_Solution__c this field was created using the Conga trigger on the Conga Global Merge object.
Record Id: This Id is already existing in Conga Solution, simply copy and paste it. Maintain the same Version and Conga batch environment. This allows you to test the batch before scheduling it.

Let’s look at how to start the batch and schedule it.

The Launch Button allows you to test the solution before scheduling it.
The schedule button allows us to schedule our solution per the time and date that we choose.

Launch Button: With a Click of the Start Button we can launch our solution.

Results of our Conga Solution

Mail attachment template

Let’s have a look at how the schedule button works. We can see the following view when we click the Schedule button.

Once you’ve made the necessary modifications, click enable. Your batch will now be enabled in the same way as a scheduled apex batch. On the conga batch record, you can see all of the scheduled information.

Each Conga record has a related tab that provides all of the Scheduled Conga batch history information. Let’s take a look at that as well.

Using Conga Batch, I was able to successfully get the email.

Conclusion:

Now, if you want to schedule reports with different templates — Unfortunately, Salesforce doesn’t give you this option. So now the next best option that we have is using Conga Courier (a product by Conga).

Unfortunately, starting from the 1st of May — this product is terminated, but no need to worry, we can achieve this with Conga Batch in combination with Conga Solutions, using the approach suggested above.

--

--