Generate Mail Merge Documents from a List View

Conga is part of the apps we recommend for most Salesforce implementations we do. We typically use it to generate Mail merge Documents (think about thank you letter) from a donation or generate a list of documents from a report (think about batch thank letter). In other word it was all donations or just one. But what if you wanted to be able to manually select which donation to send acknowledgment for.  I present to you: how to trigger the generation of a Conga mail merge document from a list view.

Build a Salesforce View to select records to mail merge

Another interesting use of this button would be to generate tax receipt at the end of the year. A donor might have made several donations in a single year but this solution could combine them all and generate a single document for each donor, listing the amounts each individual contact donate that year (or just a total amount).  The button would then update the date the letter was printed thereby removing those donations from the list view.  Instead of having to go into each record to run Conga (or using mass merge) and print and then use inline editing to update all the record statuses you can handle everything with one button and download one document instead of individual documents for each record.

You can see what a sample mail merge output of this might look like here.  Each Contact record appears on a separate page and has their associated donations listed in a table.  The template used for creating this should look similar to this.  Please note that this is not an exact template, it’s just a recreation that is intended to be used as a guideline for creating your own documents.  In the first link the table borders are hidden but the nested tables are required.

The Conga Query for multi-object templates can be a little confusing; the important thing to remember is that you’re doing a query on the lowest level object, in this case that would be Opportunities.  Refer to the screen capture below for an example.

A little Javascript

Lastly, the javascript implementation of this list view button operating on the Opportunity object can be viewed at this link.  This might be somewhat technical if you’re not familiar with javascript but it could still be worth reviewing, there’s no harm in looking! (or ask us for assistance).

So there you have it!  With some minor modifications this javascript could be ready to go as a one-click, hassle free, Conga list view button.