Set up Conversational Integration with WhatsApp (powered by Twilio)
Set up the Conversational Integration with WhatsApp (powered by Twilio) application so that you can engage requesters in bot conversations. Integrating with ServiceNow Virtual Agent enables you to interact on WhatsApp chat with a Virtual Agent or Live Agent.
Before you begin
Before you begin, do the following:
Get ServiceNow entitlements for the following products and applications:
- Integration Hub
- Twilio spoke
- Conversational Integration with WhatsApp (powered by Twilio) For more information, see Get entitlement for a ServiceNow product or application.
Install the following applications on your ServiceNow instance:
- Integration Hub
- Twilio spoke
- Conversational Integration with WhatsApp (powered by Twilio)
- Connect your Twilio Number to your WhatsApp Business Profile.
- Set up Twilio spoke.
Role required: external_app_install_admin or va_admin
Procedure
Connect your company's Twilio account with your ServiceNow instance.
Log in to your Twilio Console.
From the Project Info pane of the Console Dashboard page, note down the authentication token.
You will later use this token to authenticate the Twilio account on your ServiceNow instance. For more information, see the Twilio documentation.
To specify the webhook URL, in the Twilio console, navigate to Programmable Messaging > Senders > WhatsApp Senders.
To enable your Twilio account to send messages to your ServiceNow instance, enter the webhook URL in the following format:
https://<instance-name>.service-now.com/api/sn_va_whatsapp_twi/message.Click your WhatsApp-enabled Twilio phone number.
In the A MESSAGE COMES IN field of the Configure WhatsApp Number dialog box, enter the webhook URL of your ServiceNow instance and click Configure.
To authenticate incoming hash messages from the Twilio account, create a Hash Message Verification record that stores the Twilio authentication token.
In the navigation filter of your ServiceNow instance, enter
hash_message_verification.list.In the Hash Message Verifications list, click New.
On the form, fill in the fields.
| Field | Description |
|---|---|
| Name | Name of the record in the Hash Message Verification \[hash\_message\_verification\] table that stores the authentication token that is associated with your company's WhatsApp-enabled Twilio phone number. For example, `TwilioWhatsappTestAppAuthToken`. |
| Description | Description of the record. For example, `Twilio Whatsapp Testing application Auth Token`. |
| Secret | Twilio authentication token that is associated with your company's WhatsApp-enabled Twilio phone number. |
4. Take note of the name of the Hash Message Verification record.
5. Click **Submit**.
Associate inbound message records with a Message Auth record.
In the navigation filter of your ServiceNow instance, enter
message_auth.listand click New.On the form, fill in the fields.
| Field | Description |
|---|---|
| Name | Name of the record in the Message Auth \[message auth\] table. For example, `VA Twilio WhatsApp Test App Message Auth`. |
| Provider | Provider of the auth token. Enter `Twilio`. |
| Group name | Name of the group that you created. |
| Service Portal | Customer service portal that you created. |
| Outbound service token | A unique token used by the ServiceNow AI Platform to authenticate and authorize access to an external service or API. The token is a credential that allows the ServiceNow AI Platform to securely interact with other systems. This token is generated by the external service and provided to the ServiceNow AI Platform so that the platform can make requests and access resources. |
| Inbound message verification | Name of the Hash Message Verification record that you created for the inbound hash messages in step 2. |
| Outbound message verification | Name of the Hash Message Verification record that you created for the inbound hash messages in step 2.Note: The values for the Inbound message verification and Inbound message verification fields are the same. |
3. Click **Submit**.
Associate the Message Auth record with the WhatsApp-enabled Twilio phone number.
In the navigation filter of your ServiceNow instance, enter
sys_cs_provider.list.In the Provider Channels list, click Twilio from the Name column corresponding to the WhatsApp channel.
If the Twilio entry is not present, enter
sys_cs_provider_application.listin the navigation filter to create the list.In the Provider Channel Identity related list, click New.
On the form, fill in the fields.
| Field | Description |
|---|---|
| Name | Name of the entity that users are contacting, such as IT Service Desk. |
| Inbound ID | Twilio phone number that users are contacting. Note: Be sure to include the '+' symbol and the country code in front of the phone number. For example: +18185559485. |
| Message auth | Message auth that you created in step 3. |
5. Click **Submit**.