Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Sometimes you want different templates on the email client depending on what data there is on the fields.

So in this example I'm going for the following requirements:

  • Should be used on incident records only
  • One specific template when its a unresolved priority 1 incident
  • Another template if the Priority 1 incident is in resolve state
  • And another template if it isn't a priority 1 incident

So we are looking at having 3 different looks when I click on the email button and all based on what data there is on the fields.

These templates want to have different bodies depending on the values of them. Now, I won't make any huge detailed template, but I think you will understand the basic and can make it more complicated with your own ideas.

1. Create a Notification Mail Script:

Here we create the script and pretty much what information there should be in the body. Then we will call this script from the template.

I have filled in the script to make something different depending on the requirements of above.

mail template 1.PNG

2. Create a Email Client Template:

Now its time to create the template and get the mail script we just created. Here it isn't so complex code. We just call for the script in the body like this:

mail template 2.PNG

Not so hard, but sometimes it the small things that will make the life easier for the users.

//Göran

7 Comments