Integrating ServiceNow with Twilio Services with the help of Notify API
Twilio SMS and Voice activate speedy on-call scheduling, incident alerts. Notify allows you to integrate with telephony providers such as the Twilio service to manage phone calls and SMS messages from within your instance.
Here I have implemented a functionality where you can trigger a Conference call and SMS when any P1 Incident is created. Also you can explicitly trigger a call with call the assignment group members by clicking Phone Icon.
Twilio Configuration Needed:
- You must have an SID and authentication token for an active Twilio account and you can get it by creating account on : https://www.twilio.com/
- After creating a Twilio account, as you can see after clicking on Active Number you will get a number, or you can choose between number provided.
- Also, In order to receive a call/SMS, you need to Add your mobile number or callers mobile number in Verified Called IDs and need to verify it.
- Also, as you can see in image, Account SID and Auth Token is generated. Copy that in notepad because we need to add this in ServiceNow account.
- You can configure Programmable Voice, SMS within Twilio. I am using trial account so it comes with limited features.
ServiceNow Configuration Needed:
- Activate the Notify plugin by going to Plugins
- Role required: notify_admin, admin
- As you can see in below screenshot, you need to go Notify> Twilio Direct Configuration and then Enter your Account SID and Auth Token which is copied on clipboard or you can find it on Twilio Account Dashboard.
- After adding Account SIDand Auth Token Click, On “Connected to Twilio” info message as below.
- UI Macro: In order to Show Phone Icon in front of assignment group field. On a Click, it will trigger a conference call to assignment group members.
You will see below window after initiating a conference call to group members. You can find all call related information in Notify Conference Calls Module. - System Property: This system properties will have SysID of Notify number to use for group conference calls.
- Script Include: This script include will have a code for triggering a conference call. This script will be called from UI Macros. This script will find group member/ conference call participents, sys_id of conference call number of property groupconfcall.number and set up the outbound calls for all conference call participants.
- Dictionary Override: Create a dictionary override for Assignment group field and add following attribute: ref_contributions=group_conf_call. This is used for calling a UI Macro which displays Phone Icon.
Done!!! You are ready to test your functionality. You can deploy attached update set your instance.
References:
1. https://docs.servicenow.com/bundle/madrid-servicenow-platform/page/product/notify2/concept/c_Notify2...
2. https://developer.servicenow.com/app.do#!/api%5Fdoc?v=newyork&id=r%5FN-call%5FS%5FS%5FGR
3. https://www.twilio.com/docs/all
Thanks for reading and do comment with your suggestion/improvements if any.
Hope you will find it as helpful. Don’t forget to Mark it Helpful and Bookmark article so you can easily find on your profile.
Thank you,
Abhishek Gardade
Labels:
https://www.servicenow.com/community/developer-articles/integrating-servicenow-with-twilio-services-with-the-help-of/ta-p/2322460
