> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deflect.in/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Integration

> Connect WhatsApp Business numbers and let customers message your AI agents

Let customers reach your Deflect agents on **WhatsApp** — the same knowledge, handoff, and ticketing you use on web chat, on the channel they already use every day.

<Note>
  WhatsApp is available on **Starter** plans and above. Connecting or disconnecting numbers requires an **Admin**. **Admins** and **Developers** can sync templates, update tokens, and send test messages.
</Note>

## Overview

<Steps>
  <Step title="Connect a number">
    Link your WhatsApp Business phone number in **Settings → Integrations**.
  </Step>

  <Step title="Create a WhatsApp agent">
    Create an agent with channel **WhatsApp** and link it to your number.
  </Step>

  <Step title="Test">
    Send a test message to confirm everything works.
  </Step>

  <Step title="Go live">
    Share your WhatsApp number with customers.
  </Step>
</Steps>

<Frame caption="Integrations page — connected WhatsApp numbers with status badges.">
  <img src="https://mintcdn.com/quensultingai/xnI-ZHCSg6FKh-rL/images/whatsapp-numbers-list.png?fit=max&auto=format&n=xnI-ZHCSg6FKh-rL&q=85&s=0d814b4fcb0996d6037329c7610ed333" alt="Settings Integrations tab showing connected WhatsApp Business numbers" width="1440" height="900" data-path="images/whatsapp-numbers-list.png" />
</Frame>

## Choose your connection method

Deflect supports two ways to connect WhatsApp. Pick the one that matches how your business already manages WhatsApp:

| Method               | Best if you…                                             |
| -------------------- | -------------------------------------------------------- |
| **Meta (Cloud API)** | Already use Meta Business Manager and WhatsApp Cloud API |
| **Plivo**            | Use Plivo as your WhatsApp Business provider             |

Both methods deliver the same customer experience in Deflect. The setup steps differ only in where you paste credentials.

***

## Option A — Connect via Meta

### What you need from Meta

