Conga Mail Merge Configuration Guide Welcome

Conga, Inc.
[email protected]
Conga Mail Merge
Configuration Guide
Conga Mail Merge 7 - Winter ’13 Release
Welcome
Conga Composer lets you generate documents and spreadsheets by gathering data from
Salesforce.com and merging to a template. The resulting file(s) can be printed or emailed
and you can log the actions you’ve taken in Salesforce.
Most Composer solutions utilize Conga Composer to let you create individual documents by
clicking a button from a record in Salesforce.
Conga Mail Merge, included with your subscription to Conga Composer, features a step-bystep wizard that guides you through the process of creating batches of documents. You can
access Conga Mail Merge by clicking the Conga Mail Merge tab.
Contacting Conga
Conga is a leading provider of software solutions to enrich your Salesforce.com experience,
specializing in document creation tools that integrate data from Salesforce. Founded in 2006,
Conga has since built a substantial market presence with more than 2,000 customers,
worldwide.
Technical Support
At Conga, we are committed to providing you with timely answers to your technical support
questions. We provide support to system administrators for our products via email or
telephone. Generally, we’re available weekdays, 9:00am to 5:00pm Mountain (GMT -7:00).
Tech Support Email:
[email protected]
Telephone:
+1 303-465-1616
Sales
For information on other products from Conga, please contact our sales department:
Sales Information Email:
[email protected]
Telephone:
+1 303-465-1616
Examples
For detailed examples, including sample templates, report designs and sample output, please
download the Conga Examples file. You will find the example files on our website.
© 2014 Conga. All Rights Reserved. Conga, Conga Suite and Conga Composer are all
trademarks or registered trademarks of Conga, as are other names and marks. All other
trademarks or registered trademarks are the properties of their respective owners.
Table of Contents
Installing Conga Mail Merge: An Overview ................................................................... 3
Before you Begin: Key Limitations for Template Size, Content, Output File Sizes
and More ........................................................................................................................ 4
Conga Mail Merge ...............................................................................................5
What is Conga Mail Merge? ........................................................................................... 5
Gather Salesforce Data .................................................................................................. 6
 Using Salesforce Reports with Conga Mail Merge ..................................................... 7
 Using Conga Queries with Conga Mail Merge ......................................................... 19
Create and Store a Merge Template............................................................................ 20
Refine Conga Mail Merge Solutions ............................................................................. 21
 Launching Conga Mail Merge from a custom button, link or tab .............................. 21
 Launching Conga Mail Merge from Conga QuickMerge............................................ 22
