Configuring Mail Merge For Any Record Type

Overview

You can now use mail merge functionality to generate PDFs using Axiom. This article details the process of configuring the letter templates and establishing letter category permissions, which you will later use in the mail merge process.  To read about running a mail merge and batch printing them, please refer to this article.

Record Information

There are three main types of mail merge records you'll be interacting with throughout the configuration process: the letter category, the letter category permission, and the letter template. Information about each of these records is detailed below.

Mail Merge Letter Category

The mail merge letter category is where permissions are configured for access to all templates and letters. It also helps organize templates into groups that make contextual sense.

Example of a Letter Category record.


General tab

  • allows you to add/remove letter category permissions on a per-person basis using the detail query. Options are either View Templates & Letters or View + Edit Templates & Letters. Each of these settings have very specific permissions, detailed in the table below.
What can each security setting do?
Security Setting Options:View Templates & LettersView + Edit Templates & Letters
View Mail Merge Letter Categories?YesYes
Create/Edit/Delete Mail Merge Letter Category records?NoNo
Adjust security on Mail Merge Letter Categories?SysAdmin_1 onlySysAdmin_1 only
View Mail Merge Letter Templates?YesYes
Create/Edit/Delete Mail Merge Templates?SysAdmin_1 onlyYes
View related Mail Merge Headers & Letter Content?YesYes
Create Mail Merge Headers by running the "Run Mail Merge" procedure?YesYes
Edit Mail Merge Headers?SysAdmin_1 onlyYes
Delete Mail Merge Headers?SysAdmin_1 onlyYes

Note: Unless you are a SysAdmin_1 or 2, you can only see categories that you have access to through letter category permissions.

Related Letters tab

  • shows all mail merge letter templates within this category. Click on the description or the pop-out button to navigate to the Mail Merge Letter Template record.

Mail Merge Letter Template

The mail merge letter template is the template that defines the settings for your actual mail merge letters.

An example of a Letter Template record.


General tab

  • Category displays which mail merge letter category this letter template falls under. Navigate to the category record using the pop-out button.
  • Description sets the name of the letter template.
  • Obsolete toggles whether or not this template appears in the stock Letter Templates query and also determines whether or not this template is a selectable option when running a mail merge.
  • Sort Key determines the order the template appears when looking at the Related Letters tab on the category record.

Mail Merge tab

  • Template Content lets you choose a font family and font size and then add your letter content to the "Merge Template" field. 
    • Use merge fields that will appear in the query you will use to launch the merge from. See below for more information on adding merge fields.
    • To add multiple line breaks, hit Shift+Enter on your keyboard.
    • If you prefer to edit the HTML directly, click the "Code" button.
  • Add Merge Fields to the Template using the syntax:
    • {query:Field Name}
    • Use the field name that you find in the query design, including spaces. If you rename a field, use the field name you specify.
  • Header and Footer lets you upload a header and footer image file if you'd like.
    • See below for directions on uploading and associating files.
    • Specify top and bottom margins. It is measured from the top or bottom of the image (respectively) to the edge of the page.
  • Page Setup allows you to set the page size and orientation (both required values) as well as margin width around the content of the letter.

Files tab

  • this tab houses the file uploader, which allows you to attach files to this letter template. You can also access and download existing uploaded files via the detail query. The uploading process is separate from selecting the specific images to use as the header or footer. To upload images:
    1. On the Mail Merge or Files tab, click Open File Uploader... 
    2. Select the file or drag and drop it (100 MB size limit).
    3. Rename the file (optional), select "Letter" from the drop-down, and specify a note (optional).
    4. Click Upload & Save.
    5. When the status says "Complete," close the page. (You can also upload additional files, e.g., you could upload a header and footer image in the same window).
  • When you have closed the file upload page, select the appropriate images for the header and footer:

    1. Click the magnifying glass.
    2. Select the file that you already uploaded and click Select Header/Footer Image File.

Recent Mail Merges tab

  • this tab shows all mail merge processes run for this letter template within the past two weeks and whether each individual header is locked. Each line in the detail query signifies a seperate Mail Merge header record that can be accessed by clicking on the Description.

The Process

Below are the steps required for configuring permissions and setting up your letter templates. To learn about running a mail merge and batch printing the results, please read documentation here.

1. Setup and Review Mail Merge Letter Category Permissions

This series of steps allows you to configure and review which people have what kind of access to template letter categories. All mail merge letter templates must be assigned a category, so these steps determine access for specific templates.

A sample Letter Category record. Access this using a standard Mail Merge Letter Categories query.

  1. Navigate to the System homepage and click on the Mail Merge Letter Categories link in the Mail Merge section in the System column.
  2. Click the Description of the relevent mail merge letter category.
  3. Decide which people should have access to letter templates contained within this category. Once this is determined, click Add Record...
  4. Search for the person using the magnifying glass in the Person column. Once this field is populated, determine this person's Permission level. The available options are View Templates & Letters or View + Edit Templates & Letters.
  5. Click Update.
  6. Review the permissions and make sure that everyone who needs access to this category has the appropriate access.

2. Create a New Mail Merge Letter Template

This series of steps guides you through the process of creating and configuring your mail merge letter template — a template where your actual mail merge letter lives and is set up.

Example of the Mail Merge tab on a Letter Template record.


  1. Navigate to the System homepage and click on the Mail Merge Letter Templates query in the Mail Merge section of the System column."Add Record" location
  2. Click into the Organize (+) menu and click Add Record...
  3. Select a Category (mail merge letter category) using the magnifying glass and set a name for the template in the Description field.
  4. Click Add Letter Template.
  5. Set up the mail merge letter template to your liking and make sure all required fields are populated. See more about your options in the section above.
  6. Click Update.