Working with Email Templates
For a variety of reasons, such as name changes or organizational changes, you'll be editing your email templates from time to time. In this article, you'll be introduced to how to do that.
Editing email templates
This paragraph concerns the first part of the email template, the lines in the General FastTab. These lines contain the information you'll see in the header of your email, such as From Email and Email Recipient, as well as data used in Business Central, such as Code, Report-ID, and Dimension Code.
To edit email templates
You edit email templates by following these steps:
- Choose the
icon, enter Email Templates, and then choose the related link.
- From the list, select a template to edit, and then select Edit on the action bar.
- In the General FastTab, edit the fields as necessary.
Tip
Explanatory notes on selected editable fields:
- Report-ID: Specifies the report number for this template. The report is used to create the PDF that's attached to the email.
- Template Variant Field No.: Specifies the field number that's used for different template variants. You can't use both this field and Dimension Code at the same time.
- Dimension Code: Specifies the dimension code you can use as a variant on the template line. An email template can be specified for each dimension. You can't use both this field and Template Variant Field No. at the same time.
- Merge Fields: Specifies the number of merge fields available for use.
- Email Recipients Field: Specifies the field number, which must contain a customer no., vendor no., or contact no., from which email recipients will be fetched. If you don't want to use the E-Mail Recipients table, enter 0 in this field.
- From Email: Specifies how to find the from (sender) email address. Choose between the four options in the drop-down menu.
Email recipient configuration
Any email must have at least one recipient. If no email recipient is specified, all Document Output email templates will use a recipient email address from the customer card. However, email templates offer a lot of different options that enables you to build a flexible email recipient setup based on a document group, template type or fixed email address.
Document group
Each email template that's used can be attached to a document group. This gives you the option to define an email address for, for example, the accounting intended for finance documents, a contract email, or shipment details to another document group. Once a document group is defined on an email template, this document group will be used if it's defined in the customer email recipients in the customer FactBox.
Email template fields
Here, you'll find a small overview along with a description of the email template fields that are relevant when you configure email recipients.
Email Recipient Field is used when you want to manually define from where the recipient email address for the specific email template type is fetched. If this field is configured, it overrides use of document group.
If no email address is configured on a customer card, you can specify from where an email address is fetched. You could set it up so that it will be fetched from the posted document in Bill-to Customer No. in a specific field for a contact email. This will only be used if nothing is configured on the customer card, or if Email Recipients Field is left empty.
Fixed Cc Recipient(s) and Fixed Bcc Recipient(s) can be used if you want to send a copy of all emails of a specific document type to a sales representative or similar internal employee in your own company when emails are sent out.
Test Recipient overrides all configured email recipients configured in an email template.
Email is mandatory is a toggle that, when enabled, checks if everything is in order for a configured email before a draft email is opened. When a draft email is opened, it will count as a sent document, regardless of whether it's been sent to the email server or not.
Editing email template lines
This paragraph concerns the second part of the email template, the Email Template Lines FastTab. Here you can edit the information you'll see in email itself, such as the email text, the signature, and the subject field.
To edit email template lines
You edit an email template by following these steps:
- Choose the
icon, enter Email Templates, and then choose the related link.
- From the list, select a template to edit, and then select Edit on the action bar.
- Go to the E-Mail Template Lines FastTab.
- If you want to edit the email text, select Email Template > Edit HTML Template.
- When you're done editing the HTML template, select Save Email Template in the action bar.
- Edit the fields and use the actions as necessary.
Tip
Explanatory notes on selected editable fields:
- Language Code: Specifies a localized version of the template for the selected language code.
Explanatory notes on selected actions:
- Background PDF > Set Background PDF: This action lets you pick a PDF that will be used as background for your template. Important: Engine must be set to NAV-PDF on either the template or on the Document Output Setup page. You can read more about this in the article Setting a Background PDF.
- Merge PDF > Set Merge PDF File: With this action, you can add pages from a PDF to the resulting PDF report.
Important
Always leave the Language Code and Template Variant Value Code empty in the first line. This empty line will be the default template that's used if documents don't fall into any of the variants defined in either the Language Code or Template Variant Value Code fields.
Creating new email templates
Continia Document Output comes with a number of ready-to-use email templates so you can get started sending documents right away.
Naturally, you also have the option to create your own email templates from scratch, though it's highly recommended to always use one of the existing templates as a starting point and then carry out the necessary corrections. This is because, normally, a lot of the information in a template, such as merge fields, recipient(s), etc., can be reused.
To create new email templates
Create a new email template by following these steps:
- Choose the
icon, enter Email Templates, and then choose the related link.
- On the action bar, select New.
- In the General FastTab, fill out the fields as necessary.
- In the Email Template Lines FastTab, fill out the fields and use the actions as necessary.
Merge fields
Merge fields are dynamic data fields from reports, and they can be used to insert customer-specific data, such as invoice numbers, customer names or addresses, or company logos, into email lines, signatures, or file names. When you use merge fields, you're ensuring that changes to your customer data are reflected in all relevant places as soon as modifications take place on customer cards.
On all email templates, you'll find an attached report selection that can be used for the general layout of the email content. From this report selection, the First Table field in Report will indicate where the available merge fields are fetched from. You can view a list of available merge fields in the template you're modifying by selecting the number next to the merge field caption. This will open a list of the merge fields that are available for use.
Support of email templates in multiple languages
Being able to send your documents in the specific languages of your customers can be a great way of distinguishing your company from competitors – and may even be required by some customers. When you run the assisted setup during installation of Document Output, it will automatically import email templates that match the language of your Business Central database, but Document Output also includes functionality to import predefined language variants of these email templates.
To import predefined email templates in a specific language, follow these steps:
- Choose the
icon, enter Email Templates, and then choose the related link.
- In the action bar, select Template > Download Template.
- In the list, select the language you want to import email templates for, and select OK.
- In the Action column, you can choose between three actions for each template: Create to create the language variant template, Replace to create the language variant template and make it the default template, and Skip to skip the creation of this email template variant. As default, all email template language variants are marked as Create.
- After you've made your selections, select OK to complete the import.
You find your email template language variants under each default email template as email template lines.
See also
Merging PDF Files
Signing PDF Files
Password Protecting PDF Files