If you send transactional messages and you want to include an attachment that pertains to the transaction (e.g., an invoice or a receipt), you can create "attachment templates."
Attachment templates host an attachment (PDF files only) that is automatically attached to the message when it's sent to recipients.
This article describes how to create an "attachment template" for a transactional message and how to manage your transactional-message attachment templates.
To learn how to create basic templates for transactional messages, see Transactional Messages - Templates.
PDF files
Attachment templates can accommodate PDF versions of transaction documents only. The system populates the PDF file with recipient data from either:
- a recipient data file or
- a SQL View that contains the data.
Refer to Data files and SQL Views, below, to learn about these data sources.
Create an attachment template
- Access the Admin interface.
- Navigate to Messages > Transactional > Attachment Template.
- Click Create Attachment Template.
- At the top of the design page, specify:
-
- a unique name that identifies this template (e.g., include the template's purpose) and
- the folder that will house the template.
NOTE: Transactional templates are stored within the Transactional module, which has its own folder structure.
- In the Template section, add your message text to create your template.
-
- Use the text-editor field to add your content, and then customize your content (e.g., format the text size, color, and font; add links, bullets, images, and personalizations) with the options in the toolbar.
- If you insert Personalizations, refer to Personalizations in the template, below.
- In the PDF Properties section, accept the default properties that will be applied to your PDF file (recommended) or
-
- customize those properties and/or
- optionally, provide any of the unspecified properties in the lower portion.
- Click Create to finish and save your template.
NOTE: The system automatically creates a PDF that merges all of the "properties" data that are specified in this section.
Personalizations in the template
You can personalize the attachment template so that it is tailored to each recipient.
Personalization in the message text
You can add personalizations to the text of the template.
- Please your cursor where you want the personalization to display.
- Click the Personalization icon in the toolbar.
- Click the Personalization Type dropdown and select Transactional Mailings to populate the selection field with a list of codes.
NOTE: All Transactional Mailings code placeholders can be easily identified by the %%TM|| (%%INVOICE|| for older templates); only these codes will be replaced with transactional data. Do not use other types of personalization codes in these templates.
- Select a code and click Insert.
- Repeat these steps to add more personalizations.
- Review the contents of the text-editor field to verify that your text is as you want it.
Personalize the name of the attachment
You can personalize the file name of the PDF attachment so that it is unique for each recipient.
For example, to include the first name and last name of each recipient in the attached file that each receives, you could append the following code to the file name, as shown:
for %%TM||first_name%% %%TM||last_name%%
Be sure to:
- add any necessary spacing (e.g., between the first name and last name placeholders)
- place the personalization code before the .pdf file extension.
Using this example, each recipient will receive a message with an attached PDF file that has a unique name.
Data files and SQL Views
The PDF file that is attached when the transactional message is sent is populated with data that is retrieved from either a recipient data file or a SQL view, which are described below.
- Recipient Data File - The data file that is uploaded when the transactional message is created. This file must contain all of the data that is required by the template. For example, if an invoice requires seven pieces of data (first name, last name, organization, amount due, due date, quantity of order, and date of order), all seven of these, for each recipient, must be in the data file that was uploaded.
- SQL View - You can use a SQL View from an integrated iMIS database to populate a PDF file attachment. The iMIS database must contain the required data, which must be added to the SQL View in order for the data to populate the PDF file.
Learn about formats and importing rules for Recipient Data Files and SQL Views in iMIS Transactional Mailings Formats.
To learn how to create the appropriate SQL Views, see iMIS SQL Views.
SQL View notes
Only iMIS SQL Views can be set as recurring transactional messages.
- If a recurring message is sent immediately (Send Now), the "recurring" setting is overridden and the message is no longer sent on a recurring schedule.
- If a recurring message is set to On Hold, no additional messages are sent.
Manage your attachment templates
Your transactional-message attachment templates are stored in a central location and can be managed there.
To access and manage these templates:
- Access the Admin interface.
- Navigate to Messages > Transactional > Attachment Template.
On this page, you can:
- Hover on a template's icon to Modify, Copy, and Delete the template.
- Click a folder name to display its templates.
- Create a folder in which to store templates.
- Check the box to include your deleted templates (which you can "undelete") in the template list.
- Click to create a new template.
- Search for templates by name.