Sebastian L
Mega Sage

Enhancing User Experience with Branded Outlook Actionable Messages in ServiceNow

Outlook actionable messages in ServiceNow is an opportunity to create interactive and modern notifications,. These notifications stand out with their modern appearance, eliminating the need for recipients to follow external links or respond through emails. Especially in the context of surveys, this approach can significantly elevate response rates.

 

However, while the out-of-the-box notifications serve their primary function, they can often appear generic, potentially leading recipients to perceive them as spam or unrelated content. A touch of branding can make all the difference, creating a sense of familiarity and trust with the recipients. 

 

Here is how it looks unbranded out of the box: 

OAM approve before.PNGOAM details before.PNG

Configuring Branded Actionable Messages

For those new to the process, here's a step-by-step guide to branding your Outlook actionable messages in ServiceNow (of course after it is installed - follow link to how to install). After you have installed it, you need to put in the following in the notification you want to have OAM "${mail_script:include_approval_actionable}". In this case the notification is called "Request approval assigned" out of the box. You will quickly discover that it completely replaces the other email, and for some, that means you loose all your brand identity. To fix this, we will need to do the following:

  1. Navigate to Actionable Messages -> OAM Definitions in your application menu.
  2. From the available options, you can either modify an existing OAM, such as the "OAM RITM Approval," or create a new one. For the simplicity of this example, we will use the OAM RITM Approval. 
  3. By default you will have the option to change what kind of OAM containers, and thus fields, you want to appear in the email. However, this does not give us an option to do any branding, so we will focus on that in another article. For branding purposes, click on the "Advanced OAM" related link.
  4. Here, you'll encounter a script box displaying a JSON object. This object mirrors the current configuration of the chosen OAM.
  5. To embed branding, you'll need to add in another object to the payload array as such: 

 

 

 

 {
            "type": "Image",
            "url": "https://your_instance.service-now.com/my_image.png",
            "size": "Stretch",
            "horizontalAlignment": "Center"
        },

 

It should look something like this (and the array of course continues): 

 

payload = [
	 {
            "type": "Image",
            "url": "https://your_instance.service-now.com/my_image.png",
            "size": "Stretch",
            "horizontalAlignment": "Center"
        },
{
'type': 'Container',
'padding': {
'left': 'default',
'top': 'default'
},

 

Remember, the dimensions of any images, like logos, you add are subjective. However, an approximate height of 120px and a width of 470px usually yields a balanced appearance. You just need to upload your image to "System UI -> Images" and then write the name of the image.

 

The Branded Result

This is how the same email appears with a branded look, by just adding a few lines to the JSON object:

 

OAM approve after.PNGOAM details after.PNG

 

Conclusion

Beautiful ain't it, and so easy to do? With these modifications, your Outlook actionable messages will not only facilitate interaction but also reflect your organization's brand identity, ensuring greater user engagement. And if you're looking to further customize your OAM definitions, particularly for custom tables or other tables outside of Requests, keep an eye out for an upcoming article on advanced configurations.

Comments
Mike W_
Tera Contributor

This is awesome - bookmarked for later, I'm definitely going to try this soon.

Joseph2
Tera Contributor

Will this work for Survey's?

brajek
Tera Contributor

I am also wondering if this will work for surveys...

Sebastian L
Mega Sage

It is not the same steps 1:1, but it is the same approach with adding the branded json to the exisiting json object. I will create a guide on it after the summer holidays. 

zynsn
Tera Expert

@Sebastian LHi Sebastian, thank you for this article. I am trying to build an OAM approval by adding the JSON object as you shown on the post. I am getting an error message. I cannot modify that script include either to be accessible from other scopes. If I use the JSON object with the img on global tables, it works. Any suggestions?

 

Error MessageIllegal access to package_private script include ApprovalAdaptiveCardHelper: caller not in scope sn_ms_oam

markdart
Kilo Guru

@Sebastian L any chance you have a guide for doing the same with Surveys

Version history
Last update:
‎10-24-2023 02:55 AM
Updated by:
Contributors