VIP User Popup

inzomniak
Kilo Explorer

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

18 REPLIES 18

amadosierra
Kilo Guru

Hi Ben,



Out-of-the-box there is a Client Script called Highlight VIP Caller for the Incident form that you can customize to not only highlight but to include a popup message like you want. This requires to set the VIP flag in the users table first.



Regards,



/Amado Sierra


cwilker10
Giga Expert

Ben,


The pop-up is not OOB, but there is the flag which would highlight the user as a VIP, but not alert them.   You COULD add some quick code to your form, though, which will provide this functionality.   It would be something like:



When:onChange


Field: Caller


Script:


function onChange(control, oldValue, newValue, isLoading, isTemplate) {


    if (isLoading || newValue == '') {


          return;


    }



        var caller = g_form.getReference('caller_id', callback);


        function callback(caller){


                  if(caller.vip == true){


                            alert("This is a VIP");


                  }


        }


}


Similar to Chris' code, you could also show an information message underneath the caller_id field, if you don't want the user to have to click an "OK" button for the alert.



When:onChange


Field: Caller


Script:


function onChange(control, oldValue, newValue, isLoading, isTemplate) {


    if (isLoading || newValue == '') {


          return;


    }



        var caller = g_form.getReference('caller_id', callback);


        function callback(caller){


                  if(caller.vip == true){


                            alert("This is a VIP");


                            g_form.showFieldMsg('caller_id','This is a VIP!!!','error');


                  }


        }


}



Source: Display Field Messages - ServiceNow Wiki


Good morning and thank you for your responses, I



will take a look at the scripts above and see if they are what I and the customer are looking for, basically the reason for my original request was that as we have now moved over to ServiceNow from RMS Service Desk, we have an issue with the first line staff who are missing VIP users, currently we have ServiceNow to display a VIP user message under the Caller ID. (Similar to JohnG's script above) but the first line staff are missing this, as they put it its not "in your face enough", where as the RMS Service Desk solution put up a notification box informing them that a VIP user and any remedial actions that needed to be applied to that user has called after entering their Caller ID, they call taker would not be able to proceed with call logging until they had accepted the VIP popup window.