Skip to main content
Custom HTML Templates

Enable and customise HTML Email templates in Naverisk.

Updated over a week ago

Introduction

This guide is intended as a walk through on how to enable and customise HTML Email templates. In here you will find basic HTML customisation of the default templates. Resources can be found online on how to implement advanced HTML customisation. The Naverisk Support Team does not provide support for HTML coding.

1.0 Prerequisites

1.1 Onsite Customer Parameter Change

For our Onsite customers, this will require a Site Controller Parameter to be set to enable this functionality. Site Controller Parameters are located in the config file which is located at the default location of: C:\Program Files x86)\Naverisk\SiteController\NaveriskSiteController.exe.config

Please remember to take a backup of the file prior to making any changes. You will need to restart your Site Controller for the changes to take effect.

Using a text editor like Notepad, please locate the below key for EmailEncoding and change it to the below value: <add key="EmailEncoding" value="HTML"/>

For more information on this change, please refer to the Site Controller Parameters Guide in the Naverisk Help Center.

1.2 Set up a Dedicated POP Mailbox

To setup Email to Ticket Parsing a dedicated POP3 account will be needed. Create a dedicated POP mailbox to receive emails for back up or Antivirus as an example, have Naverisk check that POP mailbox and turn any emails in that mailbox to Naverisk Tickets. With the use of Email Rules, Naverisk can interpret these emails and automatically assign them a SLA Class, and SLA Status.

More information on setting up an inbound email account for email integration, please refer to the Email Integration Guide found in the Naverisk Help Center.

1.3 Ensure Naverisk can send Emails

  1. To ensure that Naverisk can send emails successfully, first make sure that there is an SMTP server setup for Naverisk to use. It is recommended to use a local SMTP server which permits mail relays from the IP address of the Site Controller. For step by step instructions on how to set this up please refer to the Site Controller Installation Guide, under the chapter labelled ‘Add SMTP Server’.

  2. After setting up the SMTP server, navigate to Settings > System Settings and enter the connection information for SMTP gateway address and credentials.

  3. Send a Test Email after to verify that Naverisk can successfully send emails.

2.0 Naverisk Email Alerts Customisation Basics

Things you need to know about customising your Templates.

  • Email Templates are located in the default location of C:\Program Files (x86)\Naverisk\SiteController\EmailTemplates

  • Below is the IncidentNew.template as an example for configuration:

  • The first line is used as the Subject of the email, the rest is shown on the Body of the email.

  • You can arrange the Template in an order and format of your choice, you can also remove/add lines to the Template to include/exclude information.

  • You can change the Template anytime without restarting any Naverisk Services.

  • Make sure to back-up the Customised Email Templates as it will be overwritten once an Upgrade is made.

3.0 Customising the Naverisk HTML Examples

Naverisk now comes with three different HTML templates which can be used as automatic responses to your customisers when they email in new issues via the email integration.

There is the default 'SupportEmailAcknowledge.template' that will be used by all customers who have not set up a personal auto-response:

Then we have SupportEmailAcknowledge1.template available:

And the SupportEmailAcknowledge2.template:

Those templates can be change or edited to fulfill your needs and were designed to be easily customisable.

Note: The Naverisk Support Team does not provide support for HTML coding

Onsite customers will have access to the template files themselves, where our Cloud based customers will need to reach out to support@naverisk.com and we can send you the template file, and upload your changed file to the Server on your behalf.

To change the template that is being sent automatically on an email being received, the “Response Email Template” field in Email Integration needs to be set to the name of the template. 

All of the template files are stored in the Installations EmailTemplate folder, by default this is “C:\Program Files (x86)\Naverisk\SiteController\EmailTemplates”. You can create your own templates from scratch, all you need is two files in this folder.

For example, a template named “MyTemplate”, you need MyTemplate.template (the text version) and MyTemplate.html.template (the HTML formatted version).

To change a Template, open one of these files in a text editor, for example open SupportAcknowledgeExample1.html.template. Although similar to regular HTML, there are a few differences. The two most important differences are that the first line of text is the subject of the email, and that any canned text or command between curly bracers ‘{ }’ will be replaced when sent out.

