On-Call Workflow (

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2022 06:23 AM
We've got On-Call set up with Notify. We use Twilio for our SMS messaging. I'm noticing that with some users - not all of them, the part of the workflow that checks to see if there's an existing outbound SMS message for the incoming phone number seems to be validating as 'No', when it is clear that there is an existing outbound for that number.
The agent receives the text, responds with 'ACC' (as specified), the workflow (On-Call: Check Assignment Response) deems that the response is valid, but in the next step it essentially says that there is no matching outbound. In all cases, there is an existing outbound, and the record is usually right before the inbound record in the list.
On thing I wonder about is the wording of the workflow step: "Is there an outbound SMS for the record number contained in the response?" That makes me wonder if certain SMS clients or carriers are not sending a number back for ServiceNow to use. Has anyone had any similar issues with this workflow/process?
- Labels:
-
On-Call Scheduling

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 05:37 AM
Hi Ken,
As for the Notify Number On-Call it only needs to be associated to the number. The workflows listed will not take effect for this scenario. As for modifying the workflow you shouldn't have to make changes if you have placed yourself on-call and then associated the incident to an assignment group which you are a member. After that the workflow trigger should pick up and send based on the on-call scheduled.
Revert back to this workflow and it should work fine.
function getNotifyNumber() {
if (current.getTableName() == 'notify_call')
return current.notify_number;
var number = new GlideRecord('notify_number');
number.addQuery("number", gs.getProperty("glide.notify.task.phone_number"));
number.query();
if (number.next())
return number.getUniqueValue();
return null;
}
Please, let me know if there's any issue with the implementation.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 06:44 AM
So, I actually figured out the difference between the ones that were working and the ones that weren't. The ones that were working were coming form the On-Call system. The ones that weren't were coming from a business rule we had created to send an SMS to the On Call agent if the priority of an issue got changed to Critical. That script was just querying for the on call person and using SNC.Notify().sendSMS() to send them a message. The agent in question was trying to reply with 'ACC' to that message, but it's not part of the workflow, so it could not locate the matching outbound message.
At this point, I may need to find a way to allow those messages to also be able to be responded to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2022 04:26 PM
I know Ken found the root cause of the issue on his instance, but posting a follow-up on something I found after troubleshooting the same symptoms on my instance.
If you configure an Escalation Plan with only one step and set up a single contact plan step with zero time until the next step, you'll find that SMS responses are not successfully matched to their outgoing counterparts and assignment fails. I don't expect we'll have flows like that in prod, but I set one up for a quick test and couldn't understand why the SMS response wasn't working.
Here's the problem:
The Notify process is designed to populate a message number in the message log, and then it clears that message number when it goes on to the next escalation step. The message number is used to correlate outbound escalation attempts and inbound responses. In my case, I had the “time to next step” set to zero and no second step – so the message number was wiped out a second or two after it was initially populated. Subsequently, when the incoming response was processed, it couldn’t find an outbound record in the notify_message table with a matching message number.