Page 2
Installing Conga Mail Merge: An Overview
The following steps provide an overview of how to install Conga Composer (and Conga Mail
Merge) and the general steps involved in deploying the application.
1. Install Conga Composer into your instance of Salesforce by visiting our page on the
AppExchange.
a. Click the “Get It Now” button and follow the on-screen prompts to install
Conga Composer. (You must provide system administrator credentials to
install an application from the AppExchange.)
2. Enable security settings to allow Conga Composer to interact with your data:
a. For each User Profile that has access to
Conga Composer, ensure the “API
Enabled” setting is active
b. If you want to use Reports as a data
source, ensure that “Run Reports” and
“Export Reports” is enabled for each User
Profile that has access to Conga
Composer
3. Enable the recommended settings on the Conga Setup page:
a. On the
Salesforce
Setup page,
choose View
Installed
Packages, then Configure for Conga Composer.
b. Enable the desired Template
Managers (v5 recommended)
c.
Enable the recommended Behavior
Modification settings (see image,
right).
d. Save your changes
Conga Winter ’12 Release
Page 3
Conga Mail Merge
4. (Optional) To use Reports as a data source for Conga Composer:
Create reports that meet your needs. See “Using Salesforce Reports with Conga
Conga Composer” in the Introducing Conga Composer Reference Guide, and “Using
Salesforce Reports with Conga Mail Merge” in the Introducing Conga Mail Merge
Reference Guide for details.
Tip! If you intend for your users to modify the Conga reports,
set the Public Folder Access on the Conga Conga Composer Reports folder to Read/Write.
5. Create merge templates in Microsoft Word.
Before you Begin: Key Limitations for Template Size, Content, Output File
Sizes and More
Conga Mail Merge is designed primarily for the generation of simple letters, mailing labels,
and envelopes. Over the years, we have observed many cases where customers have
frequently pushed far beyond the intended scope of use cases.
Size and volume do matter. When rendering a Conga Mail Merge document you are creating
multiple copies of the same document within a single Word output file, and this can have
severe consequences, including a total failure of the merge routine.
Consider the following examples:
•
A simple Word template with a 1 Mb image inserted in the body field. If you attempt
to merge data from 200 records using such a template, the resulting output file will
be more than 200 Mb in size!
•
A Word template with too many “formula” fields, such as IF statements or others that
require calculations to be processed in the final document. A template containing 30
IF statements, in a merge routine with 200 records will result in an output file
containing 6,000 formula fields!
When the output file is too large or complex to process, or if your Internet connection is too
slow to download the file in a timely manner, Conga Mail Merge will not return the output file
and return a “timeout” error. If the template cannot be simplified or reduced in size, the only
option is to reduce the number of records per merge.
Sadly, it is very difficult to predict the exact nature of limits, as the contents of individual
templates vary so widely, along with the number of records being merged. Best practice has
evolved to include careful testing of each solution to confirm the maximum number of
records that will reliably return the desired output file(s).
Size limits you should know for Conga Mail Merge:
Conga Mail Merge Limits
Output File Size
Template Size
Page 4
Maximum
Single file limit 40 Mb (higher output
volumes will be returned as Zip files
with individual output files)
2 Mb
Heads Up: Master Field To Set functionality only works with letters/documents. It does not
work with labels or envelopes.
Conga Mail Merge
What is Conga Mail Merge?
Conga Mail Merge is a step-by-step wizard that guides you through the process of creating
batches of documents and logging the associated activity in Salesforce. You access Conga
Mail Merge by clicking the Conga Mail Merge tab.
With Conga Mail Merge, you can retrieve data from Salesforce by entering search criteria,
using specially configured Salesforce reports or by employing Conga Queries. After the data
retrieval, Conga Mail Merge then merges the data into a Word template to produce tens,
hundreds or thousands of documents. (Conga Mail Merge supports only Word templates.)
This chapter provides guidance on building Conga Mail Merge solutions that leverage
Salesforce reports as a data source.
Tip! You can launch Conga Mail Merge directly from a Campaign.
See “Launching Conga Mail Merge from a Button, Link or Tab”, page 21.
Tip! You can streamline (or even bypass) the Conga Mail Merge wizard with Conga
QuickMerge.
See “Launching Conga Mail Merge from Conga QuickMerge”, page 22.
Conga Winter ’12 Release
Page 5
Conga Mail Merge
Gather Salesforce Data
In Conga Mail Merge, you have several choices for searching Salesforce data. You may:
•
•
•
•
Enter search criteria for Contacts, Leads or Accounts
Select a Campaign
Select a Salesforce Report
Use QuickMerge and Conga Queries to employ SOQL statements
Contacts/Leads/Accounts: If you search for Contacts, Leads or Accounts, Conga Mail Merge
retrieves the desired records and makes all fields on those records available for
merging.
Campaigns: If you select a Campaign, Conga Mail Merge retrieves all Contacts and Leads
associated with the Campaign and likewise makes all fields on those records available
for merging.
Reports: If you select a Salesforce Report as the data source, the fields available for
merging depend, in part, on the columns defined in the Report. In the next section,
we’ll examine several possible scenarios for defining a Report for use with Conga Mail Merge.
Conga Queries: If Salesforce Reports aren’t available for your solution – perhaps because
Reports are disabled or you’re deploying to the Partner / Customer Portal – you can use
QuickMerge and Conga Queries, two custom objects available via private AppExchange
listings, to achieve the same result as Salesforce Reports. Further details and instructions on
how to get these custom objects are provided in a brief section at end of this chapter.

How do I search for objects other than Contacts, Leads or Accounts?
To access objects other than Contacts, Leads or Accounts, use a Salesforce Report. In doing
so, you can access virtually any information in Salesforce. You can find more information
about using Reports with Conga Mail Merge in the next section.
Page 6

Using Salesforce Reports with Conga Mail Merge
When using a Report as the data source for a Conga Mail Merge operation, Conga Composer
evaluates the contents of the Report and makes certain decisions based on that content. The
key decision is whether the Report is a “Master Object Report” or a “Master/Detail Report”.
In the following sections, we’ll explore each type of report and circumstances in which to use
each.

