Mail Merge Templates
This section explains how to manage mail merge templates which can be used to dynamically insert item data into letters.
Overview
The Mail Merge Templates powers correspondence for mass mailings using Microsoft Word or HTML/PDF including the insertion of content from registers and items to address or personalise for sending to individuals.
Mail Merge templates can be used to generate warnings and notices among other types of correspondence, however they are not used for messaging (for example Email or Text).
HTML templates have the additional ability to include logic for producing smart templates that can adapt to multiple uses.
Some common uses for Mail Merge templates:
Letters, of all types including addressed envelopes
Compliance, such as to to send warnings, notices to comply. Fire Prevention Notices in Victoria are one example. Permit approve or decline letters are another.
Court or Prosecution matters, including Appeal letter templates
Insurance, for example a detailed case profile can be created from the information held in a Cases or Inspections
Forms generation, including pre-filled forms
Authorisation letters - for officers or organisations
Once added and configured, users will be able to generate mail merges in enabled registers (such as Inspections and Cases) by editing an item and using the Correspondence feature in the right hand area settings.
Access
To access the Mail Merge Templates register you will need to sign in with the System Admin & Data Entry role.
You can find the Mail Merge Templates register under System Administration > Mail Merge Templates.
Viewing Mail Merge Templates
Mail Merge Templates are listed in and searchable via the register Datagrid.

To view an existing Mail Merge Temple:
Navigate to the Mail Merge Templates register datagrid.
Locate the item you wish to view. The register includes additional filters for Workflow Status (Active/Inactive) and Region
Open the item using the ID
To return to the Datagrid use the Back button

Mail Merge Template Settings (Word and HTML/PDF)
General
Template Name is used to name the template. This will appear for end users wanting to generate correspondence so should be suitably descriptive of the template's function and usage.
Description can be used to further elaborate on the template's intended usage.

Compatible Registers is used to enable or disable the Correspondence section in specific Registers. Note that this list of registers must still be globally configured for your site in order for you to add or remove them. Add by searching the list and remove using the cross next to each.

Template Type is used to specify whether the template is a Microsoft Word document or HTML/PDF. Use Microsoft Word if your template is straightforward and should you need to make edits post merge. This is the default option. Use HTML/PDF if you are a power user to get control of your template, including the addition of smart logic using special programming snippets including Cascading Stylee Sheets (CSS) for layout and styling. If in doubt, Microsoft Word is the easiest option to both maintain and for end users and other administrators to understand.
Template File is where your template file is uploaded if you've selected Microsoft Word. You can upload using the Add File button or, remove using the red cross or download.
Workflow
Status is where you can activate or deactivate your templates. Inactive templates cannot be added to users but can be reactivated and re-added if needed.
Advanced
Generate one letter per asset contact is useful where an Asset has more than one contact. For example, a residence may have more than one owner at different addresses, this option will generate a mail merge for each so you can print individual letters and post them to individual owners. Tick this box to enable this option. It is off by default.
Process workflow rules when merging enables a status transition upon generating documents. Some registers support processing workflow rules when merging templates. For example, the Status of Fire Prevention Notices will usually go from Hazard Exists to Hazard Exists (Printed) when a notices are printed. This will enforce that rule. Tick this box to enable this option. It is off by default which means you would have to manually set the status on any items.

Token Reference
This is not a setting as such, but it has a useful list of tokens which get replaced by actual data from the corresponding field of the register item when the merge is generated. Each token is accompanied by a description of its potential use in your template.
You can copy and paste, or use the token code or use the icon to copy it to your clipboard. Put these in your Word file or HTML to automatically insert text from the item into the output file when it is processed.
For example, placing the text ${MERGE_DATE} into your template document will output the current date when you process the merge.

Mail Merge Template Settings (HTML/PDF)
HTML/PDF templates have additional configuration settings that support additional flexibility in addition to those mentioned in the above section.
Power users can create and modify advanced templates, or use code snippets.
Template Content is used to create or paste in HTML to compose the template. This field supports the insertion of tokens and Smarty semantics. Smarty is a web template engine written in PHP.
Template resources is used to determine where the template's resources are stored. If the template is solely configured in the Mail Merge Templates item then select 'No resources'.
Letterhead background is used to upload a blank PDF to serve as the background image to a template. The letterhead can have a header and footer including branding. Multi-page letterheads are possible, however it is recommended to upload a single page only. CSS borders and padding can be used to avoid overlapping merged text with the background.
Left Margin, Right Margin and Top Margin are used to specify the page margins. The typical default page margins are 20mm.
Address Top and Address Left are used to set margins for adjusting the address block so that it fits within the window of windowed envelopes.
Additional CSS supports the inclusion of style sheets in Cascading Style Sheet (CSS) format. You will need to include styles in the Template Content HTML in order to modify them using the CSS.
Show Page Header enables a page header displaying the date will appear at the top of each PDF page.
Show Page Footer enables a page header displaying the date will appear at the top of each PDF page.
Editing Mail Merge Templates
Mail Merge Templates can be edited from the datagrid.
Navigate to the Mail Merge Templates register
Locate the Mail Merge Template you wish to edit by using the Edit button
Make the necessary changes to the settings
Save
to save your changes
Adding Mail Merge Templates
To add a mail merge template:
Use the New Item button for New Mail Merge Template
Enter a Template Name and choose at least on Compatible Register
Select a Template Type (MS Word or HTML/PDF) and upload or insert the template
Configure any additional settings as needed
Use the Save button
Last updated