Notify +Twilio + On-Call

tiyasa
Giga Expert

Hello Awesome Members,

I am doing a POC to setup Notify sms with On call and through Twilio. I have been following the docs online but seems like I am stuck. Here are the steps I did -

The purpose is to simply test assignment on-call rotation members, plus an sms notification sent out for the assignment.

Here are the steps I did -

  1. Set up a number. Notify-> Number
  2. Add to Number Groups.
  3. Created a Group Schedule. On-Call Schedules -> Rotas
  4. Copied WF On-Call: Assign and Notify and updated the Notify Number to #1 step number
  5. Created a trigger Rule based on Short Description starts with test, trigger workflow in #3. On-Call Schedules -> Escalations -> Trigger Rules
  6. Created an Incident Management Alert, criteria of Incident for alert and linked user Contacts with updated mobile numbers.

When I create an incident with criteria as in #5 & #4, I don't see any related sms sent. What am I missing?

Thanks in advance,

T

1 ACCEPTED SOLUTION

Sorry, I got busy in other activities. Apparently, our ServiceNow Technical Consultant looked this up and told me that I needed only one more property to get this working => set glide.notify.task.phone_number to the Twilio notify number.

Hope this helps others searching for this topic to get going.


View solution in original post

7 REPLIES 7

jeroen9
ServiceNow Employee
ServiceNow Employee

Hi tiyasa,



Did you follow all the steps in the documentation?



Can you send a sms via script to one of those people on the rota? For example using:



// define recipient phone number
var toPhoneNumber = '+316.....';

// instantiate notify
var notify = new SNC.Notify();

// get all available Notify phone numbers (e.g. Twilio numbers)
var phoneNumbers = notify.getPhoneNumbers();

// iterate over all phone numbers
for (var i = 0; i < phoneNumbers.size(); i ++) {
  var phoneNumber = phoneNumbers.get(i);
   
  if (phoneNumber.supportsOutgoingSMS) {
  var messageBody = "test sms sent from " + phoneNumber.owner + " number: " + phoneNumber.number;
  var smsID = notify.sendSMS(phoneNumber, toPhoneNumber, messageBody);

  gs.log('sent sms with id: ' + smsID);  
  }
}



You could enable Notify debug logging to see what's going on:



glide.notify.debug = true


Sorry, I got busy in other activities. Apparently, our ServiceNow Technical Consultant looked this up and told me that I needed only one more property to get this working => set glide.notify.task.phone_number to the Twilio notify number.

Hope this helps others searching for this topic to get going.


I know this is an old post but I clicked the link above "all the steps". It makes no sense.

Step 6: Copy the workflow called "On-Call: Assign by Acknowledgement per rota" (it's not called that but let's carry on).

Step 7:Select a "Send SMS" activity

Does this mean to select one that it already on the workflow? There isn't one. Does it mean to add a new Send SMS activity? OK, so where do I put it?