Push Notification (Redirect link)

simon_dejonghe
ServiceNow Employee
ServiceNow Employee

I am experimenting with push notifications and I would like to redirect a link when the user acknowledges a push notification.

Here is my scenario:
end user receives a push notification on his mobile phone that a certain Service is experiencing some outage.
he/she swipes the notification
i want a webbrowser opening redirection the user the the Service Portal - System Status page of that specific Service.

This is my existing Push Message Content:

(function buildJSON(/*GlideRecord*/ current, /*String*/ message, /*Object*/ attributes) {

  var json = {};

  json = {

  "aps" : {

  "sound" : "default"

  },

  "web_path" : "sp?id=service_status&service=" + current.getValue("cmdb_ci")

  };

  return json;

})(current, message, attributes);

So the web_path I have; but how to trigger the webbrowser opening instead of the mobile app?

Gr,

Simon

3 REPLIES 3

Ashley
Kilo Sage

Hello,



I am doing the same but want it to open up in the ServiceNow Mobile App, how has web_path been set up? Push Message Attribute Definitions?



Kind Regards



Ashley


Ashley
Kilo Sage

Not to worry, figured it out


habi
Kilo Contributor

Hi Ashley,

can you tell how you did open up in the ServiceNow Mobile App on push notification click.