Wednesday, August 5, 2020

Setting up Notify - How to read the Docs - Twilio Part 3

Hi Developers,

In last two articles in this series we have learnt how to setup the Twilio and how to configure Twilio with ServiceNow Notify.

In this article we will see how to setup Notify, so that we will be able to use the Twilio functionality for our future development activities in ServiceNow. In order to proceed with this article you need to have setup done which was explained in previous two articles.

 

Step 1) Navigate to Notify > Numbers.

Phone numbers and short codes are provided by Twilio once the account is successfully connected and are stored on the Notify Phone Numbers [notify_number] table.

short code is a 5 or 6-digit number that can send and receive messages with mobile phones.

 

Step 2) Click the appropriate phone number from the list.

Step 3) Select the appropriate Notify Group

Here, we will select 'Notify On Task Group'.

Associate each Notify number to a number group to use inbound and outbound workflows. Number groups allow you to control which workflows run when using the phone numbers in each number group.

Each phone number can only be associated with one number group.

Step 4) Click 'Update'. your list will now look somewhat like this :

Step 5) Navigate to Notify > Administration > Notify Properties

Step 6) Set glide.enable.notify_on_task property to 'true'

This property will enable Notify integration for Task table and its extensions.

Step 7) In new tab, Navigate to https://www.twilio.com/console and copy the phone number (In our example,TRIAL NUMBER)

Step 8) Set the number copied from previous step to glide.notify.task.phone_number property.

This Notify phone number will be used for sending SMS-s and starting conference calls from any record that belongs to the task table (or a table that extends the task table).

Step 9) Set the number copied from previous step 7 to com.snc.on_call_rotation.notify_webrtc_number property. and click 'Save'

This will enable On-Call integration with Notify which allows On-Call users to directly call people on rosters from the browser.

You can read about all the Properties installed with Notify here

Remember, The number must be entered in E.164-compliant format

E.164 numbers are formatted [+] [country code] [subscriber number including area code] e.g. +15152985093. 
You can read more about it at https://www.twilio.com/docs/glossary/what-e164

 

Congratulations, Now we are all set to use Notify module of ServiceNow to leverage the functionalities of Twilio.

But, It's always better to test your integration and configurations before proceeding forward with the development.

So in the next article we will be testing the Twilio configurations and then we will start with actual development of business requirements.

Please leave your feedback so that i can improvise the content.

Thank You.

Vishal Ingle

ServiceNow Certified System Administrator

DxSherpa Technologies Pvt. Ltd.

MH, IN.

Saturday, August 1, 2020

Configure Notify with Twilio - How to read the Docs - Twilio Part 2

Hi Guys,
In my last article, I had guided you to set up a Twilio account. In this article we are going to integrate our Twilio account with Notify.
"Notify allows you to integrate with the Twilio telephony service to send and receive phone calls and SMS messages from within your instance."
First of all, we need to install the Plugins for Notify. 
  • Notify (com.snc.notify) plugin - Provides powerful platform features for workflow-driven voice calls, conference calls, and SMS messages. You can activate the Notify plugin if you are an administrator.
  • Notify - Twilio Direct Driver (com.snc.notify.twilio_direct) plugin - Provides next generation integration with Twilio and Notify.
The Notify-Twilio integration with the Notify-Twilio Direct driver provides APIs and workflow activities for applications to handle various notification features.
The Notify-Twilio Direct driver provides the following notification features:
  • Start and manage a conference
  • Send and receive SMS messages
  • Send and receive calls

Step 1) Navigate to System Definition > Plugins and search for 'Twilio'. You'll see following two plugins, 'Notify' and 'Notify - Twilio Direct Driver' :
Step 2) Click 'Install' for 'Notify - Twilio Direct Driver'. 
Step 3) Click 'Activate'
Your window will look something like this :
Step 4) Once the plugin gets activated, Click 'Close & Reload Form'
Step 5) Navigate to Notify > Administration > Twilio Direct Configuration and Click 'here' link in the "This record is in the Twilio Direct Driver application, but Global is the current application. To edit this record click here." info message to temporarily change the application scope.
Your screen will look something like this :