What is a Master Object Report?
A “Master Object Report” is useful when you want to create documents that require data
from a single object. For example, correspondence or brochures might be the kind of
documents you would produce with data retrieved from a Master Object Report.
This kind of report has only one column, namely the Salesforce Id of the records in
Salesforce you’d like to retrieve. This column is known as the “Master Object Id”.
From this kind of report, Conga Mail Merge automatically retrieves all fields from each
record listed on the Report. Therefore, it isn’t necessary for you to include any other
columns in the report, though it may be visually useful to do so.
Tip! You must save Conga Mail Merge reports to the Conga Reports folder.
To create a Master Object Report:
1. From the Reports Tab,
click New Report…
2. Select the type of data
you’d like to report on and
click Create.
3. For the report format,
choose Tabular
Conga Winter ’12 Release
Page 7
Conga Mail Merge
4. For the columns to include,
click Remove All
Columns, then include the
Id of the master object
5. For the Report Filters, define the Standard and Advanced Filters as desired
6. Save the report to the
Conga Reports folder
(See “Best Practice: Report
Naming Conventions” for
advice about report names)
Page 8
Example:
Say you’d like to send a document to a group of Accounts. In that case, the report you create
for Conga Mail Merge would contain a single column: Account Id.
When Conga Mail Merge discovers the Account Id column in the report, it retrieves all
fields from each Account listed on the Report. Therefore, it isn’t necessary for you to
include any other columns from the Account on the Report, except for the Account Id.
Later in this chapter, we’ll explore the View Data button, which will reveal the data Conga
Mail Merge has retrieved based on your report, and more importantly, the field names to use
when creating your template.
Conga Winter ’12 Release
Page 9
Conga Mail Merge

FAQ: Won’t a report that only has an Id column confuse my end-users?
A report with a single Id column isn’t very useful for people to read, but for Conga Composer,
that single column tells volumes! Users will only see the name of the report from the Conga
Mail Merge wizard, and therefore they won’t need to open the report directly.

FAQ: What if I include other columns that belong to the master object?
You can make your Salesforce reports more readable for people by including other columns
from the Master Object, but Conga Mail Merge doesn’t need them.
For example, if your Master Object Id is the Account Id column, columns such as the Account
Name or the Account’s Billing City are irrelevant to Conga Mail Merge, since it will have
already retrieved all columns from the Accounts on the report.
The additional columns make the report look nice though, in case people need to view the
report.
Tip! If you include other columns from the Master Object, move the Master Object Id to the
right to make the report more attractive.
Tip! You may sort the report by clicking a column header,
then click Save.
Page 10

FAQ: I want to create invoices or quotes based on Opportunities. How should I
set up my report?
Conga Composer automatically retrieves more information than you might expect when using
either the Opportunity Id or Contact Id as the master object. In those cases, Conga
Composer automatically retrieves the following:
Master Object ID
Column
Bonus Fields
Opportunity ID
In addition to the Opportunity fields, Conga Composer retrieves:




Contact ID
All Opportunity Line Item fields for all related line items (as
the “OppLineItems” dataset)
All Account fields for the related Account
All Contact fields for Primary Contact
All Account fields for Primary Contact
In addition to the Contact fields, Conga Composer retrieves:

All Account fields for the related Account
Therefore, when creating a report for Conga Mail Merge that uses Opportunity Id as the
Master Object Id, it is not necessary for you to include Opportunity Line Items on
the report.
Likewise, for reports that use Contact Id as the Master Object Id, you don’t need to
include columns from the Contact’s related Account.
Conga Winter ’12 Release
Page 11
Conga Mail Merge

FAQ: What if I don’t include an Id column at all?
Although Conga Mail Merge can use a report that has no Master Object Id, we don’t
recommend it because Conga Mail Merge’s ability to log activities against those records won’t
work. (Conga Mail Merge requires a master object Id column for activity logging to function
properly.)
If activity logging isn’t important to you, you could use a report like this with Conga Mail
Merge:
Since this report has no Master Object Id, Conga Mail Merge would retrieve the report and
make only the columns from the report available as merge fields. Furthermore, the
retrieved data would appear exclusively on the ReportData sheet in the View Data workbook
(see “FAQ: What Field Names do I use in my Template?” page 17), which has implications for
the design of your template.
Page 12

FAQ: What if I include columns that aren’t from the master object in my report?
Say the master object is the Account Id, but I also include Contact columns in
my report.
If your report includes columns from an object other than the master object, you’ve created
a “Master/Detail Report”, which is discussed in the next section.

