Editing email templates

Tungsten AP Essentials uses email templates when sending automatic notifications. You can customize the contents of the notification emails to your liking.

Editing email templates in Admin Center

To edit an email template in Admin Center:

  1. Navigate to the Email templates view.

    Different templates are displayed, 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 sub account when you create a new sub account.

  2. Click a template that you want to edit from the list and click EDIT.
  3. Edit the Subject and Body of the email as you see fit. 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.

  4. Click SAVE & CLOSE after you are done making changes.

    When saving templates for sub accounts, you are prompted to choose whether you want to:

    • Save changes to this template only - Existing templates are not changed; however, new sub-accounts 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 sub accounts are updated with the new template. For example, suppose you edit the template named "Batch received template" on a subsidiary account. In this case, the template is updated for all partners of the current subsidiary. Note, however, that only partner templates are affected; the changes do not propagate recursively to the customer accounts.

HTML templates

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—for example, the Workflow summary templates—can contain information from multiple documents. Subsequently, you may wonder how the context of %InvoiceNumber% is determined in a template which refers to multiple documents. Because document-related variables in these templates can represent more than one document, special consideration must be taken when editing these templates.

To properly display the information from each document and provide context to the template variables, we 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, we output 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. This means that 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.