Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Using WhatsApp with Conversations


WhatsApp is increasingly the world's #1 conversational messaging platform as well as an absolutely critical engagement tool across South America, Middle East, Africa and many parts of Europe and Asia. Twilio Conversations supports WhatsApp out of the box and can help you address a number of patterns:

  • Delivery Coordination: Let your drivers reach out to the customer to make sure the last 100 yards of each delivery are successful.
  • Clienteling: Allow your employees to have long-term relationships (e.g. personal shoppers, wealth managers, or real estate agents) with your customers without using their personal devices.
  • Masked Communication: Facilitate communication between your employees and your customers without sharing private numbers.

This guide will show you how to set up a few common patterns that pair WhatsApp with other channels.


Prerequisites

(information)

Info

Please note that WhatsApp onboarding generally takes 1-2 weeks. WhatsApp has a thorough vetting process that requires business verification in the Meta Business Manager in order to protect the WhatsApp ecosystem.

We advise planning accordingly when setting up your WhatsApp Sender for Twilio. For more information, please read our guide to connecting your WhatsApp Business Profile with your Twilio number.

WhatsApp is a highly-regulated channel, requiring documentation and approval from Meta to get your business started. Specifically, you will need to secure an approved WhatsApp Business Profile, which gives you a Twilio WhatsApp Number to represent your business.

Get your WhatsApp templates approved

(information)

Info

The last section of the tutorial uses templates to initiate contact between two separate WhatsApp participants. If you follow the steps chronologically, you will still be able to complete the tutorial because you will have opted into the WhatsApp's 24-hour window. However, the screenshots will looks lightly different from what you see in the WhatsApp interface.

Depending on your use-case, you may need to secure some approved WhatsApp templates. This is specifically required if you want to send a message to a new user on WhatsApp, or send a message more than 24 hours after the last response.

Note: If your use case can function such that you always receive WhatsApp messages first from your customers, you can skip the template registration step.

Now, you're ready to go!


Cross-Channel Masking: Connecting WhatsApp to SMS

SMS is the easiest channel to connect to WhatsApp in a Twilio Conversation. To do this we'll use:

  • A Twilio SMS-capable phone number (hereafter "TWI-SMS-NUMBER")
  • Your Twilio WhatsApp number (hereafter "TWI-WA-NUMBER")
  • The Twilio CLI

We recommend the Twilio CLI for experimenting, but these guides will work in any language in Twilio. Pick your favorite on the right and follow along.

Let's get down to it; our SMS-to-WhatsApp conversation will take four steps to set up.

Step 1. Create a Conversation

Create a Conversation

The Conversation will contain two participants, one on SMS and the other on WhatsApp.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function createConversation() {
_18
const conversation = await client.conversations.v1.conversations.create({
_18
friendlyName: "SMS-to-WhatsApp Example",
_18
});
_18
_18
console.log(conversation.sid);
_18
}
_18
_18
createConversation();

Output

_23
{
_23
"sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"friendly_name": "SMS-to-WhatsApp Example",
_23
"unique_name": "unique_name",
_23
"attributes": "{ \"topic\": \"feedback\" }",
_23
"date_created": "2015-12-16T22:18:37Z",
_23
"date_updated": "2015-12-16T22:18:38Z",
_23
"state": "inactive",
_23
"timers": {
_23
"date_inactive": "2015-12-16T22:19:38Z",
_23
"date_closed": "2015-12-16T22:28:38Z"
_23
},
_23
"bindings": {},
_23
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"links": {
_23
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
_23
"messages": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
_23
"webhooks": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
_23
}
_23
}

Step 2: Create the WhatsApp Participant

Create the WhatsApp Participant

Use your own WhatsApp phone number and the business profile you created.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function createConversationParticipant() {
_21
const participant = await client.conversations.v1
_21
.conversations("CHxxxx")
_21
.participants.create({
_21
"messagingBinding.address": "whatsapp:YOUR_WHATSAPP_NUMBER",
_21
"messagingBinding.proxyAddress": "whatsapp:TWI_WA_NUMBER",
_21
});
_21
_21
console.log(participant.accountSid);
_21
}
_21
_21
createConversationParticipant();

Output

