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

Marshall Day
Mega Expert

Laurie, 

I am coming in this a little late but are you simple looking to 'brand' your outgoing emails with a company logo of some sort? If this is the case, I feel that using the email template in the notification would be a much easier and repeatable use of the need you state.

Begin by creating an Email layout that contains your logo or image. Use an existing one to make changes to and save it with an appropriate naming scheme for the notification (change, incident, etc.).

Then create an Email template with a name corresponding to the table or notification and the appropriate table, and select the Email layout you just created. No need to put any other information in this record, just save it.

Go to your notification, to the 'What it will contain' tab, select the search icon in the Email template field, select the template you just created, and save the notification.

Once it has reloaded, Preview the notification to see how the logo/image is applied to the notification at the top of the email. 

Complete the message HTML with whatever your clients want to see and you will have an excellent looking email.

This allows the same image layout to be selected across all email tables that you are using, simply by adding a template for each table/notification created. 

Hope this helps,

Marshall

Hi Marshall,

That is certainly another method for adding logos to emails!  Thank you for your response.

In our case, we did not want to have to update each email throughout the system, so for us adding the Business Rule was the easiest way, however, all the emails have the same banner/logo.  For other customers that want a different logo for incidents, changes, etc., your solution would be the best way to do it.

Take care,

Laurie