Support inbound WhatsApp messages

Updated

People can reply to your WhatsApp messages. You can use replies to track engagement, respond to your audience, and trigger campaigns.

Inbound WhatsApp is only available with the native WhatsApp integration, which you connect through your Facebook Business Account. If you send WhatsApp through your own Twilio account, Customer.io can’t capture inbound messages.

How it works

WhatsApp is a two-way channel. When someone replies to a WhatsApp message you sent, or sends a message to your WhatsApp sender number, Customer.io captures the inbound message.

We treat inbound WhatsApp messages like events. You can use inbound message events to trigger campaigns, add people to segmentsA segment is a group of people in your workspace. Use segments to trigger campaigns, track membership over time, or fine-tune your audience. There are two types of segments: data-driven and manual. Data-driven segments automatically update when people start or stop matching criteria. Manual segments are static., and track replies to your messages.

For example, you might ask people to reply to a message to confirm an appointment or answer a survey. You can then add people who reply to a segment and trigger a campaign to send them follow-up messages.

Before you get started, you’ll need to:

  1. Make sure you’re set up for inbound messages.
  2. Capture a phone attribute so we can match inbound messages to the correct person in Customer.io.

 Inbound WhatsApp is not real-time chat

Inbound WhatsApp lets you respond to your audience through campaigns, but it takes a moment to parse messages, add people to segments, and trigger campaigns. Don’t use Customer.io as a substitute for immediate, conversational messaging.

Set up inbound message handling

Inbound WhatsApp works with the native WhatsApp integration. If you use WhatsApp via your Facebook Business Account, inbound support is already set up for you. We automatically capture inbound messages so you don’t need to do anything to support inbound messages.

To test it, send a message to your WhatsApp sender number and check the Activity Log in Customer.io for your inbound message.

You must use the phone attribute

To match inbound messages to people, you must store phone numbers using the phone attributeA key-value pair that you associate with a person or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages. in E.164 format.

When someone sends a message, we look for a person with the phone attribute that matches the phone number the message came from. This works best if everybody in your workspace has a unique phone number.

The E.164 format for a US-based phone number like 555-123-4567 is +15551234567. If you don’t set phone numbers in E.164 format, we’ll do our best to parse numbers into this format when we resolve inbound messages to people in Customer.io—but we can’t guarantee that we’ll be able to do this. (We use Google’s libphonenumber library to parse phone numbers, and we skew towards US and Canadian numbers.)

Formatting phone numbers in E.164

You need to use this format in Customer.io so we can read numbers correctly. You typically write a US-based phone number like 555-123-4567 or a UK-based phone number like 020 7183 8750. But E.164-formatted numbers look like +15551234567 or +442071838750.

To format your phone numbers in E.164, you’ll follow this structure:

  • A plus sign (+), which replaces the International Call Prefix (like 011)
  • The International Country Calling Code (like 44 for the UK, 1 for North America)
  • The Local Area Code
  • The Local Phone Number (or Subscriber Number)

Phone numbers should be unique

To help us attribute inbound messages to the correct person, you should make sure that each person has a unique phone number in your workspace.

While we recommend that you store unique phone numbers for each person, people in Customer.io can have the same phone number. If two people have the same phone number and you get an inbound message from that number, we’ll attribute the inbound message to the oldest profile—the person who was created first in your workspace.

Inbound messages for unrecognized numbers

If we can’t match an inbound message to a person, we treat the inbound message as an anonymous event. While anonymous inbound messages can still trigger campaigns, these campaigns won’t accomplish much because you can’t send messages (or replies) to anonymous people with WhatsApp messages in Customer.io.

An inbound message is likely to be anonymous when:

  • You receive a message from someone you haven’t identified.
  • The phone attribute isn’t in the proper E.164 format.

Even if you later identify the person who sent the inbound message, the inbound message remains anonymous. There’s no way to reconcile the anonymous inbound message with the identified person later.

Copied to clipboard!