Before starting, gather these from your [Meta Business Manager](https://business.facebook.com/) WhatsApp setup:

| Deflect field                | Where to find it in Meta                             |
| ---------------------------- | ---------------------------------------------------- |
| **Display name**             | A friendly label for your team (e.g. "Acme Support") |
| **Phone number (E.164)**     | Full international number, e.g. `+15550123456`       |
| **Phone Number ID**          | WhatsApp → API Setup → Phone number ID               |
| **WABA ID**                  | WhatsApp Business Account ID                         |
| **System user access token** | Token with access to your WhatsApp Business Account  |

You also need permission to edit **webhook** settings in your Meta app.

### Connect the number

<Steps>
  <Step title="Open Integrations">
    Go to **Settings → Integrations** → **WhatsApp Business**.
  </Step>

  <Step title="Connect Number">
    Click **Connect Number** and enter your Meta credentials.
  </Step>

  <Step title="Save">
    Deflect registers the number and shows connection status, template count, and webhook details.
  </Step>
</Steps>

### Set up the Meta webhook

After connecting, each number card shows a **Webhook URL** and **Verify token**. Copy both into your Meta app's WhatsApp configuration.

Subscribe to the **`messages`** webhook field — this is required for Deflect to receive customer messages and delivery updates.

<Tip>
  After you connect a number, the number card in **Settings → Integrations** shows **Webhook URL** and **Verify token** copy buttons. Paste those into your Meta app's WhatsApp webhook configuration.
</Tip>

<Warning>
  Each WhatsApp phone number can only be connected to **one** Deflect organization. If the number is already registered elsewhere, connection will fail.
</Warning>

***

## Option B — Connect via Plivo

### What you need from Plivo

| Deflect field            | Where to find it                   |
| ------------------------ | ---------------------------------- |
| **Phone number (E.164)** | Your Plivo WhatsApp-enabled number |
| **Display name**         | Label for your team                |
| **Plivo Auth ID**        | Plivo console → Account → Auth ID  |
| **Plivo Auth Token**     | Plivo console → Auth Tokens        |

### Connect the number

<Steps>
  <Step title="Open Integrations">
    Go to **Settings → Integrations** and select the **Plivo** tab (or **Connect via Plivo**).
  </Step>

  <Step title="Enter credentials">
    Fill in phone number, display name, Auth ID, and Auth Token.
  </Step>

  <Step title="Configure Plivo webhook">
    After saving, copy the **message URL** shown on the number card into your Plivo WhatsApp application settings.
  </Step>
</Steps>

<Frame caption="Plivo connect form and message URL on the connected number card.">
  <img src="https://mintcdn.com/quensultingai/xnI-ZHCSg6FKh-rL/images/whatsapp-plivo-connect.png?fit=max&auto=format&n=xnI-ZHCSg6FKh-rL&q=85&s=c4872cdadee9daa03d26f496b45a7faf" alt="Plivo WhatsApp connection form and webhook URL on number card" width="1440" height="900" data-path="images/whatsapp-plivo-connect.png" />
</Frame>

***

## Link numbers to an agent

<Steps>
  <Step title="Create or open a WhatsApp agent">
    **Agents → Create agent** with channel **WhatsApp**, or open an existing one.
  </Step>

  <Step title="Open WhatsApp settings">
    In the agent editor, find **WhatsApp Settings**.
  </Step>

  <Step title="Select linked numbers">
    Choose one or more connected phone numbers for this agent.
  </Step>

  <Step title="Configure timing and style">
    Set dormancy timeout, auto-close rules, reopen threshold, and **response style** (see below).
  </Step>

  <Step title="Save">
    Save the agent. Inbound messages on linked numbers route to this agent.
  </Step>
</Steps>

<Warning>
  Each WhatsApp number can be linked to **only one** WhatsApp agent at a time. Assigning a number to a new agent moves it away from the previous one.
</Warning>

### Response style

| Style                               | Customer experience                                                         |
| ----------------------------------- | --------------------------------------------------------------------------- |
| **Single message**                  | One WhatsApp bubble per AI reply                                            |
| **Multiple messages (1–4 bubbles)** | Long replies split into short bubbles, like a natural WhatsApp conversation |

Use multiple messages when answers include lists, pricing tiers, or step-by-step instructions — it reads more naturally on mobile.

<Frame caption="WhatsApp agent settings — linked numbers and response style toggle.">
  <img src="https://mintcdn.com/quensultingai/xnI-ZHCSg6FKh-rL/images/whatsapp-agent-settings.png?fit=max&auto=format&n=xnI-ZHCSg6FKh-rL&q=85&s=62b09b14791ca4a31156340b72e43483" alt="Agent editor WhatsApp settings with linked numbers and response style" width="1440" height="900" data-path="images/whatsapp-agent-settings.png" />
</Frame>

## Message templates

Outside WhatsApp's **24-hour customer service window**, you must use **pre-approved templates** to start or re-open a conversation.

<Steps>
  <Step title="Create templates in Meta">
    Design and submit templates in Meta Business Manager (or your Plivo template workflow).
  </Step>

  <Step title="Sync in Deflect">
    **Settings → Integrations** → find your number → **Sync Templates**.
  </Step>

  <Step title="Use in campaigns or tests">
    Synced templates appear when sending test messages or WhatsApp campaigns outside the service window.
  </Step>
</Steps>

Template messages may incur WhatsApp charges depending on category and recipient country.

## Send a test message

Before announcing your WhatsApp line:

1. **Settings → Integrations** → your number → **Test**.
2. Enter a recipient phone in international format (`+countrycode…`).
3. Send. If the service window is closed, pick an approved template and fill any variables.

## Contacts and conversation history

Incoming WhatsApp chats link to **Contacts** when Deflect recognizes the phone number. The contact profile shows WhatsApp history alongside web chat, email, and tickets. See [Contacts](/contacts).

## Troubleshooting

| Problem                  | What to try                                                                                              |
| ------------------------ | -------------------------------------------------------------------------------------------------------- |
| Cannot connect a number  | Confirm your plan includes WhatsApp, you are an Admin, and the number is not already connected elsewhere |
| Messages not arriving    | Re-check webhook URL and verify token (Meta) or message URL (Plivo) match what Deflect shows             |
| Templates missing        | Click **Sync Templates** after Meta approves them, then refresh                                          |
| Test asks for a template | The 24-hour window is closed — select an approved template                                               |
| Wrong agent answers      | Verify the number is linked to the intended WhatsApp agent                                               |

## Related guides

* [Create chat agent](/create-chat-agent) — channel types and WhatsApp agent setup.
* [Integrations](/integrations) — Freshdesk, FreshChat, and other connectors.
* [Live chat](/live-chat) — when WhatsApp conversations hand off to humans.
* [Agent file attachments](/agent-file-attachments) — send files to WhatsApp customers.
