- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2019 10:24 AM
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
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2019 09:37 AM
You can use a Before Insert/Update Business Rule to accomplish that:
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:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 12:04 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 01:51 PM
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