Skip to main content

Set Up Your WhatsApp Channel With Twilio

Step 1. Open your Hoory dashboard. Go to Settings → Channels → Add Channel.

dashboard

Step 2. Click the "WhatsApp" icon.

channel_settings

Step 3. Choose "Twilio" as the API provider. Fill in the appropriate details.

create_twilio

InputDescriptionWhere can I find it
Channel NameThis is the channel name. It will be used across the application.N/A
Phone NumberThis is the number you will be using to communicate with your customer. It has to be verified in Twilio.Enter your number as in the Twilio Dashboard
Account SIDAccount SID in Twilio ConsoleLogin to Twilio Console. Here, you would be able to see the Account SID and the Auth Token.
Auth TokenAuth token for the accountLogin to the Twilio Console. Here, you would be able to see the Account SID and the Auth Token.

Click Create Twilio Channel after filling in the information.

Step 4. "Add agents" to your channel.

add_agents

Hooray! You have successfully created a WhatsApp channel.

finish_channel

To connect a WhatsApp channel, you have to configure a callback URL in the Twilio channel. Follow the steps below.

  • Login to your Twilio Console.
  • Go to Programmable SMS -> Whatsapp -> Senders.
  • You will be able to see your phone number. Upon clicking it, you will see a field like the one shown below.

twilio_console

  • Provide https://app.hoory.com/twilio/callback as the value for WHEN A MESSAGE COMES IN input.

Configuring Hoory AI with Twilio Studio

If you are using Twilio Studio for a custom conversation flow, updating the webhook URL directly will break your existing integration.

For such cases you can follow the steps given below.

  1. Identify the step in your flow where you want the agent handoff to happen.
  2. Add a make http request widget as shown below with the given values.

twilio_studio

REQUEST METHOD : POST

REQUEST URLhttps://app.hoory.com/twilio/callback

CONTENT TYPE: Application/JSON

REQUEST BODY{{trigger.message | to_json }} Make changes as required based on your flow variables.

HTTP request widget will forward the message body to Hoory AI. It will create a conversation in Hoory AI from where the agent can reply.

  1. Make sure that your flow can handle the user responses to Agent Replies.

Additional Channel Settings

Your freshly configured WhatsApp channel should now appear in your list of channels. To see this and to make additional settings in your WhatsApp channel, go to Settings → Channels → click the gear icon on the associated WhatsApp channel.

All the additional settings available are the same as those in your Twitter channel. We recommend going through this link to understand the same.