logo

NJP

Notification Comments

Import · May 14, 2021 · article

Hi there!

Intro

I want to make a series of articles about making ServiceNow more beautiful!

Working on a client, and I've noticed they didn't really change the default "notifications" send by ServiceNow. Being a designer at heart I couldn't really resist by just changing it and show them what is possible if you put some love in it image

Quick note:
On this specific article I am not going to deep dive the whole "notification" system from Layout > Template > Notification and how it works, I will probably do that on another article.

Topic: Notification Comments

Let's see what ServiceNow gives you as a default:

image

Notification "Incident commented"

This will be shown when you are using the "${mail_script:incident_comments}" OR "${comments}"

Import one of the 2 examples (attached XML) within the "Notification Email Scripts" and add a line of text into your notification: "${mail_script:task.comments}"

Example 1

image

Example 2

image

Script Variables Explained found within the script

journalLimit = The amount of journals shown (uses the system default property: glide.email.journal.lines)

showTimeStamp = Wether you want to show a time stamp

showCommentsTitle = Wether you want to show the Comments text

//These are inline CSS styling

stylingInnerTable = Ability to style the InnerTable surrounding

stylingInnerTableTD = Ability to style TD of the Innertable or basically the "balloon" shown in Example 1

stylingOuterTable = Ability to style the OuterTable surrounding

stylingCommentHeader = Ability to style the "comments:"

stylingHeader = Ability to style the "balloon" header, this shows the name and timestamp

stylingDate = Ability to style the timestamp separately from the name

To change the actual font of comments I recommend doing this on a higher level. On both examples I've just changed the styling of the paragraph wrapped around the ${mail_script:task.comments}. For instance you will get in within the html code of your notification:

${mail\_script:task\_comments}

Here is a good reference for CSS that will work in Email clients: https://www.campaignmonitor.com/css/

Well I hope this a good start of making ServiceNow more beatifull!

Labels:

image

View original source

https://www.servicenow.com/community/now-platform-articles/beautify-servicenow-notification-comments/ta-p/2328332