_18
{
_18
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"conversation_sid": "CHxxxx",
_18
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"identity": null,
_18
"attributes": "{ \"role\": \"driver\" }",
_18
"messaging_binding": {
_18
"type": "sms",
_18
"address": "+15558675310",
_18
"proxy_address": "+15017122661"
_18
},
_18
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"date_created": "2015-12-16T22:18:37Z",
_18
"date_updated": "2015-12-16T22:18:38Z",
_18
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"last_read_message_index": null,
_18
"last_read_timestamp": null
_18
}

Step 3: Create the SMS Participant

Create the SMS Participant

Use your phone number and a Twilio SMS Number from your account.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function createConversationParticipant() {
_21
const participant = await client.conversations.v1
_21
.conversations("CHxxxx")
_21
.participants.create({
_21
"messagingBinding.address": "YOUR_SMS_NUMBER",
_21
"messagingBinding.proxyAddress": "TWI_SMS_NUMBER",
_21
});
_21
_21
console.log(participant.accountSid);
_21
}
_21
_21
createConversationParticipant();

Output

_18
{
_18
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"conversation_sid": "CHxxxx",
_18
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"identity": null,
_18
"attributes": "{ \"role\": \"driver\" }",
_18
"messaging_binding": {
_18
"type": "sms",
_18
"address": "+15558675310",
_18
"proxy_address": "+15017122661"
_18
},
_18
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"date_created": "2015-12-16T22:18:37Z",
_18
"date_updated": "2015-12-16T22:18:38Z",
_18
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"last_read_message_index": null,
_18
"last_read_timestamp": null
_18
}

Step 4: Send a message from WhatsApp

Because you've set up this conversation to proxy with SMS, you'll see the messages flowing back and forth automatically between your two channels.

Note: The WhatsApp user kicks off this conversation by sending the first message. By starting from an inbound WhatsApp message, we've avoided any need to use WhatsApp Templates to start the Conversation. These messages and media will flow just fine for the next 24 hours.

WhatsApp & SMS Phone Side-by-Side.

Masked Communication: Connecting Two WhatsApp Participants

When you connect two WhatsApp participants, you'll have to solve two business problems:

  1. Who is speaking with whom?
    This is probably the bread-and-butter of your business idea: if you're a two-sided marketplace, you're probably connecting a buyer and a seller (or a passenger and a rider). The buyer is the most critical personality: the brand they see in WhatsApp is important and must establish enough trust to proceed with the conversation. When you create your WhatsApp Business Profile , keep that buyer personality in mind first.
  2. How will you get opt-in from both participants?
    Unsolicited outbound messages to WhatsApp are highly restricted. Until your customer replies, you can only send messages conforming to approved templates. In this scenario, both sides are on WhatsApp, so we will need to use one of those templates to get the conversation moving.

We'll start by setting up the Conversation and later show how to use templates to improve the customer experience.

Setting Up the Conversation

We'll need the following to set up our WhatsApp-to-WhatsApp Conversation:

  1. A Twilio WhatsApp number; we'll call this "TWI_WA_NUMBER." You could use more than one, but it's not necessary.
  2. Two consumer WhatsApp accounts. Choose yourself and a friend who won't mind. These are typically your personal device numbers.
  3. The Twilio CLI .
(warning)

Warning

If you're going through this guide in chronological order and re-using your WhatsApp numbers to test out all of the use cases, you should remove the previous Conversation first. Each number pair (twilio+personal) can only appear in one conversation at a time.


_10
twilio api:conversations:v1:conversations:remove --sid CHxxxx

With that, connecting two WhatsApp participants in a Conversation will take five steps:

Step 1: Create the Conversation

The Conversation will map your two participants to each other, one on SMS and the other on WhatsApp.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = twilio(accountSid, authToken);
_16
_16
async function createConversation() {
_16
const conversation = await client.conversations.v1.conversations.create();
_16
_16
console.log(conversation.sid);
_16
}
_16
_16
createConversation();

Output

_23
{
_23
"sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"friendly_name": "friendly_name",
_23
"unique_name": "unique_name",
_23
"attributes": "{ \"topic\": \"feedback\" }",
_23
"date_created": "2015-12-16T22:18:37Z",
_23
"date_updated": "2015-12-16T22:18:38Z",
_23
"state": "inactive",
_23
"timers": {
_23
"date_inactive": "2015-12-16T22:19:38Z",
_23
"date_closed": "2015-12-16T22:28:38Z"
_23
},
_23
"bindings": {},
_23
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"links": {
_23
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
_23
"messages": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
_23
"webhooks": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
_23
}
_23
}

