Edit email templates
Tungsten AP Essentials uses email templates when sending automatic notifications. You can customize the contents of the notification emails.
Edit email templates in Admin Center
Edit an email template in Admin Center as follows:
-
Navigate to the Email
templates view.
Different templates appear, depending on your current account level (subsidiary, partner, or customer). Templates without "template" in the name are used when a notification is triggered at the current account level. Templates that contain "template" in the name are the templates that are copied to the corresponding subaccount when you create a new subaccount.
As a security precaution to help protect account-related communications and ensure the integrity of important notifications, you cannot customize the following account-management email templates:
- Account activated
- Account deactivated
- Account reactivated
- Add new user
- Forgot password
- Reset password
- Select the template that you want to edit and select Edit.
-
Edit the Subject and Body of the email as needed. Note the
variables that are available for use in the email body and subject.
Different variables are available depending on the template you select.
Variables relating to passwords cannot be used in the email subject.
Optionally, you can select Enable HTML to use HTML-formatted text in the body.
-
Select Save & close after
you finish making changes.
When saving templates for subaccounts, you are prompted to choose whether you want to:
-
Save changes to this template only – Existing templates are not changed; however, new subaccounts created after this point will use the updated template.
-
Save changes to this template and all existing [Template name] templates for all partners/customers – Existing templates of immediate subaccounts are updated with the new template. For example, suppose you edit the "Batch received template" on a subsidiary account. In this case, the template is updated for all partners of the current subsidiary. However, only partner templates are affected; the changes do not propagate recursively to the customer accounts.
-
HTML templates
You can use these templates as a basis for editing your own templates:
* See "Special templates" later in this topic.
Special templates
Most templates use variables in a straightforward manner when generating email notifications. In most cases, each variable represents one piece of information. For example, the "Workflow: Document assigned" template has a variable, %InvoiceNumber%, which represents the invoice number of the document specified by the email notification. However, some templates, such as the "Workflow summary" templates, can contain information from multiple documents. The context of %InvoiceNumber% is determined by a loop, described later in this topic, because document-related variables in these templates can represent more than one document.
To properly display the information from each document and provide context to the template variables, these templates use loops. A loop is a programming concept that can execute a block of code a number of times without writing it repeatedly. For email notifications, the system outputs variable values in their proper context by using a loop to provide context and iterate through each document specified by the notification. Be careful not to break the loop structure when editing these templates:
-
Max duration in step reached
-
Workflow summary: Documents assigned
-
Workflow summary: Documents rejected
-
Workflow summary: Request information
In the special templates, these variables can only be used in a loop:
- %CustomerName%
- %TrackId%
- %SupplierName%
- %DueDate%
- %GrossAmount%
- %Currency%
- %InvoiceNumber%
Example
Tungsten AP Essentials uses a special variable (%foreachDocument%) to designate a loop. Consider the following example from an email notification template:
<table>
<thead>
<tr>
<th>Organization</th>
<th>Track ID</th>
<th>Supplier name</th>
<th>Due date</th>
<th>Amount</th>
<th>Invoice number</th>
</tr>
</thead>
<tbody>
<tr %foreachDocument%>
<td>%CustomerName%</td>
<td>%TrackId%</td>
<td>%SupplierName%</td>
<td>%DueDate%</td>
<td>%GrossAmount% %Currency%</td>
<td>%InvoiceNumber%</td>
</tr>
</tbody>
</table>
The HTML code above displays a table. The first row contains column labels. The second row displays the values from each document specified by the notification. The %foreachDocument% variable on the TR element indicates the boundary of the loop, so a new row is added for each document specified by the notification, and the context of the variables changes to another document with each iteration through the loop. New rows are added until there are no more documents referenced by the notification.
%DocumentId% and %TrackId% variables in email templates
The %DocumentId% and %TrackId% variables are used to reference documents in email templates. Due to earlier implementation differences, these variables are not used consistently in all email templates:
- In some templates, %DocumentId% returns the track ID instead of the document ID.
- In other templates, %TrackId% is not available, even though track ID is used internally.
This behavior will be corrected in an upcoming update. To ensure consistent usage across all document-related email templates:
- %DocumentId% will return the document ID.
- %TrackId% will return the track ID.
The following table shows the current behavior of the variables in all email templates.
|
Email template |
%DocumentId% behavior |
%TrackId% behavior |
| Assigned correction workflow | Works as expected. | Works as expected. |
| Information received | Works as expected. | Works as expected. |
| Max duration in step reached | Incorrectly returns the track ID. | Not supported. |
| New supplier request | Incorrectly returns the track ID. | Not supported. |
| Post failed | Incorrectly returns the track ID. | Not supported. |
| Registration failed | Incorrectly returns the track ID. | Not supported. |
| Validation failed | Incorrectly returns the track ID. | Not supported. |
| Workflow summary: Documents assigned | Works as expected. | Works as expected. |
| Workflow summary: Documents rejected | Works as expected. | Works as expected. |
| Workflow summary: Request information | Works as expected. | Works as expected. |
| Workflow: Document assigned | Works as expected. | Works as expected. |
| Workflow: Document rejected | Works as expected. | Works as expected. |
| Workflow: Request information | Works as expected. | Works as expected. |
Impact on existing templates
No action is required.
All existing email templates will be updated automatically as part of the change. Any incorrect usage of %DocumentId% will be corrected so that templates continue to work as expected. You can continue using existing variables as they are. If you are creating new templates, be aware that the behavior will be standardized in a future release.