Page tree
Skip to end of metadata
Go to start of metadata


This article will show you how to create a more complex document template using merge-fields.

Before reading this article, please make sure to read the relevant article for your operating system in this article

Creating your template document

  1. Open a new word document.
  2. Write your stock letter and take note of the fields you'd like to populate later using AgileCase.
  3. For this example, we've used brackets to highlight the fields we intend to populate.



Now that you have drafted your stock letter, it's time to add merge fields to your letter, so the system knows where to pull data from and which data to populate. 

Viewing merge-fields

AgileCase has made it easy for you to find the merge fields so you can easily add them to your template, to view them:

  1. In AgileCase, open a case that you intend to use this template with.
  2. Click on Edit to open the dropdown list.
  3. Click on View Merge Fields, to open the list of available merge fields.



This will open up a list of all the available merge fields that you can use in your template.


Adding fields to your document

Using the merge field syntax.

You can use the merge field syntax to add merge fields into your template. This gives you more control over the merge fields, in case of formatting, creating selectable contact template, using custom fields, etc. 

In order to use the syntax, you first need to create a mergefield as normal by pressing alt+F9 to enter mail merge mode then ctrl+F9 to open a field before typing MERGEFIELD. Next specify the area you want to select from for example "Case" or "Contact" followed by a full stop.

The default syntax for merge fields is { MERGEFIELD FieldName }, where FieldName is the name of the merge field you'd like to populate from the system. 

For example, { MERGEFIELD Client.Name } will show the name of the client. 

Now that you have the syntax, you can go ahead and manually edit your template to add the the mergefields.

In order to edit a mergefield, right click on the field, then select "Toggle Field Codes"



This will open up the field codes, you can then go ahead and manually edit them to add your field names.



After using this template with AgileCase, the merge fields will be populated with the relevant data assigned to each field. The output document should look like this:



You can download this template here: 7.3 More Complex Document Template.docx

As always, if you have any difficulties creating mergefields, do not hesitate to contact us on

  • No labels