If you want to change this template so that the image is called NewImage.png the background is a vibrant red with green text.

  1. Find the image that you want to use, and copy it to the EmailTemplate folder and rename the copy NewImage.png

  2. Find the lines that say “background-color: ” and replace “rgb(192, 190, 178)” which is a rather drab beige colour with “rgb(255, 0, 0)” which is vibrant red.

The text stylings of these example templates are separated into Table, Strong, Address, and Legal these are the sections of text which can be different colours should you wish, but in this example, we’re going to change them all to green. 

  1. To do this find all the lines that say “color: “ and replace “#000000” which is black or “rgb(102, 102, 102)” which is grey, for “rgb(0, 255, 0)” which is neon green.

  2. To attach the image we copied in, find the line that says “{%Attach:./EmailExample1.png}” and replace it with “{%Attach:./NewImage.png}”

For advanced experimenters:

  • You may also want to change the colour of the middle section, and to do that find the line that says “background-colour: white;” (in the .Table td.Middle section) and change this as well, say to “rgb(200, 200, 200)” for a light grey.

  • File commands can be for images anywhere on the site controller, you could use “{%Attach:c:/Images/NewImage.png}” for instance (remember to use forward slashes, though)

  • You don’t have to embed File commands in tags, if you just want to send the image as a regular attachment. Remember that they’ll be replaced with their attachment ID so something like “” would be needed to hide that.

  • You can put CannedText anywhere, even in the CSS, so you could store a colour code in the notes field of a Device and use that to colour code text by adding “colour: {Device.Notes};”

All of the settings inside the <style> tag can be changed to affect how the email will look when delivered. You can change the font, size, margin and more of given pieces of text using standard CSS. The use of CSS is outside the scope of this document, but there is a wealth of information about CSS and HTML colour codes available on line.

Not Recommended: Changing the contents of an email template using a word processor such as MS-word, as they can damage the CannedText replacers, subject line and image commands.

3.1 Template Parameters Customisation

When building your templates, you can insert parameters in squiggly brackets {} and these values will be replaced with the live data from the system where possible. 

Please be aware that there are multiple ways that an email can be generated in the system and there is a multitude of replaceable parameters, such as a ‘new ticket auto response’, a ‘ticket automation rule email job’, or an internal ‘ticket notification alert email’. As such some of these parameters may only be available if the email is generated a certain way within the system.

 For example {SimpleIncident.IncidentID} might work on a new ticket auto response email, but might potentially be blank on a ticket automation rule email job, where the parameter {Incident.IncidentID} may be required instead.

Below is a list of some of the parameters available that you can use in your Templates. These can be used in the Subject Line of the Alert which will be used in the first line on the Template, or they can be used for the body of the Email Template.

For a more comprehensive list of the parameters available, please check the Naverisk Canned Text replacers. These can be accessed via the Naverisk Website under ‘Service Desk tab ▶ Documents ▶ Document Type: Canned Email Text ▶ Insert Variable.

By creating a new Canned Text document, you will have access to the 'Insert Variable' command

This will provide access to a more complete list of available replacement parameters:

3.2 Uploading Email Templates

Under Settings > Email Templates you now have the ability to upload text or html based content to send out on your alerting emails.

To upload an customised template file, please use the ‘Add’ feature on the right of the template you wish to change:

This will provide you with a familiar file selection box to select the template file:

And when successfully uploaded, you will see the Custom Template Name as populated with the file name:

5

Keep in mind that just like most of the Naverisk system, all settings are Client specific and can be set differently for different clients based on their varying requirements.

So, we will need to ‘Share’ this template with the sub-clients, if we want it to apply to their tickets too.

This can be accomplished by clicking the green Edit Icon:

And ticking the "Share Custom Template with Sub-Clients" option:

Additionally, you can also make changes to the template directly using this 'Edit' option, and by selection the 'Template' tab:

From this screen you can modify the Subject Line of the email alert that will be sent, and the email main body will be presented for you to reword and customise.

Once you are satisfied with the form, and have saved the changes, you will also have the ability to forcibly generate an email to test its appearance. 

This uses the ‘Send Test Email’ button found in the top right:

Simply select the email you wish to generate, the Client you wish to generate it against, and then email address you wish to send the test through to:

Please keep in mind though, that the Test email is not generated from a Ticket, so if you are using the parameters mentioned in section 3.1, then they will not be populated in this test ticket:

Did this answer your question?