How to add a custom banner to all outbound email notifications?

Laurie Marlowe1
Kilo Sage

Hello,

Is there a way to add a banner image to all outbound emails, without having to add it manually to each email notification?

Thanks,

Laurie

 

1 ACCEPTED SOLUTION

Jim Coyne
Kilo Patron

You can use a Before Insert/Update Business Rule to accomplish that:

find_real_file.png

 

The Script would be:

(function executeRule(current, previous) {
	//add a note to the top of the message with a customizable Message record
	var prefixMessage = gs.getMessage("u_notification_prefix").replace("u_notification_prefix", "");
	//update the current email message
	current.body = prefixMessage + current.getValue("body");

})(current, previous);

 

I actually use a Message record to control the contents of the prefix:

find_real_file.png

The Message field can contain whatever HTML you might need.  You can also just put it into the Business Rule if you would rather keep everything together.  I use the Message record because I have a prefix and suffix and a few other things in the Business Rule.  I just included a simplified version of the BR above.

So that BR will now include the prefix into every single email that goes out of your instance.

View solution in original post

11 REPLIES 11

Do you have any update on this?

If this solved your query would you mind closing this thread by marking the response as correct

Cheers

Prateek kumar


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Jim Coyne
Kilo Patron

You can use a Before Insert/Update Business Rule to accomplish that:

find_real_file.png

 

The Script would be:

(function executeRule(current, previous) {
	//add a note to the top of the message with a customizable Message record
	var prefixMessage = gs.getMessage("u_notification_prefix").replace("u_notification_prefix", "");
	//update the current email message
	current.body = prefixMessage + current.getValue("body");

})(current, previous);

 

I actually use a Message record to control the contents of the prefix:

find_real_file.png

The Message field can contain whatever HTML you might need.  You can also just put it into the Business Rule if you would rather keep everything together.  I use the Message record because I have a prefix and suffix and a few other things in the Business Rule.  I just included a simplified version of the BR above.

So that BR will now include the prefix into every single email that goes out of your instance.

And if you want to include an image, you can upload the file with the "System UI \ Images" Module:

find_real_file.png

...use the code displayed in the form in the BR or Message record:

<div style='font-family:Calibri,Arial,sans-serif;font-size:10.0pt;color:#EF2C4E'>
This message is from a test system - please disregard and do not reply.<br/>
<img src="u_doh.jpg" width="600" height="381"/>
</div><hr/><br/><br/>

...and your email will end up looking like this:

find_real_file.png

Hi Jim,

Hope you are well.

I have one similar situation. I would like to display the images that are attached in the incidents on the email body. Can you advise me on this please.

 

Regards,

Arun

Hi Jim,

Thank you for this information!  I'm going to give this a try!

Thanks,

Laurie