How do I configure a URL in a Notification from ServiceNow so that it opens the target record (a ServiceNow ITSM record) in the Agent app?

apjohn2
Mega Sage

We use email notifications regularly to deliver information to customers and fulfillers alike.

These notifications almost invariably have a link to the contextual record in ServiceNow.

For example, "New comment or work note added to INCxxxxxxx - Blah blah blah" would go to the Assigment group members (if there is no assignee) or the Assigned to person (if there is one).

That email contains a link to open the Incident.

If I am on a mobile device reading that email in my mobile email app (Outlook, typically, at my company), and I tap that hyperlink to open the record in question, I need that target record to automatically open in the Agent app, not in the default browser on my mobile device.

With the Classic app, we didn't need to do anything special (iirc) w/ the URLs to make them open in the app vs. the browser. They would just behave properly on their own. (At worst I think they'd load in a browser but it would be formatted w/ the "$m.do" URL so would force the app UI within the browser.)

I cannot seem to find any simple explanation of how to do this and I don't understand why. It seems like such an obvious thing and I feel like I'm too old and/or stupid to find where the answer lies.

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Sebastian L
Mega Sage

Hi Aaron,

You can do this by using the mobileDeepLinkGenerator. So when you look at an incident record in the Agent app, then that screen should take a sys_id as a parameter. 

It's been fairly long since I configured this, but I just found an article that does this step by step: https://community.servicenow.com/community?id=community_article&sys_id=5a7c69221bf03010aefc11751a4bc... 

I used to do it by doing it something like this: 

var id = current.getUniqueValue() + '';
var deepLinkGenerator = new global.MobileDeepLinkGenerator("agent");
var link = deepLinkGenerator.getFormScreenLink("c955de07dbf7641019c83307f4961975", 'incident', id);  //sys_id is the id of the applet displaying your record

 

But I like the article, since it gives you the dynamic link - so either it goes to the portal or it goes to the mobile app! 🙂 


Best regards,
Sebastian Laursen

View solution in original post

6 REPLIES 6

Hi Aaron,

 

have you had any further success with the dynamic aspect of the link?

 

Thanks,

Deb

Another thing is suppose we figure out the dynamic way of recognizing the device and opening the record appropriately. But what if someone hasn't downloaded the mobile app and does not want to? Is there a way to further know that and open in browser for that individual? I guess this is a second layer of dynamism 🙂 But that is what our manager is interested in.