Step 6) In new tab, Navigate to https://www.twilio.com/console
Step 7) Copy 'ACCOUNT SID'
Step 8) On the Twilio Account Properties page opened in step 5, enter your Account SID.
Step 9) Repeat step 7 and 8 for 'AUTH TOKEN' and Click 'Connect'
Your Screen will look sommething like this :
As you can see in the above screenshot, Phone numbers associated with the Twilio account are imported to Notify.
If the account is not associated with an instance and the connection is successful, a read-only list of E.164 and short code phone numbers associated with this Twilio account appears. This list displays the phone number, supported capabilities such as voice or SMS, the country for each Twilio number, and the Notify number group to which the number belongs.
To manage phone numbers per instance, set up one Twilio account for each instance and configure all relevant phone numbers for the instance under that account.
Only one Twilio account (or subaccount) can be configured on Notify at a time.
Ensure that each instance on which you configure Notify uses a different Twilio account. Each account specifies a unique account SID, authentication token, telephone numbers, and endpoint. Using the same account across multiple instances may cause your Twilio service configuration to be overwritten.
Notify automatically creates a TwiML application in the Twilio service and configures the application to use the instance as an endpoint.
You can observe more details by navigating to https://www.twilio.com/console/voice/twiml/apps 

We have successfully configured Twilio with Notify but to use Twilio Services we need to do some more configurations. See you in the next article to complete the Notify set up and have some fun.

Please leave your feedback in the comments so that i can improvise the content.

Thank You.
Vishal Ingle
ServiceNow Certified System Administrator
DxSherpa Technologies Pvt. Ltd.
MH, India.

Setting up Twilio - How to read the Docs - Twilio Part 1

Hi Guys,
It has been couple of weeks i have started to contribute to the Community. My ultimate goal is to help other developers on Now Community with the knowledge that I gathered all these days working on several modules on Now platform. Community helped me a lot in my initial days and it's just a small effort to return the favor.
I have been writing random articles, but soon I realized I can do it in a little way better. So next few articles in the series are going to about the initiative on which I was working. And I will be guiding you End to End from creating a Twilio Account to Integrating it with ServiceNow NotifyOn-Call SchedulingIncident Communication Management and etc.
Although all the information is available on ServiceNow Documentations, there is not much information available. 
Working on a complete initiative will help you to build everything from scratch and believe me it will be a fun.
The first thing you'll be needing is the 'Twilio Account'. Let's create it.
Step 1) Navigate to https://www.twilio.com/ and click 'AGREE AND PROCEED' to accept the Cookies.
Step 2) Click 'CLOSE'
Step 3) Click 'Sign up'
Step 4) Fill the form, tick the checkbox to accept Twilio terms and conditions and click 'Start your free trial'
Step 5) Now you'll see the window which will look something like this :
Step 6) Check you mail Inbox. You will have one mail recieved from Twilio with the title 'Verify your email'. Open it and click on 'Confirm Your Email' link.
Step 7) You will be redirected to the Twilio Console page.
Step 8) Select your Country
Step 9) Enter your mobile number and click 'Verify'
Step 10) Enter the 'Verification code' and click 'Submit'

Step 11) Answer the following questions :
 

Step 12) Click 'Skip to dashboard'
Step 13) Click 'Get a Trial Number'
Step 13) Click 'Choose this Number'
Step 14) Click 'Done'
Step 15) Now your Console/Dashboard will look something like this :
Step 16) Select 'All Products & Services' from the sidebar menu 
Step 17) Navigate to Programmable Voice > Calls > Geo Permissions
Step 18) Tick each of the country/region you want to send to/recieve from messages and click 'Save'

International Voice Dialing Geographic Permissions, also known as Geo Permissions, control which countries and subsets of phone numbers you can dial out to from your Twilio project.
Read more about 'Geo Permissions' here.
Congratulations. .. We have set up created a Twilio Account and did basic setup. .. And now we are all ready to integrate it with ServiceNow.
Don't forget to read next post on Twilio to learn how to achieve this.

Thank You.
Vishal Ingle
ServiceNow Certified System Administrator
DxSherpa Technologies Pvt. Ltd.
MH, India.