How to use WhatsApp API reporting to enable a SMS or Voice fallbacks

Zou PengBin

As more and more businesses engage their customers with WhatsApp, it can be time consuming and expensive to understand which users have WhatsApp accounts and which do not.

For those companies, understanding which users are not getting your WhatsApp API messages can help you optimize your broadcast message results, increase conversions, and engagement, and ensure connection with fallbacks. 

With MessageBird’s Flow Builder, you can automatically understand if a WhatsApp message was delivered, and use SMS or Voice as fall back options to ensure you reach your client. In this blog post, you will learn how to:

  • Set up your flow logic with Flow Builder
  • See your WhatsApp API message campaign results with Flow Heatmap
  • Build a list of WhatsApp phone numbers that were rejected

This guide will help if your WhatsApp template messages have already been approved and you are already sending broadcast messages with Flow Builder. If you are having issues getting your template messages approved or still not able to send your first WhatsApp message, make sure to read our WhatsApp Message Best Practices guide.

Important: WhatsApp API Business Policy only allows non-transactional notifications to be sent in Indonesia and Mexico. If you are thinking about sending broadcast messages on WhatsApp, make sure to comply with WhatsApp Business Policy.

Requirements

Before you start building the logic and flow within Flow Builder, you need to have the following requirements ready:

With those, you can follow these steps to see your broadcast campaign results and build SMS/Voice fallbacks to help ensure deliverability using Flow Builder. 

Step 1: Create a new flow in Flow Builder with a WhatsApp Webhook

For the first step, start a new flow using this template:

1. Log in to your MessageBird Dashboard and go to Flow Builder.

2. Download the sample flow that you will be using.

3. Import the flow with the import function. And publish the flow.

4. Create a new webhook from your WhatsApp channel and copy the webhook URL. If you need help, see this guide on “How to create a webhook” for your WhatsApp channel.

Step 2: Record details of WhatsApp messages on a new Google Sheet

In this step, you will learn how to connect your flow to Google Sheets so you can track message delivery and status. Then, use that insight to optimize delivery via WhatsApp and create fallback logic to ensure you reach your customer.

1. Create a new Google Sheet with the following name (“WhatsApp Campaign Reporting”) and columns:

  • Time: This will show the time your message was rejected
  • Message_From: Who is the message sender
  • Message_To: Who is the message recipient
  • Status: What is the current status of message
  • Description: What is the reason for message being rejected

2. Integrate your Google account with the MessageBird dashboard so that you can connect the sheet you just created with your flow


3. Connect your “WhatsApp Campaign Reporting” columns with each column with your new flow within Flow Builder


Part 3: Create SMS / Voice fallback logic

In this step, you will be able to add fallback channels (SMS or Voice) to your flow logic if a WhatsApp message is rejected.

These are some of the most common reasons why messages are rejected at this stage:

  • Your customers’ phone number is invalid
  • They don’t have a signal at time messages was sent
  • Don’t use WhatsApp or have it installed on their mobile phone

Once you open the flow in Flow Builder, you will see four different branches (see image below). These branches are aligned with WhatsApp API message statuses:

  • Sent: Message received by WhatsApp server
  • Delivered: Message delivered to recipient
  • Read: Message read by recipient
  • Rejected: Message sent by your business failed to send



In this step, you will add your fallback channel to the rejected branch. The rejected branch will capture all of your customers who did not receive your WhatsApp message successfully.

1. Add “Send SMS” or “Outbound Call” action as a step into the rejected branch. This branch will be used as the fallback route once messages are rejected by WhatsApp Business API. For example, if a message is not successfully delivered, Flow Builder will send an SMS or voice message.

2. Use Flow Heatmap to monitor the flow and see your WhatsApp API campaign results. You will be able to see how many messages were sent, delivered, rejected and much more.

Use our Heatmap to understand the results and deliverability of your WhatsApp API broadcast campaigns. 

Part 4: Add timestamp to your flow (optional)

The default timestamp variable in Flow Builder is based on UTC time zone. You can use a “Fetch variables” step within Flow Builder to make a GET request to http://api.timezonedb.com and automatically sync with the customer’s time zone. The output variables should be formatted. Please register and get your own free API key.

Tip: Make sure to monitor the flow’s handle failures to ensure your flow will continue even if the request fails.

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/e33c3e95-fea5-4562-b60b-b4cc08e880c5/Screenshot_2021-03-30_at_12.29.23_AM.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210329%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210329T191242Z&X-Amz-Expires=86400&X-Amz-Signature=28f3c681a064b85ee0dc67d0b17a35022e099daa5d84e9dceab9ff3ad1ffef0c&X-Amz-SignedHeaders=host&response-content-disposition=filename %3D"Screenshot_2021-03-30_at_12.29.23_AM.png"

These are the simple steps you need to follow to start using SMS or Voice as a fallback when your WhatsApp messages are not successfully delivered.

Conclusion

Your flow is now able to create a Heatmap and show the results of your WhatsApp broadcast campaigns. Now you know how to use Flow Builder to customize your customer experience. To continue building projects and engage with your customers via one single API, check our WhatsApp API and Conversations API documentation.