Feature Overview
Email Templates are the foundation of Document Handling. They define the content of every email sent through the app — including the subject line, body text, signature, and which dynamic data fields to include from the underlying document. Templates are organised by department type (Sales, Purchase, Warehouse), document type (e.g. Sales Order, Sales Invoice), and mail type (New, Change, Accept, Reject, Cancel, Reminder, Overdue), so each document scenario can have its own tailored message.
A template consists of a header record (the Document Handling Text) and a rich body. The header controls the subject line, which document fields to include in the subject (order number, external order number, line number), the mail type category, the language, and signature settings. The body is either composed as free-form HTML using the Dynamic Email Fields feature, or as plain text built from text lines. Templates can be copied from one document type to another, saving setup time when documents share similar content.
Templates are linked to document types through Document Handling E-mail Templates (the sending profile). Each row in that list ties a department type and document type to a specific template, and additionally controls whether the email preview dialog is shown before sending, what Cc and Bcc addresses to use, and how attachments are handled. This separation means the same template can be reused across multiple document types, while sending behaviour is configured per document type.
Key Facts
| Topic | Detail |
|---|---|
| Where to create templates | Document Handling Text (accessed via Document Handling E-mail Templates → Template Card) |
| Where to assign templates to document types | Document Handling E-mail Templates |
| Supported department types | Sales, Purchase, Warehouse |
| Supported document types | Sales Quote, Sales Order, Sales Invoice, Sales Cr. Memo, Sales Blanket Order, Sales Shipment, Purchase Quote, Purchase Order, Purchase Invoice, Purchase Cr. Memo, Purchase Blanket Order, Reminder, Fin. Charge Memo, Customer Statement, Pro Forma Sales Invoice |
| Supported mail types | New, Change, Accept, Reject, Cancel, Reminder (1–3), Overdue (1–3) |
| Language support | One template per language code; default language set in Document Handling Setup |
| Dynamic fields feature | Optional — enable via App Feature Setup ("Dynamic Email Fields") |
Getting Started
- Open Document Handling Setup and set the Default Language to your primary language code (e.g. ENU).
- Run Default Setup in Document Handling Setup to generate the default template records, status values, and sending profile rows. This creates a starting set you can customise.
- Open Document Handling E-mail Templates to see all sending profile rows — one per department/document type combination.
- Select a row for the document type you want to configure (e.g. Sales Invoice) and open Template Card from the action bar.
- On the template card, set the Subject Text — type a static subject or enable Include Order Number to append the document number automatically.
- If the Dynamic Email Fields feature is enabled (App Feature Setup), type your email body content directly in the Email Body Content field using HTML and dynamic placeholders such as
{Document.No.}or{Customer.Name}. - If Dynamic Email Fields is not enabled, go to the Text Lines subpage and enter your body text as plain text lines. Lines with fewer than 50 characters or ending in
.or?are automatically followed by a line break. - Set up the signature fields (Include Name, Include Title, Include Phone, Include Mail) and optionally enable an HTML signature on the Signature tab.
- Return to Document Handling E-mail Templates and confirm the Document Template column points to your template. Set Don't show E-mail Preview Dialog if you want silent sending.
- Test by opening a Sales Invoice and using the Send action — the email dialog should appear pre-filled with your template content.
Related Features
Email Templates work closely with all other features in Document Handling. Email Signatures are configured directly on each template record and can use either plain text or HTML. Document Handling Users provides the salesperson or purchaser data that populates the {SignatureName}, {SignatureTitle}, {SignaturePhone}, and {SignatureEmail} placeholders at send time. Email Sending & Sending Profiles links templates to document types and controls silent sending, Cc/Bcc, and Post and Send behaviour. Attachments are enabled per sending profile row and control whether files from the source document or Master Data Information are appended to the email. Our Status & Vendor/Customer Status interacts with templates by driving which mail type (e.g. New, Change, Cancel) is selected when a purchase line action triggers a send.
User Stories
US-01: Create a sales invoice email template with a personalised subject line
As a Business Manager
I want to create a dedicated email template for Sales Invoices that includes the invoice number in the subject
So that recipients can immediately identify which invoice the email refers to
Setup:
- Open Document Handling E-mail Templates.
- Find or create the row for Department Type = Sales, Document Header Type = Sales Invoice.
- Click Template Card to open the template.
- In Subject Text, enter your base subject, e.g.
Invoice from Contoso. - Enable Include Order Number and optionally fill in Order Number Text (e.g.
No.) to prefix the document number. - Save the template.
Note: The document number is appended automatically at send time — you do not need to type a placeholder in the subject field.
US-02: Write a plain-text email body for a sales order confirmation
As a Business Manager
I want to write a standard body text for sales order confirmation emails
So that every order confirmation sent to a customer follows a consistent format
Setup:
- Open Document Handling E-mail Templates and locate the Sales Order row.
- Click Template Card.
- Navigate to the Text Lines subpage (visible when Dynamic Email Fields is not enabled).
- Add lines with your message text. Blank lines generate
<br>line breaks in the email. Lines under 50 characters or ending in.or?are automatically followed by a line break. - Save and send a test document to verify the output.
US-03: Write an HTML email body using Dynamic Email Fields
As a IT Manager
I want to enable the Dynamic Email Fields feature and write HTML email bodies with placeholders
So that outgoing emails automatically include document-specific data such as the customer name, order number, and line details
Setup:
- Open App Feature Setup and enable Dynamic Email Fields. Confirm the migration prompt — existing text lines are automatically converted.
- Open Document Handling E-mail Templates and click Template Card for the relevant document type.
- In the Email Body Content editor, write your HTML. Use placeholders such as:
{Document.No.}— document number{Customer.Name}— customer name{Document.Your Reference}— your reference field[Line:{Line.No.} {Line.Description}]— repeating line block
- Save and use the Send action on a document to preview the resolved output.
Note: Dynamic field names correspond to field captions in the source tables. If a field name is not recognised, the placeholder is left unchanged in the email.
US-04: Create separate templates for different mail type scenarios (New, Change, Cancel)
As a Business Manager
I want to set up different email templates for new orders, change requests, and cancellations
So that the tone and content of each email matches the business situation
Setup:
- In Document Handling Text (accessible from the template card lookup), create three separate template records for the same department type, each with a distinct Text Code (e.g.
PO-NEW,PO-CHANGE,PO-CANCEL). - Set the Mail Type on each record accordingly: New, Change, Cancel.
- Open the advanced Document Handling Text Setup page.
- For the Purchase Order row, assign each template to the corresponding default field: Default New Document, Default Change Document, Default Cancel Document.
US-05: Copy an existing template to a new document type
As a Business Manager
I want to copy a template from Sales Invoice to Sales Credit Memo without retyping everything
So that related document types share a common base and I only need to adjust the differences
Setup:
- Open Document Handling Text and find the template you want to copy from.
- Use the Copy From action to select the source template. The header fields and text lines are transferred.
- The Department Type, Text Code, Language Code, and Mail Type of the target record are preserved — only the content is overwritten.
- Edit the copied content as needed for the new document type.
US-06: Set up multilingual templates for international customers
As a Business Manager
I want to configure email templates in both English and Danish
So that customers receive emails in their own language when the document language matches
Setup:
- In Document Handling Text, create two template records with the same Text Code and Department Type but different Language Code values (e.g. ENU and DAN).
- Write the body content of each in the appropriate language.
- In Document Handling Setup, set the Default Language to the language code used when no document-level language is found.
- At send time, Document Handling matches the language code of the document to the available templates and selects the correct one.
US-07: Configure reminder templates for purchase order follow-up (Reminder 1, 2, 3)
As a Purchasing Agent
I want to configure three escalating reminder templates for unanswered purchase order requests
So that each follow-up email has an appropriately firmer tone
Setup:
- Create three template records with Mail Type = Reminder and Reminder No. set to 1, 2, and 3 respectively.
- Write escalating body text for each. Reminder No. cannot exceed 3.
- In Document Handling Text Setup, assign each template to the Default Handling Reminder 1, Default Handling Reminder 2, and Default Handling Reminder 3 fields on the Purchase Order row.
- Similarly, configure Overdue templates (Overdue 1–3) for payment-related escalations.
US-08: Include order line details in a purchase order email (quantity, item, dates)
As a Purchasing Agent
I want to include line-level data such as item number, quantity, and delivery date in outgoing purchase order emails
So that the vendor immediately knows what is being requested without having to open an attachment
Setup:
- Open the template card for the Purchase Order document type.
- Enable the relevant Include checkboxes: Include Item Number, Include Quantity, Include Our Ramp Date, Include Cust or Vendor Ramp Date, etc.
- For each enabled field, optionally enter a label in the corresponding Text field (e.g. "Qty:" next to Include Quantity) to prefix the value in the email.
- If using Dynamic Email Fields, use
[Line:{Line.Item No.} {Line.Quantity}]syntax to repeat line data in the HTML body.
US-09: Configure a customer statement email template
As a Accountant
I want to configure an email template specifically for Customer Statements
So that the email subject and body include the customer name and statement period
Setup:
- In Document Handling E-mail Templates, locate or create the row for Document Header Type = C.Statement.
- Open the Template Card.
- Enable Include Order Number to include the customer number in the subject. The subject is automatically extended with
{Customer.Name}and the statement period dates ({StartDate}...{EndDate}). - Write the body text or HTML content as appropriate.
US-10: Run the default setup to generate starter templates
As a IT Manager
I want to run the default setup wizard to generate a full set of starter templates, status values, and sending profiles
So that the app is ready to use without having to create every record from scratch
Setup:
- Open Document Handling Setup.
- Click the Default Setup action.
- If templates already exist, you are asked whether to delete them or allow modifications to duplicates. Choose No / Yes as appropriate for your situation.
- After the setup runs, open Document Handling E-mail Templates to review the generated sending profile rows, and open individual templates to customise the content.
Note: The default setup also creates the standard Our Status and Customer/Vendor Status values, and adds a Document Handling Users entry for the current user.
US-11: Include the customer's or vendor's external order number in the subject
As a Sales Order Processor
I want to include the customer's own order reference number in the email subject
So that the customer can immediately match the email to their internal order
Setup:
- Open the template card for the relevant document type.
- Enable Include Customer or Vendor Order No.
- Optionally enter a label in Cust or Vendor Order No Text (e.g. "Your ref:").
- The customer's external document number is appended to the subject at send time.
US-12: Configure a Pro Forma Sales Invoice email template
As a Sales Order Processor
I want to have a dedicated email template for Pro Forma Sales Invoices
So that the email clearly indicates the document is a pro forma and not a binding invoice
Setup:
- In Document Handling E-mail Templates, locate the row for Document Header Type = Pro Forma S. Invoice.
- Open the Template Card and write body content that references the pro forma nature of the document.
- Assign a suitable subject such as
Pro Forma Invoice. - Enable the Pro Forma invoice email scenario — the app subscribes to the BC
OnAfterFromReportSelectionUsageevent to route this document type to the correct email scenario.
Field Reference
| Field | Where to find it | What it does | Default |
|---|---|---|---|
| Text Code | Document Handling Text | Unique identifier for the template | — |
| Language Code | Document Handling Text | Language this template applies to | — |
| Mail Type | Document Handling Text | Scenario category: New, Change, Accept, Reject, Cancel, Reminder, Overdue | New |
| Department Type | Document Handling Text | Sales, Purchase, or Warehouse | — |
| Subject Text | Document Handling Text | Static portion of the email subject line | Blank |
| Include Order Number | Document Handling Text | Appends the document number to the subject | Off |
| Order Number Text | Document Handling Text | Label prefix before the document number in the subject | Blank |
| Include Customer or Vendor Order No | Document Handling Text | Appends the external order number to the subject | Off |
| Include Order Line Number | Document Handling Text | Appends the line number to the subject | Off |
| Reminder No. | Document Handling Text | Which reminder step (1, 2, or 3) this template is for | Blank |
| Email Body Content | Document Handling Text | HTML/text body (used when Dynamic Email Fields is enabled) | Blank |
| Enable Html Signature | Document Handling Text | Activates the HTML signature for this template | Off |
| Document Template | Document Handling E-mail Templates | The template assigned to this document type / sending profile row | — |
| Don't show E-mail Preview Dialog | Document Handling E-mail Templates | Sends the email without showing the preview dialog | Off |
| Cc e-mail | Document Handling E-mail Templates | Fixed Cc address for this document type | Blank |
| Bcc e-mail | Document Handling E-mail Templates | Fixed Bcc address for this document type | Blank |