VIP User Popup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2014 06:47 AM
We are a relatively new user of ServiceNow which has recently gone live as part of our managed services contract and a function that I have been asked to look into is to have a java popup triggered from the user ID field for some of our VIP users that call in, so it would display a warning especially to our first line call takers, that the specified user requires special attention, and would require the call taker to accept the message before continuing, is this functionality already included with ServiceNow or would this need to be scripted, either way I'm hoping that someone could advise the correct way to get this implemented.
Many thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2015 04:03 AM
Hi John, sorry another question - if we potentially wanted the message to stay there e.g. when an analyst opens a ticket in the relevant Customer's name they see that message also, how could we achieve this? Obviously at the moment the message only shows when the name is populated until a save/update is made. Thank-you, Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2015 08:58 AM
Hi Daniel,
You would need a new onLoad client script which utilizes the g_scratchpad to determine if the current.caller_id is visually impaired.
Some additional information on the g_scratchpad: Client Script Best Practices - ServiceNow Wiki
Thanks,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 05:42 AM
Thanks John! So if I understand correctly, the g_scratchpad is only required if/when we go down the route of adding a custom field on the user table to trigger the alert. I.e. if it was based on customer name, the below taken from the onChange script should work for onLoad too?
var caller = g_form.getReference('caller_id', callback);
function callback(caller){
if(caller.name == "Test Customer"){
g_form.showFieldMsg('caller_id','Please note this customer has a visual impairment','error');
So in terms of the g.scratchpad (and doing things properly!) we'd need a new display business rule to hold the custom field from the user table, and then we could call that in our onLoad client script? Hopefully this is kind of right!
Cheers,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 08:46 AM
Hi Daniel,
Correct, for an onLoad client script, it would be best to use the display business rule and g_scratchpad as a best practice.
If you want to do it onLoad using the caller's name, you will first have to check that caller_id is not empty, since the onLoad will process for every time a form is loading including a brand new empty form.
Thanks,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 09:04 AM
Hi John,
you can also use sweet alerts to make the alert look beautiful!
SweetAlert - a beautiful replacement for javascript's "alert"
install the share update set and add this to your onchange script.
parent.swal("User is a VIP!", "Treat them as a king or off with thy head")