Conga composer is a tool which makes document generation easy and accurate. With Conga composer we are able to merge our data into templates in order to improve our document automation in Salesforce.

If, like me at first, you can't think of how to use this tool, think about automating documents like contracts, invoices, brochures and even payments for any kind of business.

The part that concerns me, is the correct configuration of Conga Composer in the org that you are interested to use it. So, firstly, you should download the app in the appExchange page.

Once you have done that, a lot of dependencies should have been created like an app or custom objects like Conga Query, Conga Template or Conga Email Template.

What I've learned about that merging process, is that each object has a particular function.

  • Conga Query: Object that keep SOQL queries where you request the fields that you will need to display in your template.
  • Conga Template: Object that keep your templates in Salesforce where you'll write the fields needed with the help of the tool included in the package called Template Builder.
  • Conga Email Template: Object that keep your email templates in Salesforce. Similar to the Conga Template object but instead of keeping templates that later can be used as an attachment, here what is stored is the content of an email with the fields that should be merged like a customer's name.

Firstly, we must know how to create a Conga Composer solution by us. In order to achieve that goal, I found very useful this link.

Basically, in that link is explained that you need a custom button called "Conga Composer" for example, with the basic setup in order to complete the process. The button will contain values such as the session id, serverUrl or the record Id from which we will merge the fields.

Once you have completed this step, I recommended you to use another custom button and start adding the custom logic for your manual solution adding attributes to the button such as reportId (if you have decided to use reports instead of queries), queryId (if you are using a conga query), the templateId and the CongaEmailTemplateId.

As said in the last paragraph, the automation can be done using reports instead of queries. I've builded the whole process using queries and using dynamic reports.

One important drawback when using dynamic reports, is that we are using the field label instead of the API name, so if our org has some fields translated in other languages, the merge won't be done correctly so I recommend you to use always the queries path for merging fields in Conga Composer. It's also important to be sure that the users allowed to execute this automated process can have visibility to the report.

Template Builder

An important thing to know when using Conga Composer is the data that will be shown in the Template Builder. In Conga, the master object, the object identified with the ID parameter in our solution URL or button, determines what data is displayed in the Template Builder. In that tool, is displayed custom and standard fields.

Check this link if you still have doubts regarding why some fields that you may expect to appear in the Template Builder are not being showed. For me, this link is basic to understand how Conga works and understand the field visibility in that basic tool of the merge process.

IF statements in Conga Composer

If fields (also called “if statements”) allow you to compare two values and display document content based on the result of the comparison as Conga Composer official documentation explain.

What I can say about "if statements" in Conga Composer that are very simple to be build. The difficulty comes when you start nesting more than one "if", using custom fields, etc but they are a great way to display different content, including hide, varying on different conditions for example the Status field of a contract.

If in your template you need "if statements", I'll recommend you to check this link of the Conga official site, in which there's a video and best practices to follow.