What is a Master/Detail Report?
A “Master/Detail Report” is useful when you want to create a batch of documents that require
data from more than one object. For example, say you want to print a batch of Quotes with
Quote Line Items, where the Quotes and Quote Line Items are custom objects. You could
use a Master/Detail report to represent Quotes (the master object) and their related Quote
Line Items (the detail object).
This kind of report builds on the concept of a Master Object Report. A Master/Detail Report
has more than one column, one of which is the Salesforce Id of the Master Object. The
other columns in the report would be from a related object.
The Master Object Id column is treated in the same manner as in a Master Object Report,
namely, Conga Mail Merge will automatically retrieve all fields from the objects listed on
the report.
The remaining columns of the report are made available for merging as a separate dataset.
This is useful in that a single Report can define two distinct sets of data, namely the Master
data and the Detail data.
To create a Master/Detail Report:
1. From the Reports Tab, click
New Report…
2. Select the type of data
you’d like to report on.
Choose a type that includes
two or more objects.
Tip! Focus the scope of the Conga Mail Merge report to pull only
the objects and fields
necessary.
3. For the report format,
choose Tabular
Conga Winter ’12 Release
Page 13
Conga Mail Merge
4. For the columns to include,
click Remove All
Columns, then include the
Id of the master object
5. Drag any columns from
the related object you’d
like to include in your
merge operation
6. Leave the Master Object
Id is at the left-end of
the list
Tip! It doesn’t matter whether the Master Object Id is at the left or right, but the order can
affect the column headers in View Data, so choose left or right and stick with it!
7. For the Report Filters, define the Standard and Advanced Filters as desired
Page 14
8. Save the report to the
Conga Reports folder
(See “Best Practice:
Report Naming
Conventions” for advice
about report names)
Example:
Say you’d like to generate documents addressed to each of your Accounts. On each
document, you’d like to list the names of the Contacts associated with that Account. Here,
you could use a Master/Detail Report to define the data you need.
In this case, you’d create a Report based on “Contacts & Accounts”. The Account Id would be
the Master Object Id, and the remaining columns of the report would come from Contacts
(Salutation, First Name, Last Name, etc.)
When Conga Mail Merge encounters the Account Id, it retrieves all fields from the Accounts
listed on the Report. Those values appear on the Master sheet in the View Data workbook.
(See FAQ: What field names do I use in my Template?, page 17.)
The Contact details are retrieved from the report itself. Those values appear on the
ReportData sheet in the View Data workbook.
For example, from the report we defined previously, the Master sheet from View Data shows
the Account fields:
Conga Winter ’12 Release
Page 15
Conga Mail Merge
The ReportData sheet shows the Contact data, taken directly from the report:
Congratulations! The data is now ready to be merged into a Word template to generate
multiple documents. Your next step is to discover the field names of the data Conga Mail
Merge has retrieved so you can build a template.
We’ll examine how to discover the field names right after we answer a few FAQs.
Page 16

FAQ: Will a report that has a Standard Filter of “My (Whatever)” work with
Conga Mail Merge? For instance, I want a report of “My Accounts”.
Yes. The Standard Filters, including “My”, “My Team” and “All”, plus the date selection
criteria, are all respected by Conga Mail Merge. This is a great time saver -- you can create a
single report that would give each of your users the appropriate data for the merge
operation.

FAQ: Is it possible to use a Master/Detail report to retrieve data from more
than two objects?
Yes. It’s really a matter of the reports you can design in Salesforce. For example, you can
create a report of “Cases with Contact Roles” which makes fields from Cases, Contacts and
Accounts accessible via a single report.

FAQ: Will Custom Report Types work with Conga?
Yes, you may use Reports that are based on Custom Report Types to gather very
sophisticated data. Accessible from Setup | App Setup | Create | Report Types, you can
access virtually any field in Salesforce.

FAQ: Best Practice: Report Naming Conventions for Conga Mail Merge reports
When naming reports created for use with Conga Mail Merge, we suggest you adopt a
naming convention that reflects
•
The type of Salesforce Object within the report
•
The name of the template designed to work with the data selected by the report
The name of the report is (unfortunately) limited to 27 characters. Due to that limitation, we
recommend preceding the template name to use with the report with T: to indicate a
template.
Example:
Here are several examples. We’ve abbreviated the template name with a code number (“T:
005”, etc.) to save even more space.
Conga Winter ’12 Release
Page 17
Conga Mail Merge

FAQ: What field names do I use in my template?
An essential tool in the development of Conga Mail Merge solutions is the View Data button.
The View Data button is located at the lower-right corner of the third step of the Conga Mail
Merge wizard. We’ll refer to the button simply as “View Data” from here on.
Tip! You’ll use View Data frequently in the upcoming sections.
Conga Mail Merge assembles the data and presents it in an Excel workbook. Each dataset
comprises a sheet within the workbook. For example, this workbook has a Master dataset, a
ReportData dataset, plus datasets for Org and User data:
The column headers (row 1) in each sheet indicate the field names you must use in your
templates.
Tip! Locate fields quickly within the View Data workbook by using Excel’s Find command,
Edit | Find. Use it to look for known field values, thus revealing the Salesforce field name.
Then click the column header and copy it to the clipboard so you can use it when creating a
field in your template.
Tip! Since Conga Composer displays data across several sheets, when using Excel’s Find
command, you may find it helpful to search the entire workbook.
Choose Edit | Find, then Options, then Within Workbook.
Tip! If Opportunities are your Master Objects, Conga Mail Merge will automatically make the
Opportunity Line Items available for merging on the OppLineItems sheet.
Tip! Excel will display up to 256 columns in a sheet. If your dataset has more than 256
columns, it will be represented on multiple sheets in the View Data workbook.
Page 18

