Display popup or play beep sound for new Critical Incidents

Archana13
Kilo Contributor

Hi,

I am trying to play sound whenever new Incident raised for specific company or assigned to specific group.

This sound will be played on support group members desktop at regular interval until the incident status moved to In progress status.

Please let me know if it is possible and how can we achieve it.

 

1 ACCEPTED SOLUTION

Hi Archana,

We can achieve it by creating new Widget and placed it on dedicated Portal page. This widget displays Number of P1 or P2 incidents and if this number is more than 1 with New/1 status. It play Audio and stop the Audio once the number is reduced to zero (0).  

New portal page access to be provided only for specific users whom needs to alerted. Those users should keep Portal page window open 24*7.

 

View solution in original post

8 REPLIES 8

Harsh Vardhan
Giga Patron

yes that can be fulfill .

 

 

i am adding sample code here , and i have considered one scenario here 

whenever p1 ticket has raised , and i opened the form the music will play. 

 

function onLoad() {
	//Type appropriate comment here, and begin script below
	if(g_form.getValue('priority')==1){
		var audio = new Audio('connect_alert.mp3');
		audio.play();
	}
	
}

 

Note: the mp3 file must be available in service-now audio files. i used OOTB mp3. 

 

 

This audio audible all users? 

Thanks& Regards
Sidhu !

Archana13
Kilo Contributor

Hi Harshvardhan,

thanks for your reply. My requirement is on creation of Critical incident, system play beep sound for making Support group agent Active/alert and start working on it quickly.

If he is manually opening some form or already knows this incident, he will start working on it.

I tried it using creating scheduled job to run every 5 minutes and have below condition and script to run:

Condition:

var gr = new GlideRecord("incident");
gr.addEncodedQuery('state=1^priorityIN1,2');
gr.query();
gr.next();

Run this script:

var url = 'https://' + gs.getProperty('instance_name') + '.service-now.com' + '/connect_alert.mp3';
var audio = new Audio(url); // replace with instance audio path
audio.play();

But it is not working. Let me know if any issues in code or approach.

Hi Archana,

We can achieve it by creating new Widget and placed it on dedicated Portal page. This widget displays Number of P1 or P2 incidents and if this number is more than 1 with New/1 status. It play Audio and stop the Audio once the number is reduced to zero (0).  

New portal page access to be provided only for specific users whom needs to alerted. Those users should keep Portal page window open 24*7.