Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Show Page Sections

About Microsoft Word Merge Templates

The following information is specific to Composer for Salesforce merge fields. If you are looking for details regarding merge fields for Composer for Advantage Platform, refer to Creating Composer Platform Templates.

Overview

Microsoft Word templates are the most dynamic template type available for Conga Composer. With Word templates, you can merge master Salesforce data and repeating rows of detail or related data, format dates, numbers, and currencies. You can apply Word formatting and styles and use special merge fields for additional functionality like logic, formulas, and hyperlinks.

Tip: We recommend starting with Word templates to see if they can meet your needs before moving on to another template type like Excel, PowerPoint, HTML Email, and PDF.

Using Merge Fields in Word Templates

How to implement merge fields for Word documents through Composer for Salesforce.

Microsoft Word templates use merge fields to map data from Salesforce into your Word document. Composer for Salesforce supports two types of merge fields:

  • Traditional Word merge fields are inserted into the Word document using Word merge field functionality.
  • Text-based merge fields are inserted into the Word document by typing the merge field name surrounded by two curly brackets.

Traditional merge field: <<ACCOUNT_NAME>>

Text-based merge field: {{ACCOUNT_NAME}}

Merge fields are added to Word templates using the Conga Composer Template Builder.

Formatting Merge Fields in Microsoft Word

Merge fields containing dates, numbers, or currencies can be formatted using picture switches. Picture switches are added after the field name using \@ for dates and \# for numbers and currencies.

  • Example: {{TODAY \@ "MMMM dd, yyyy"}}
  • Example: {{ANNUAL_REVENUE \# Currency}}

For more information on formatting merge fields, see: Format Date Values and Format Number Values

Detail Data in Microsoft Word Templates

You can merge detailed data into a Word template. For example, for a Composer solution running on an Opportunity, you can merge Opportunity Product data into the template. The detail region of your template grows dynamically with rows of repeating data. For example:

Detail Region:

{{TableStart:OppLineItems}}{{PRODUCT_NAME}}

{{OPPORTUNITY_LINEITEM_SALESPRICE \# CURRENCY}}

{{OPPORTUNITY_LINEITEM_QUANTITY}}

{{OPPORTUNITY_LINEITEM_TOTALPRICE}{{TableStart:OppLineItems}}

The output, if there were three products on the Opportunity record, would look like this;

Basic Widget

$50

35

$1,750

Standard Widget

$100

15

$1,500

Advanced Widget

$250

10

$2,500

For more information about detailed regions, see: Using Detail Data in Word and Repeating Data in Word

Special Merge Fields for Microsoft Word

Special merge fields allow you to use advanced functionality in Word templates. Below is a list of some of the common special merge fields:

  • Adjust - Adjust a date into the future or past (useful in automatically creating due dates 30 days into the future).
  • Checkbox - Create a check box that is either selected or deselected based on the value of the merge field.
  • HTML - Retain HTML rich text formatting in the output document.
  • Hyperlink - Render a clickable hyperlink and format the text of the hyperlink.
  • Image - Merge images into Word templates.
  • Replace - Replace a character with a different character (replace a ; with a bullet).
  • TableHide - Hide a table if it does not contain data.
  • TableGroup - Group data in a table based on a value in the table (useful for grouping products by Product Family).
  • SUM(Above) - Calculate values in a table and merge the result as static text.
  • IF Statements - Conditionally show or hide data based on the result of a comparison.
  • Watermark - Merge a watermark into your Word document.