Notify Twilio: don't call the OOH Incident Manager if already on another callout call


'is escalatee' script

//-- var userSYSID = workflow.scratchpad.currentEscalateeId; workflow.scratchpad.escalateecalloutcounter += 1;'wait for "user call finished" counter: ' + workflow.scratchpad.escalateecalloutcounter); answer = ifScript_checkCalls(userSYSID, workflow.scratchpad.escalateecalloutcounter); function ifScript_checkCalls(escalateeSYSID, loopCounter) { if (loopCounter > 9) { //failsafe of 5mins return 'no'; } var grCalls = new GlideRecord('notify_participant'); grCalls.addActiveQuery(); grCalls.addQuery('user', escalateeSYSID); grCalls.addEncodedQuery('sys_created_onONLast 30 minutes@javascript:gs.beginningOfLast30Minutes()@javascript:gs.endOfLast30Minutes()'); grCalls.query(); if (grCalls.getRowCount() > 0) { return 'yes'; } return 'no'; }


Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

URL link in addInfoMessage