The CreatorCon Call for Content is officially open! Get started here.

Customize preview of bell icon notification

VP7
Tera Contributor

How to hide short description field and add another field in the preview?

Screen Shot 2023-06-07 at 2.26.38 PM.png

4 REPLIES 4

Community Alums
Not applicable

Hi @VP7 ,

That's the Provider Notification, if you are in Tokyo then it's not configurable unfortunately.

In Utah You can,  While Creating the content for the Provider notification , select the Route to be " Next Experience Route" and whatever you want to display on heading and message, it would display while clicking on the Bell Icon.

SandeepDutta_0-1686197133087.png

Also, Create a provider notification 

 

Is there a way i can add the datetime field?

The requirement is to add the notification sent datetime.

 

integrant
Tera Contributor

This is ower a year old discussion but I have the same problem.
I can use variables found in ticket, like this:

# Message content
[${sys_created_on}]
${sys_updated_by}

integrant_0-1725022143667.png

But datetime takes too much space so I'd like to format it to only contain HH:mm

ServiceNow documentation is suggesting on using scriptable actions but I have no idea how to use them.
When I tried to use an action it doesn't seem to do anything.

# Notification action script
(function action(execution,action,notification,target) {
        notification.setMessage('Ticket ' + target.number + ' has been updated.\n\n' +
                                'Short Description: ' + target.short_description + '\n' +
                                'Updated By: ' + target.sys_updated_by);
})(execution, action, notification, target);

 

 

integrant_2-1725022629145.png


So it should be possible but the documentation is somehow lacking on good examples as always...

integrant
Tera Contributor

This is ower a year old discussion but I have the same problem.
I can use variables found in ticket, like this:

 

# Message content
[${sys_created_on}]
${sys_updated_by}

 

integrant_0-1725023088173.png

But datetime takes too much space so I'd like to format it to only contain HH:mm

ServiceNow documentation is suggesting on using scriptable actions but I have no idea how to use them.
When I tried to use an action it doesn't seem to do anything.

# Notification action script
(function action(execution,action,notification,target) {
        notification.setMessage('Ticket ' + target.number + ' has been updated.\n\n' +
                                'Short Description: ' + target.short_description + '\n' +
                                'Updated By: ' + target.sys_updated_by);
})(execution, action, notification, target);

integrant_2-1725023130688.png


So it should be possible but the documentation is somehow lacking on good examples as always...