Skip to main content

How to create a Whatsapp/SMS channel with Twilio?

Step 1. Click the "Add Channel" button from Settings > Channels page.

sms_create

Step 2. Click the "Twilio" icon.

list_of_channels

Step 3. Configure the channel.

These are the inputs required to create the channel:

InputDescriptionWhere can I find it
Channel NameThis is the channel name. It will be used across the application.N/A
Channel TypeSelect SMS, if you are integrating an SMS channel. Select WhatsApp, if you have a verified WhatsApp number in Twilio.N/A
Phone NumberThe 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.

create_twilio

Step 4. "Add agents" to your channel.

add_agents

Step 6. Hooray! You have successfully created a WhatsApp/SMS channel.

finish_inbox

If it is an SMS Channel, you don't need to do anything else. You will start receiving the messages in the dashboard whenever a customer sends you one.

If you are connecting a WhatsApp channel, you have to configure a callback URL in the Twilio channel:

  • 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.

Step 7. If you want to update the agents who have access to the channel, you can go to Settings > Channels.

inbox_settings

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 exising integration.

For such cases you can follow the given steps.

  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 give values

twilio_studio

REQUEST METHOD : POST

REQUEST URL: https://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 reponses to Agent Replies.