Deploying to WhatsApp

Connect your flows to WhatsApp Business to automate conversations with customers on WhatsApp.

Prerequisites

Before deploying to WhatsApp, ensure you have:

First Time Setup

You'll need to set up a Meta App and WhatsApp Business API access before creating a deployment. This is a one-time setup per business account.

Meta Business Setup

If you don't have a Meta App with WhatsApp Business API access:

1. Create a Meta App

  1. Go to Meta for Developers and click "Create App"
  2. App details: Enter a descriptive app name (e.g., "ACME WhatsApp Bot") and your contact email
  3. Use cases: Select "Connect with customers through WhatsApp" from the Featured list
  4. Business: Select your Meta Business Portfolio (or create one if needed)
  5. Requirements: Review the publishing requirements and click Next
  6. Overview: Review your selections and click "Create App"

2. Add a Phone Number

  1. After creating the app, go to WhatsApp → API Setup in the left sidebar
  2. Click "Add phone number"
  3. Enter the phone number you want to use (must not be active on WhatsApp)
  4. Verify the number via SMS or voice call

Test Phone Number

Meta provides a test phone number for development. You can use this to test your integration before connecting your production number.

Get Your Credentials

You'll need four pieces of information from your Meta App:

1. Phone Number ID

Find your Phone Number ID:

  1. In the left sidebar, go to WhatsApp → API Setup
  2. Your Phone Number ID is displayed in the "From" section
  3. Copy this ID - it identifies your WhatsApp Business number

2. Access Token

For testing, use a temporary token:

  1. In WhatsApp → API Setup, find "Temporary access token"
  2. Click "Generate token" (valid for 24 hours)

For production, create a permanent token via System User:

  1. Go to Meta Business Settings
  2. Navigate to Users → System Users
  3. Click "Add" and create a system user with Admin role
  4. Click "Add Assets", select your WhatsApp App
  5. Grant whatsapp_business_management and whatsapp_business_messaging permissions
  6. Click "Generate new token" and copy it

3. Verify Token

Create a custom verify token:

  • This can be any string you create (e.g., "my_webhook_verify_token_123")
  • You'll use this to verify webhook requests from Meta
  • Keep it secret and unique to your application

4. App Secret

Find your App Secret:

  1. In the left sidebar, go to App Settings → Basic
  2. Click "Show" next to App Secret
  3. Copy the secret - this is used to verify webhook signatures

Keep Your Credentials Secret

Never share your access token or app secret publicly. If compromised, rotate them immediately in the Meta dashboard.

Connect Your Account

Account connections are managed directly in the Flow Editor during deployment creation.

Connecting a WhatsApp Account

During deployment creation, you'll reach an account selection step:

  1. Click "Connect Account" to expand the connection form
  2. Enter your Access Token
  3. Enter your Phone Number ID
  4. Enter your Verify Token (the one you created)
  5. Enter your App Secret
  6. Click "Connect" - we'll validate your credentials
  7. Your account appears in the dropdown - select it to continue

One Phone Number Per Deployment

Each WhatsApp phone number can only be connected to one active deployment. If you need to deploy multiple flows, use different phone numbers.

Configure Webhook in Meta

After connecting your account, configure the webhook in Meta to receive messages:

  1. In the left sidebar, go to WhatsApp → Configuration
  2. In the "Webhook" section, click "Edit"
  3. Set the Callback URL to:
    https://universalchatbot.com/deployments/whatsapp/YOUR_PHONE_NUMBER_ID

    Replace YOUR_PHONE_NUMBER_ID with your actual Phone Number ID

  4. Set the Verify token to the same token you used when connecting
  5. Click "Verify and save"

Subscribe to Webhook Fields

  1. After verification, click "Manage" next to Webhook fields
  2. Subscribe to the messages field (required for receiving messages)
  3. Optionally subscribe to message_template_status_update for template notifications

Don't Forget to Subscribe

Without subscribing to the messages webhook field, Meta won't forward any messages to your bot even though verification succeeded.

Create a WhatsApp Deployment

Once you have your credentials and connected account, creating a deployment is straightforward.

Step-by-Step Guide

Step 1: Choose Platform

  • Open your flow in the Flow Editor
  • Click "Deployments" in the toolbar (rocket icon)
  • Select the WhatsApp platform card

Step 2: Select Account

  • Existing account: Select a previously connected account from the dropdown
  • New account: Click "Connect Account" and enter your credentials

Step 3: Configure Deployment

Deployment Name: Give it a descriptive name (e.g., "Production WhatsApp")
Version Strategy:
Latest Version - Auto-updates to newest published version
Pinned Version - Lock to specific version (requires manual updates)
Active: Check to enable immediately

Testing Your Bot

Add Test Phone Numbers (Development Mode)

Before your Meta Business is verified, you must add phone numbers that are allowed to message your bot:

  1. Go to WhatsApp → API Setup in the left sidebar
  2. Find the "To" field section
  3. Click "Manage phone number list"
  4. Add your personal phone number and verify it with a code

Development Mode Restriction

In development mode, only phone numbers you've explicitly added can message your bot. Once your Meta Business is verified, anyone can message your bot.

Send a Test Message

Once your deployment is active and webhook is configured:

  1. Open WhatsApp on your phone
  2. Add your WhatsApp Business number as a contact
  3. Send a message to start a conversation
  4. Your flow should respond

WhatsApp Features

Your flow can use these WhatsApp capabilities:

  • Text messages - Standard text responses
  • Quick reply buttons - Choice nodes render as reply buttons (up to 3)
  • List messages - For more than 3 choices, uses list format

24-Hour Messaging Window

WhatsApp has a 24-hour messaging window. After 24 hours of inactivity, you'll need to use message templates to re-engage users. This is a WhatsApp Business API limitation.