Table of Contents

WhatsApp Opt In Template ✅

Xandro Lopez Updated by Xandro Lopez


As you probably already know, before you can proactively reach out to your users you first need to get their permission.

There are many different ways of getting their permission; the most simple and common way is to have them fill in their number and click the subscribe button somewhere on your website (similar to when you are signing up to an email newsletter).


You can do this really easily by using the Snippet in the 'Get Subscribers' section once your WhatsApp Business number has been approved.

What is a snippet you ask? It looks something like this:


Now we're going to show you how to get a user to subscribe to your WhatsApp channel. Two options here:

  1. Using a Bot for WhatsApp (You can find more info here):
  1. Using a Bot for Web (You can find more info here):
Bot Requirements

For an Opt-in to be valid it must follow certain guidelines set by WhatsApp, you can find them listed below:

  1. Active - triggered by a user action such as entering their phone number or ticking a box
  2. Informative - clearly stating what type of information is user signing up to receive
  3. Branded - show the WhatsApp logo in accordance with WhatsApp Brand guidelines
These requirements follow Official WhatsApp Guidelines

It is also important to note the following requirements:

  • To send a WhatsApp message to an individual, you must obtain their consent in the context of the user relationship. For example, to receive a receipt through WhatsApp, the individual must consent to the delivery during the purchase process.
  • Consents must be clearly labeled, including a visual element (e.g., the Yes/No option) next to the WhatsApp name and logo, as well as an adjacent legend that clearly indicates (a) the type of information you will be sending to the customer and (b) that you will be sending to the customer via a WhatsApp message.
  • You must give the person control over the WhatsApp number that will be used to send the communications, such as giving the person the ability to correct the phone number.

Customise the template

Now that the requirements are clear we are ready to start customising our Opt-in Bot so that it fits with the message you want to transmit to your users.

Welcome Message

IMPORTANT: Make sure there is a WhatsApp Logo and the Yes/No option to make sure you comply with WhatsApp regulations!

Other than that feel free to change any of the text in the Welcome Message.

Set a Country Code (for Web Bot)

If you take a closer look at the Javascript block in the template you'll find that it is actually a list of every country in the world and its country code, which makes this template is especially useful if you are targeting one country at a time.

1. Open the Javascript block

2. Copy the country and country code you want to use. For example, if your users are all in Australia, you should copy "Australia (+61)"

3. Open the Webhook block above the Javascript

4. Replace the predetermined option which in this case is "Spain (+34)" with your country code of choice and click save

The Conditions Block that comes after the Webhook basically validates the phone number inserted by your users.

If it is INCORRECT, the flow will be redirected to the Phone question, so users will get another chance to type in their phone number correctly.

If it is CORRECT, the flow continues towards the the Opt-in Webhook block.

Opt-in Webhook (Add URL)

Before you edit this block, make sure you created a snippet on the 'Get Subscribers' section we mentioned at the start of the article because you're going to need the URL generated by said snippet.

Read this article to find out how to write the correct URL

Once you have created the snippet and added the template message you want to send (if at all) and the bot you want to assign to it (if at all) you will find the URL as shown in the picture below:

Copy your URL and paste it into the URL & Method field of the second Webhook of the template:

Now you can go ahead and test your Opt-in to make sure it works!

Use cases

There are many different ways to use the bot you created to obtain the Opt-in permission from your clients, some of the most common are:

  1. SMS/Email Campaign
  2. Embed it into your website
  3. Create a dedicated landing page

Read this blog post if you want to know some more about the different use cases and how to apply them

How did we do?

How to get Opt-ins (Subscribers) for your WhatsApp 🚀

WhatsApp Campaigns 💌