Skip to main content
Version: 8.4.X

WhatsApp

WhatsApp is a chat application to communicate on the go. Using WhatsApp for incident creation and management will become easier if you integrate the ServiceOps with WhatsApp. Once combined, you can generate or review requests from WhatsApp without signing in to the Support Portal or accessing the chat agent from the portal. In this case, Twilio is used as a messaging app.

Such integrations provide programmable communication tools for sending and receiving messages, and performing other communication functions using its web service APIs.

Twilio WhatsApp Integration

Prerequisites

  • ServiceOps hosted on a public URL
  • SSL Certificate enabled
  • Chat support should be enabled in the ServiceOps Portal
  • The Base URL in ServiceOps should be the same as the portal URL
  • Valid WhatsApp account

Applicable Version

This functionality is applicable from version 7.8 and above.

Create App

To create a WhatsApp Messaging App using Twilio, follow the below steps:

Step 1: Install WhatsApp from the Google Play Store and create an account.

Step 2: Login or register to Twilio by entering the Email Address and Password.

Login Page

Step 3: Click the account link at the top-left corner of the screen. For first-time users, click the link My first Twilio account below.

Click the link

Step 4: In the Account Info section, copy the Account SID (Client ID) and Auth Token (Password).

Account Info

Step 5: In ServiceOps,

  1. Navigate to Admin > Support Channels > Messaging App > WhatsApp page.
  2. Enable the WhatsApp functionality
  3. Paste the copied Client ID and Password from the above point.

Paste the copied Client ID and Password

Step 6: In Twilio, navigate to Messaging > Try It Out > Send a WhatsApp message > Sandbox tab and connect to WhatsApp Sandbox using the client number and code. You can further test the connection with the Sandbox by clicking Next step and moving ahead.

Client Number and Code

Step 7: Save the above-provided number and send the code via WhatsApp, as shown below.

Send the Code

Once the code is sent and received in Twilio, your phone number gets linked to the sandbox, and a confirmation message appears.

Step 8: Copy the Twilio phone number and paste it into the ServiceOps Client Number field.

Once done, click Update, and a confirmation message appears. 

Step 9: In Twilio, navigate to Messaging > Try It Out > Send a WhatsApp message > Sandbox Settings tab. Change the base URL link in the “When a Message Comes In” field (4).
Syntax of URL: https://{server URL}/api/public/whatsapp/readMessage
Sample URL: https://dummy.com/api/public/whatsapp/readMessage

Change the Base URL

Once done, click Save (6), and the app gets created.

Step 10: : In the WhatsApp Twilio chat, type Hi, and a welcome message appears, as shown below.

WhatsApp Conversation

WhatsApp Conversation

You can now reply with the necessary action and get the desired response.

Troubleshooting Guidelines

In case you face the SSL certificate issue and unable to integrate WhatsApp Messaging App, you can do the following:

  1. Login to the Twilio account.

  2. Check the connectivity between your WhatsApp account and Twilio from the Sandbox tab (Step 6).

  3. Check the URL in the Sandbox settings that connects Twilio with ServiceOps (Step 9).

  4. Check the error logs from the Monitor > Logs > Error Logs tab. The page displays the error codes along with their titles. For example: Here, you can refer the logs for the error code 11237 as shown below.

    Based on the error code, you can furter investigate the issue and take the required action.

error log

error log

  1. Also, ensure that your account is not associated with multiple instances.

  2. If required, you can disable the SSL validaiton from the SSL certification validation section of Account > Manage Account > General Settings page. Once disabled, Save the configuration.

troubleshooting