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.
In order for the reports to appear in the list of available reports, you must save Conga Mail Merge reports to the Conga Reports folder.
If you wish to use other folders to store Conga Mail Merge reports, the Conga Reports folder must be empty and you must include "Conga" in the Report Description field when you save the report.
To create a Master Object Report:
From the Reports Tab, click
Select the type of data you’d like to report on and click.
For the report format, choose.
For the columns to include, click, then include the Id of the master object.
For the Report Filters, define the Standard and Advanced Filters as desired.
Save the report to the Conga Reports folder.
For information about report names, see Best Practices: Report Naming Conventions.
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.
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.
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.
If you include other columns from the Master Object, move the Master Object Id to the right to make the report more attractive.
You may sort the report by clicking a column header, then click Save.
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
In addition to the Opportunity fields, Conga Composer retrieves:
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.
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, which has implications for the design of your template.
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:
- From the Reports Tab, click New Report...
- Select the type of data you’d like to report on.
Choose a type that includes two or more objects.
Focus the scope of the Conga Mail Merge report to pull only the objects and fields necessary.
- For the report format, choose Tabular
- For the columns to include, click Remove All Columns, then include the Id of the master object
- Drag any columns from the related object you’d like to include in your merge operation
- Leave the Master Object Id is at the left-end of the list
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!
- For the Report Filters, define the Standard and Advanced Filters as desired
- Save the report to the Conga Reports folder
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.
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:
The ReportData sheet shows the Contact data, taken directly from the report:
Create a Mail Merge Word Template with Report Data
Congratulations! The data is now ready to be merged into a Word template to generate multiple documents. The next step is to create your Word template and upload to Salesforce. See Create and Store a Mail Merge Template for more information.