Where marketing emails aim to sell, transactional emails are there to help your customers. Help them with a request, help them with their progression, ease their minds. To do so, you sometimes need to send attachments with your emails. This article introduces you to a specific kind of attachment: The (dynamically generated) PDF file.
Why you should attach PDF attachments
Attachments come in all shapes and sizes: Office documents, HTML, calendar items, PDF files… there are about 550 different file types! Though email attachments have technical limitations, using them increases the value of your emails.
Transactional emails rely on the relationship between your recipients and your brand. These emails aim to help their recipients, and so should your attachments. They have some major advantages for your recipients. For instance, they can easily save, share, edit, and review files or import them into another system (mostly .csv).
PDF is the industry standard
The PDF format allows portability for the document, meaning it will look the same in mobile clients as in the native desktop view. Fonts, images, margins, et cetera. Besides, PDF files are supported by (pretty much) every device, allow interactivity within the document, and can be in designed in various shapes and sizes.
This makes PDF the de facto standard for exchanging files, whether between Google Drive and iCloud or between your systems and your recipient’s inbox. It is the only format that allows both the sending and receiving party to view the file in the exact same way—even in an inbox preview.
In some cases, it’s better not to attach a file to your email but to refer to it. For instance, when the file contains personal information, exceeds the file size limit or when the attachment is not in PDF format. In most cases, referring to the location of the file will suffice, like embedding a <hyperlink> in your email or refer to a file in the user’s login portal.
Times you shouldn’t send attachments
Unlike marketing emails, transactional email is the most viable way to send attachments. Sending PDF files with your marketing emails will harm your deliverability more than good. Sometimes, sending PDF files is not the best idea, even with transactional email.
PDF attachments are helpful when the email has an administrative task, but do not accompany emails that are only sent to notify the recipient or let him do one simple task (click a button to reset password) with PDF files. This will only confuse the recipient and is a waste of inbox space.
The difference between triggered and dynamic PDFs
When you’re adding attachments to your emails, there are two ways of doing so: either via a trigger or dynamical.
Triggered attachments
Triggered PDFs must already be generated and located somewhere your email platform can find them. Host your files on your website or Google Drive, or upload them to your platform. This way, the email platform can retrieve the PDF and send it alongside the email in a webmail, SMTP, or API process.
Dynamic attachments
SMTP providers, like ourselves, generate transactional emails when needed. Dynamically generated PDFs work the same way: PDF templates filled with the same variables as your transactional emails allow you to retrieve more data from your source systems and create PDF attachments in your style.
When should I use trigger-based or dynamic attachments?
Trigger-based attachments are the easiest solution for email delivery. You generate them once and send them alongside your email in the SMTP process. Yet sometimes, trigger-based PDF attachments can be ugly and impersonal.
Dynamic attachments are great when data needs merging, or an attachment needs to be hyper-personalized. For example, invoices, entrance tickets, and periodical reports are great. However, dynamic PDF attachments can be hard to develop due to some technical details in XHTML. So, having all your PDF attachments generated dynamically won’t pay off.
Ask yourself the following questions when considering the type of attachment to send:
- Is my attachment supposed to be interactive or engaging?
- Do I need data from multiple source systems to create the PDF?
- Do I need to be able to change the way my PDFs look, add logo’s, variables and/or content?
If the answers to two or three questions are ‘yes’, you consider dynamically generating PDFs. You can use both trigger-based and dynamic attachments in the same email if you wish to do so.
Creating dynamic attachments (with Spotler SendPro)
You can create trigger-based PDFs or let your CMS or invoicing system do so. Dynamic attachments, however, require a specialized platform. To create dynamic PDFs, you need first to collect the data you need. Use that data to personalize your content in an XHTML template converted to PDF.
Every business nowadays uses various systems to gain information about its customers—what they like, what they do, and what they buy. The information customers leave with you can be used to personalize your communications.
Use data to personalise content
Once you have collected the needed data, you can personalize your content. Our previous examples already showed you what personalization can do, but there’s more. Variables allow your PDFs to be unique to every recipient. Did your customer order a new pair of jeans paid by invoice? Add a link or QR code to your attachment for later payment.
Creating XHTML
Dynamic PDF files are not retrieved from a source system or an external URL, but generated in Spotler SendPro. XHTML gives you all the power that ‘normal’ SendPro templates also have: you can start working with variables and macros. This allows you to get much more out of your PDF attachment.
Unfortunately, XHTML to PDF has more technical limitations than normal email. So you need to be a bit more careful in your code. Some things don’t work or are different. Although there is no exact list, you can assume that fonts, lines, and exact placement will also not work. Moreover, we always recommend working in cm instead of px.
PDF generation in Spotler SendPro
To get started with dynamic PDF attachments, you need to arrange a few things in your SendPro account. Source systems from which you want to retrieve the data, for example, need to be linked to SendPro or accessible to retrieve data. When you create a template (Template > Type XHTML to PDF) you can retrieve that data when an email is pushed through SendPro.
In the “Flow” of that email, you can then add the PDF template as Flowstep. This way, a dynamic PDF attachment will be added to the standard email. Of course, you can also change the original message in the same Flow without affecting the PDF attachment: