jonnyseymour
ServiceNow Employee
ServiceNow Employee

ServiceNow Notifications allow you effectively and efficiently implement email notifications. We use email notifications to send selected users email about specific activities in the system, such as updates to incidents or change requests. I will show the results of my testing with the 'Sys version' and the 'content type' options. Both configurations change the message sent behavior.

the-lifecycle-of-a-new-feature1.png

Email Notifications 'Sys version' and 'Content type' fields

Here is how it looks on the email notification table:

2015-09-14_1014.png

After performing some test by setting and changing the Sys Version, content type, Message, 'Message HTML' and 'Message Text' and reviewing the Email notification sent, find my results below:

With Sys Version V2 set, the followings are the results:

Notification

N1

N2

N3

N 3

Content Type

HTML+PLAIN

HTML+PLAIN

HTML+PLAIN

HTML+PLAIN

Sys Version

V2

V2

V2

V2

Message (M)

-no effect-

-no effect-

-no effect-

-no effect-

Message HTML (MH)

MH

MH

-blank-

-blank-

Message Text (MT)

MT

-blank-

MT

-blank-

EMAIL RESULT

Body

MH

MH

MT*escaped

watermark

Body Text

MT

MH*stripped

MT

watermark

Context Type

multipart

multipart

multipart

multipart

…

Notification

N5

N6

N7

N8

Content Type

HTML only

HTML only

HTML only

HTML only

Sys Version

V2

V2

V2

V2

Message (M)

-no effect-

-no effect-

-no effect-

-no effect-

Message HTML (MH)

MH

MH

-blank-

-blank-

Message Text (MT)

MT

-blank-

MT

-blank-

EMAIL RESULT

Body

MH

MH

MT*escaped

watermark

Body Text

-blank-

-blank-

-blank-

watermark

Context Type

text/html

text/html

text/html

text/html

…

Notification

N9

N10

N11

N12

Content Type

Plain Only

Plain Only

Plain Only

Plain Only

Sys Version

V2

V2

V2

V2

Message (M)

-no effect-

-no effect-

-no effect-

-no effect-

Message HTML (MH)

MH

MH

-blank-

-blank-

Message Text (MT)

MT

-blank-

MT

-blank-

EMAIL RESULT

Body

-blank-

-blank-

-blank-

watermark

Body Text

MT

MH*stripped

MT

watermark

Context Type

text/plain

text/plain

text/plain

text/plain

Sys Version V2 do not uses the Message field. Instead it uses Message HTML or Message Text fields based on the Content Type selected

With Sys Version V1 and -none- set, the followings are the results:

Notification

N13

N14

N15

N16

N17

N18

Content Type

HTML+PLAIN

HTML+PLAIN

HTML only

HTML only

Plain Only

Plain Only

Sys Version

None/V1

None/V1

None/V1

None/V1

None/V1

None/V1

Message (M)

M

-blank-

M

-blank-

M

-blank-

Message HTML (MH)

-no effect-

-no effect-

-no effect-

-no effect-

-no effect-

-no effect-

Message Text (MT)

-no effect-

-no effect-

-no effect-

-no effect-

-no effect-

-no effect-

EMAIL RESULT

Body

M

watermark

M

watermark

-blank-

watermark

Body Text

M*stripped

watermark

-blank-

watermark

M*stripped

watermark

Context Type

multipart

multipart

text/html

text/html

text/plain

text/plain

  • MH*striped means that the HTML tags are removed. String fields inside ARE NOT stripped. HTML fields get stripped as well.
  • MT*escaped means that any HTML inside are escaped to HTML (e.g > translated to >). HTML fields inside are NOT escaped.
  • M*stripped means that any HTML tag inside is removed*.

Sys Version V1 or -none- do not uses the Message HTML or Message Text fields. Instead it uses Message field.

As you can see, Sys Version controls whether Message or Message HTM/Text is used.

Here is how it looks messages with Sys Version = V1 and Content type = HTML+Plain:

2015-09-14_1011.png

Sys Version, Content type, Message, and Message HTML on Email Notifications

Here are a few fields on the Email Notification form (sysevent_email_action):

Email Notifications

'Sys version' (sys_version):

It indicates which notification version is used. On Fuji, sys_version can be none,"V1" or "V2". V2 is the default

'Content type' (content_type):

It contains the type of email notification to be sent. It can be HTML and plain text, HTML only or Plain text only.

'Message' (message):

It contains a max 4000-char string* (it can contain mail script) that will be part

of the output notification. When sys_version = "V2", this field is ignored.

'Message HTML' (message_html) and 'Message Text' (message_text):

It contains a max 4000-char string*

(it can contain mail script) that will be part of the output notification. When sys_version = "V1" or -none-,

these fields are ignored.

Content type, Body and Body text field on the email table

Here are a few fields on the outbound Email (sys_email):

Outbound emails

Content type (content_type):

It is a string that identifies the content type of the email.

Body (body):

It is a 8000 string that contains HTML compatible text that will be part of the outbound email. HTML email needs to be properly coded. HTML lets you include your logo or brand colors to provide a professional look and make your emails quickly recognizable. Used for "multipart/mixed" or "text/html" mail

Body text (body_text):

It is a 8000 string plain text. It is exactly a text-only format. Any device and email service provider displays plain text well.

Used on "multipart/mixed" or "text/plain" mail

Conclusion

Email notification option Sys Version empty or V1 makes notifications to use Message, whether Sys Version V2 makes notification to use Message HTM or Message Text according to the content type set.

More information can be found here:

NOTE: Tested in Fuji, using Chrome

4 Comments