Create Incident through inbound SMS send to twilio

Community Alums
Not applicable

Hi,

I have got a new requirement where I need to integrate our Service Now Instance with Twilio:

We have configured the below functionality -

1. Activate the Notify Plugin and get the Twilio number configured

2. Send SMS when a new Incident is created or Updated

3. Set up Conference Calls for an incident

Now we have to work on one more functionality:

When a user sends SMS on a Twilio number, an incident should be created in our service now instance

I saw the Processor 'NotifyNowSmsProcessor' but dint got any code in it.

Can anyone help me with this?

Thanks,

Ravi

8 REPLIES 8

siva_dirisala
ServiceNow Employee
ServiceNow Employee

Ravi, you are on the right track. Here is how you can achieve what you are trying.



1) Create a workflow against notify_message table. In the workflow you would have access to the SMS body via current.body and the phone number via current.phone_number. You can see some sample code in the OOTB shipped workflow called "Notify: Join Conference Call Via SMS". You can similarly create "Notify: Create Incident via SMS". From the phone_number of the SMS, you need to write code to identify the User. Then you can create an Incident with "Opened For" as this user and the Description of the Incident as the SMS body. You can default other incident fields like priority, category etc as appropriate.


2) Setup a new Notify Number Group. This is the number which is meant for creating incidents. When setting this up, specify the "Incoming SMS workflow" to the above workflow you defined.



That's it. The processor essentially takes care of receiving the SMS message and inserting into the notify_message table. And further interaction with this SMS message is via Workflow which provides ultimate flexibility for your needs.


Thanks Siva for your post which is helpful but in my case I want to create incident when customer makes a call(Not SMS) through his mobile phone to Twilio number. Any suggestions on my query would be helpful. Thanks in advance.

poojashah27
Giga Guru

Hi ravi,



i have similar requirement where i need to send out sms when new critical incident is created, and you have mentioned that you already configured sending out SMS when a new Incident is created or Updated, can you please provide detail on how you managed to do that?



Thanks


Hi Pooja,


We have similar requirement where we need to send out sms/voice for incident is created, did you configured sending out SMS when a new Incident is created or Updated, could you please provide details on how you managed to do REST API call.


Any direction is appreciated.



Thanks,


Ranjith