Steps 2 and 3: Add two different WhatsApp Participants

Run this code twice, replacing YOUR_WHATSAPP_NUMBER with your phone number the first time and your friend's the second time

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function createConversationParticipant() {
_21
const participant = await client.conversations.v1
_21
.conversations("CHxxxx")
_21
.participants.create({
_21
"messagingBinding.address": "whatsapp:YOUR_WHATSAPP_NUMBER",
_21
"messagingBinding.proxyAddress": "whatsapp:TWI_WA_NUMBER",
_21
});
_21
_21
console.log(participant.accountSid);
_21
}
_21
_21
createConversationParticipant();

Output

_18
{
_18
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"conversation_sid": "CHxxxx",
_18
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"identity": null,
_18
"attributes": "{ \"role\": \"driver\" }",
_18
"messaging_binding": {
_18
"type": "sms",
_18
"address": "+15558675310",
_18
"proxy_address": "+15017122661"
_18
},
_18
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"date_created": "2015-12-16T22:18:37Z",
_18
"date_updated": "2015-12-16T22:18:38Z",
_18
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"last_read_message_index": null,
_18
"last_read_timestamp": null
_18
}

Step 4: Send a message from one side

From your phone, send the first message in WhatsApp. Send the message to your TWI_WA_NUMBER (not directly to your friend's number.)

Step 5: Send a message from the other side

Have your good-natured friend send a message to your TWI_WA_NUMBER (not directly to your phone number).

Rider-Courier WhatsApp with Natural Opt-in.

Congratulations, it's working!

… Mostly. You may notice that after steps four and five, you have two different conversations ongoing. After this awkward introduction, everything proceeds as expected, but that's not the professional experience we want.

In this scenario, both WhatsApp-based parties must reply before the Twilio can send outbound messages to both parties. Receiving an incoming message from both Conversation participants kicks off the "24-hour session" in which Twilio can send outbound free-form WhatsApp messages.

Starting More Professionally: Using Template Messages

(warning)

Warning

WhatsApp templates need to be submitted and approved before they are effective. Before you proceed to below, learn how to create WhatsApp templates and submit them for approval. Once your templates are approved, use the appropriate body text in the steps below.

Please note: Without approved WhatsApp templates, these outbound messages will be swallowed by the system.

If you have followed the tutorial chronologically, you can complete the tutorial because you and your good-natured friend have opted into receiving WhatsApp messages for 24 hours. However, the screenshots will differ from what you see in the WhatsApp interface.

Let's carry the example above a little further, and use approved WhatsApp Template Messages to make it happen. We're going to pick two template messages that we've already gotten approved:

  • A templated message that our food courier will understand
  • A templated message that will invite the customer to opt into the contact.

_10
TEMPLATE 1:
_10
Hello {{1}}, your food delivery is almost there but {{2}} (your rider) needs help finding your door. Are you willing to chat with them?
_10
_10
TEMPLATE 2:
_10
Your customer has agreed to chat over WhatsApp to get this delivery sorted. You're now connected. Say hello!

We'll send these messages one after another, waiting for a response from the first before sending the second.

Using templates to smooth out our customer experience, let's follow two more steps:

Step 6: Invite the Customer to Engage.

Use the REST API to send the first message as though it were authored by the courier. Note the 'author' parameter.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function createConversationMessage() {
_21
const message = await client.conversations.v1
_21
.conversations("CHxxxx")
_21
.messages.create({
_21
author: "whatsapp:COURIER_WA_NUMBER",
_21
body: "Hello Robert, your food delivery is almost there but Alicia (your rider) needs help finding your door. Are you willing to chat with them?",
_21
});
_21
_21
console.log(message.accountSid);
_21
}
_21
_21
createConversationMessage();

Output

_27
{
_27
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27
"conversation_sid": "CHxxxx",
_27
"body": "Hello Robert, your food delivery is almost there but Alicia (your rider) needs help finding your door. Are you willing to chat with them?",
_27
"media": null,
_27
"author": "whatsapp:COURIER_WA_NUMBER",
_27
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27
"attributes": "{ \"importance\": \"high\" }",
_27
"date_created": "2015-12-16T22:18:37Z",
_27
"date_updated": "2015-12-16T22:18:38Z",
_27
"index": 0,
_27
"delivery": {
_27
"total": 2,
_27
"sent": "all",
_27
"delivered": "some",
_27
"read": "some",
_27
"failed": "none",
_27
"undelivered": "none"
_27
},
_27
"content_sid": null,
_27
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27
"links": {
_27
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts",
_27
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelMetadata"
_27
}
_27
}

The following is what the customer will see after you send the first templated message as the courier/rider:

Inviting the customer, they opt-in and then we tell them to hang on.

You'll notice when you do this that the customer receives a message, but the courier does not. We're using the rules of WhatsApp's 24-hour opt-in window in our favor: securing one participant's opt-in (from the customer) before we reach out to the other (the courier).

In the picture above, you notice that we included an automated reply: "Great! Just a moment…" This picture is a step ahead. To actually execute this — and at the same time to opt-in our courier — we're going to need a Twilio function and a Conversations webhook.

Create a Twilio Function to send the templates

Let's start with the former.

First, navigate to the Twilio Functions section of the Console and click on "Configure." Confirm that the version listed for the twilio NPM module is up-to-date, such as 3.66.1 or higher.

Functions Twilio npm.

Next, create a Twilio Function in the console with the following code, which will set us up to capture the onMessageAdded event.


_23
exports.handler = function(context, event, callback) {
_23
const customer = event.Author;
_23
let thisConversation = context.getTwilioClient().conversations.v1.conversations.get(event.ConversationSid);
_23
_23
// This system message will reach the customer, but our rider
_23
// will still need to be opted-in.
_23
let justAMoment = thisConversation.messages.create({
_23
body: "Great! Just a moment while we connect you…"
_23
});
_23
_23
// Use Template #2 for the rider.
_23
let riderOptIn = thisConversation.messages.create({
_23
author: customer,
_23
body: "Your customer has agreed to chat over WhatsApp to get this delivery sorted. You're now connected. Say hello!"
_23
});
_23
_23
// Remove all scoped webhooks; we only want this once.
_23
let webhooks = [];
_23
thisConversation.webhooks.each(hook => webhooks.push(hook.remove()));
_23
_23
// Critically important: wait for the messages to resolve.
_23
Promise.all([justAMoment, riderOptIn, ...webhooks]).finally(() => callback(null));
_23
};

To power this, we'll add a Conversation Scoped webhook that we can remove later.

Step 7: Set up a Conversation Scoped Webhook to field the reply.

Replace the configuration.url field with the address of your new Twilio Function.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_23
// Download the helper library from https://www.twilio.com/docs/node/install
_23
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_23
_23
// Find your Account SID and Auth Token at twilio.com/console
_23
// and set the environment variables. See http://twil.io/secure
_23
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_23
const authToken = process.env.TWILIO_AUTH_TOKEN;
_23
const client = twilio(accountSid, authToken);
_23
_23
async function createConversationScopedWebhook() {
_23
const webhook = await client.conversations.v1
_23
.conversations("CHxxxx")
_23
.webhooks.create({
_23
"configuration.filters": ["onMessageAdded"],
_23
"configuration.method": "POST",
_23
"configuration.url": "http://funny-dunkin-3838.twil.io/customer-optin",
_23
target: "webhook",
_23
});
_23
_23
console.log(webhook.sid);
_23
}
_23
_23
createConversationScopedWebhook();

Output

_17
{
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"conversation_sid": "CHxxxx",
_17
"sid": "WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"target": "webhook",
_17
"configuration": {
_17
"url": "https://example.com",
_17
"method": "get",
_17
"filters": [
_17
"onMessageSent",
_17
"onConversationDestroyed"
_17
]
_17
},
_17
"date_created": "2016-03-24T21:05:50Z",
_17
"date_updated": "2016-03-24T21:05:50Z",
_17
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_17
}

Now let's start again by sending the initial opt-in message to test the whole flow.

The customer and rider are opted-in separately. Once opted-in, the conversation flows naturally and automatically.

With all this setup, we've created the ideal experience for two-sided WhatsApp Conversations. Notice how system messaging manages expectations while we're still opting-in the second party. And after the initial setup, notice that we're not forwarding messages one-by-one among the parties: all of that happens automatically via Twilio Conversations platform. It only ends if/when you DELETE the conversation later on.

Note: Our templates fit neatly in WhatsApp's guidelines: they are not promotional, but rather they facilitate an active transaction. By following these patterns, your business could benefit from the same pattern.


What's Next

Ready to learn more about Conversations and WhatsApp? Learn more with the following resources:


Rate this page: