You can attach a transaction document (such as an invoice or receipt) as a PDF to a transactional mailing. The system generates the PDF attachment from one of two sources: the attachment template and either:
- the recipient data file or
- the SQL View that contains the information to be merged into the attachment template.
In this article, we'll look at how to create an attachment template.
Create an Attachment Template
- Navigate to Messages > Transactional > Attachment Template.
- Click Create Attachment Template.
- On the resulting page, enter the following information in the corresponding fields:
- Attachment Template Name - Enter a name to identify your transactional message.
- Folder - Click the menu to select a folder for your transactional template.
NOTE: Transactional templates are stored within the Transactional module; they are separate from your standard template folders. You can create folders for your transactional templates on the Messages > Transactional > Attachment Template page.
- Template - Use the HTML editor to create an attachment template.
- PDF Properties - The system automatically creates a PDF that merges all specified transactional data. This section lets you customize parameters of that PDF with elements such as File Name, Page Orientation, and Title.
NOTE: All codes with the %%TM code (or %%INVOICE for older templates) are replaced with transactional data (click the Personalization icon and select Transactional Mailings as the personalization type to find a list of these codes).
- Click Create at the bottom of the page to create your attachment template.
Personalize the attachment
You can use personalization data in the file name of the generated PDF. This let's you create something unique for each recipient.
For example, if you want to use the first name and last name personalization fields, create a file name similar to the following:
November 2020 Invoice for %%TM||first_name%% %%TM||last_name%%
Using this technique, each contact would see his or her name in the PDF file.