Using Conga Queries with Conga Mail Merge
In addition to using Salesforce reports to gather information from Salesforce, you may also
use Conga Queries, records stored in the Conga Query Manager. This custom object is
available through a private AppExchange listing which is available on the Support page on
our website, http://www.congamerge.com/support/.
This custom object stores Salesforce Object Query Language (SOQL) statements that can
retrieve Master and Detail data.
To use Conga Queries with Conga Mail Merge, you’ll also need Conga QuickMerge.
QuickMerge is also a custom object available through a private AppExchange listing, used as
a launch pad for Conga Mail Merge operations. In a QuickMerge record, you can define up to
two Conga Queries (representing Master and Detail data).
Complete details on the installation and use of the Conga Query Manager as well as Conga
QuickMerge are provided from our website.
Conga Winter ’12 Release
Page 19
Conga Mail Merge
Create and Store a Merge Template
Now that Conga Mail Merge is configured to retrieve the desired data from Salesforce, your
next task is to create a merge template using Microsoft Word. (Conga Mail Merge supports
only Word templates.) For complete details on creating a Word template, please see:

Designing Word Templates
Finally, after designing a template you may store your template in any of three locations:



The Salesforce template repository
The Conga Template Manager
Your local hard drive or network drive
Each of these options is discussed in Storing Merge Templates.
Page 20
Refine Conga Mail Merge Solutions

Launching Conga Mail Merge from a custom button, link or tab
You can launch Conga Mail Merge from a button, link or custom tab. This is particularly useful
for launching a merge operation from a Campaign in that the campaign can be pre-selected.
To implement this, add a custom button or link to a page layout with the following details.
Conga Mail Merge Custom Button, Link or Tab URL:
Display Type:
Detail Page Link or Detail Page Button
Behavior:
URL:
Display in existing window with sidebar
https://Conga Mail Merge.appextremes.com/apps/Conga/Welcome.aspx
?SessionId={!API.Session_ID}
&ServerUrl={!API.Partner_Server_URL_80}
You may include any of the following parameters to further refine your solution:
PARAMETER
DESCRIPTION
&ReportId=[Id]
Pre-selects the specified Report on the Search Criteria page
Requires:
A 15-character Salesforce Id of a Report. May optionally include filter criteria.
Do not use this in combination with any other “data source” parameter (such
as CampaignId).
&CampaignId=[Id]
Pre-selects the specified Campaign on the Search Criteria page.
Requires:
A 15-character Salesforce Id of a Campaign.
Do not use this in combination with any other “data source” parameter (such
as ReportId).
&TemplateId=[Id]
Pre-selects the specified template on the Document/Letter page
Requires:
A 15-character Salesforce Id of a template record.
&LabelTemplateId=[Id]
Pre-selects the specified template on the Label page
Requires:
A 15-character Salesforce Id of a template record.
&EnvTemplateId=[Id]
Pre-selects the specified template on the Envelope page
Requires:
A 15-character Salesforce Id of a template record.
&BPW=[0 or 1]
Bypass Wizard
Navigates directly to the Download page
Requires:
•
ReportId or CampaignId
•
TemplateId, LabelTemplateId and/or EnvTemplateId
Conga Winter ’12 Release
Page 21
Conga Mail Merge

Launching Conga Mail Merge from Conga QuickMerge
Conga QuickMerge is a custom object available through a private AppExchange listing, used
as a launch pad for Conga Mail Merge operations. The link to this private listing can be
located on the Support page on our website, http://www.congamerge.com/support/.
With QuickMerge, you can streamline selections made in the Conga Mail Merge wizard, or
even bypass the wizard completely. In many cases, you can download batches of documents
in as few as two clicks.
After you’ve located the link to QuickMerge, install the custom object into your Salesforce
environment and add the custom tab to the Conga Composer application.
Then create a QuickMerge Link record that pre-defines the choices that correspond to the
Conga Mail Merge wizard, including a ReportId or QueryId, TemplateIds and output
parameters. From there, launch Conga Mail Merge by clicking the Launch button, and
immediately download the results.
Further details on the installation and use of the Conga QuickMerge are provided with the
custom object.
Page 22