Oracle Digital Assistant – WhatsApp Integration with Twilio

WhatsApp is one of the most interesting platforms for customers when it comes to delivering a conversational interface.

WhatsApp typically works with partners and 3rd party providers, which means that we need to connect to those instead of directly to WhatsApp. Twilio is one of those and ODA supports it as a Channel out of the box, which makes it very easy. Any other provider will require a webhook client.

All about it in the documentation: https://docs.oracle.com/en/cloud/paas/digital-assistant/use-chatbot/text-only-channels.html#GUID-6E659BE4-F0C9-40E3-8F93-D40ECCD8C8B4

Setup Twillio

First we need to create a Twilio account.

Then, under Programmable Messaging -> Try WhatsApp and follow the steps

I will use a testing sandbox where I register my own phone number with Twilio.

You need to send a WhatsApp message to the provided number and text: join realize-you.

Once that is successful the registration is complete.

Create an ODA Channel

Now back to the ODA side, where we will create a Channel.

We need the Account SID and Auth Token from Twilio.

The phone number in the below screen is not in the proper format. It must be whatsapp: <phonenumber>, where the phone number comes from Twilio as seen in “Twilio Sandbox for WhatsApp”.

I add my Skill in the Route To property.

Copy the generated Webhook URL.

Above the phone number is in the correct format.

Finalize Twilio Setup

Place the Webhook URL from ODA into “When a message comes in“. to finalize the ODA/Twilio configuration.

Web WhatsApp

Mobile WhatsApp

Once the Channel is configured you can easily change the routed skill and no other configuration is required.

What if you want to use a different provider instead of Twilio? Well in that case we need webhooks, but that will be the topic for another post.