Sunday, 12 August, 2018 UTC


With the recent announcement of Twilio API for WhatsApp and ongoing excitement around Twilio Flex, I thought it might be fun to bring WhatsApp into the contact center space. With just a few minutes of setup, customers can reach your business through an entirely different channel. Let’s take a look at how the hottest new things at Twilio work seamlessly together!
If you’d like to follow along and bring WhatsApp into Flex, you’ll need:
  • A Twilio account (sign up for a free Twilio account here)
  • Access to Twilio Flex – now in developer preview (request access here)
  • The WhatsApp Sandbox Channel. Follow these instructions to install the WhatsApp Sandbox Channel in your account. You will also need to connect your own WhatsApp account with the sandbox
Let’s get started!
Run the Flex Quickstart
If you’ve already set up your Flex instance, you can skip ahead to the next step.
If you’re new to Flex, run the Flex Quickstart to get started. During this process, several Twilio services will be created for you, including a set of Functions.
Launch the Flex UI app in your browser, and you should see something like this:
Get a Function URL
Navigate to the Functions manager in your Twilio console, and locate the Inbound Message function that was created for you with your Flex instance.
Click into the function, and tap the copy icon next to the function’s path to copy it to your clipboard.
Set up your WhatsApp Sandbox
Navigate to the WhatsApp Sandbox. If you haven’t already set up your sandbox, do so now. Next, skip to the “Connect the Sandbox to your App” section and paste the Function URL from your clipboard into the field marked A Message Comes In. Save your sandbox.
Start chatting
You’re ready to flex those WhatsApp muscles! Send a WhatsApp message to the sandbox number, and watch it come in as a new Task in Flex!
Accept the task, and get chatting! Your contact center can now receive inbound WhatsApp chats and respond to them just like SMS, Twilio Chat, Facebook Messenger, and LINE messages.
Keep Flexing those muscles
Now that you’ve added this quick channel integration to Flex, try adding another from Twilio’s list of channels. You can also make Flex your own by styling the UI to reflect your brand or creating custom components to extend what you can do with Twilio Flex.
Ready to do more with the Twilio API for WhatsApp? Try our emoji translation app, or our npm search bot, or create your own unique WhatsApp hack!
We can’t wait to see what you build!