# Connect your Agent with WhatsApp

Connecting your Text Agent to WhatsApp lets it respond to customers directly through WhatsApp Business. Once connected, your agent will handle conversations automatically using the instructions and knowledge you've configured.

## Prerequisites

Before you begin, make sure you have the following:

* **A Dapta Text Agent** already created and configured.
* **A phone number** that is **not** already registered with another WhatsApp account.
* **Access to the phone number** to receive a verification code via SMS.
* **Pop-ups allowed** in your browser for the Dapta site.
* **A valid business website or Instagram Business profile URL** — Meta requires this to avoid blocks on your WhatsApp Business Account.

{% hint style="warning" %}
The phone number you use **must not be linked to an existing WhatsApp account**. If it is, you will need to deregister it from WhatsApp first before connecting it to Dapta.
{% endhint %}

***

## Step-by-Step Guide

**Step 1:** You can access WhatsApp setup in two ways:

* **From the sidebar:** Expand **Text Agents** in the left sidebar and click **Channels**, then click on the **WhatsApp Business** card.
* **From inside an agent:** Go to **Text Agents**, click on the agent you want to connect, and open the **Channels** tab at the top.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-d8d4e249f9359dc16a772744e8d72a7c54c10a19%2Fwhatsapp-text-agents-list.png?alt=media" alt="Text Agents list showing your available agents"><figcaption></figcaption></figure>

***

**Step 2:** You will see two channel options: **WhatsApp Business** and **Dapta Widget**.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-358e74ac47fc7dc3d2915c0a2330dbb5a59e95b3%2Fwhatsapp-channels-overview.png?alt=media" alt="Channels tab showing WhatsApp Business and Dapta Widget cards"><figcaption></figcaption></figure>

***

**Step 3:** Click the **Connect** button on the **WhatsApp Business** card. A requirements modal will appear.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-9b25ee69ac36e45be60e912f9b0229cf79071440%2Fwhatsapp-meta-requirements.png?alt=media" alt="Meta requirements checklist before connecting WhatsApp"><figcaption></figcaption></figure>

Review the requirements checklist:

* Allow pop-ups for this site.
* Have access to the phone number to receive the verification code.
* The number must not be registered with another WhatsApp account.
* Your business must have a valid website or Instagram Business profile URL.

Check the confirmation box and click **Connect**.

***

**Step 4:** In the **WhatsApp Business Connection** modal, fill in:

* **Phone Number** — Select your country code from the dropdown and enter your phone number.
* **Display Name** — This is the name your customers will see on WhatsApp. It is pre-filled with your agent's name, but you can change it (max 64 characters).

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-e6d21cd040835c598e5780fb0dff6c4d3b0d5dfb%2Fwhatsapp-phone-input.png?alt=media" alt="WhatsApp Business Connection modal with phone number and display name fields"><figcaption></figcaption></figure>

Click **Connect** to proceed.

***

**Step 5:** A **Meta Embedded Signup** popup will open in a new browser window. Follow the steps in the popup to:

1. Log in to your Facebook/Meta account.
2. Create or select a **Meta Business Account**.
3. Create or select a **WhatsApp Business Account (WABA)**.
4. Register your phone number.

{% hint style="info" %}
If the popup doesn't appear, make sure pop-ups are allowed for this site in your browser settings.
{% endhint %}

***

**Step 6:** Once the Meta signup is complete, the popup will close automatically and Dapta will register your WhatsApp sender. You will see a **success screen** confirming your connection with the phone number displayed.

Click **Done** to finish.

***

## After Connecting

Once connected, the WhatsApp Business card on the **Channels** tab will show:

* A **status badge** (e.g., `ONLINE`, `CREATING`, `OFFLINE`) in the top-right corner of the card.
* A **View Connection** button instead of the Connect button.

Clicking **View Connection** opens a details panel where you can see:

| Field               | Description                                               |
| ------------------- | --------------------------------------------------------- |
| **Phone Number**    | The connected WhatsApp number                             |
| **Status**          | Current connection status (Online, Offline, etc.)         |
| **WABA ID**         | Your WhatsApp Business Account ID                         |
| **Quality Rating**  | Meta's quality rating for your number (High, Medium, Low) |
| **Messaging Limit** | Your current messaging tier                               |
| **Sender ID**       | The Twilio sender identifier                              |

{% hint style="info" %}
Your agent will start responding to WhatsApp messages automatically once the status shows **ONLINE**. It may take a few moments after connecting for the status to update.
{% endhint %}

***

## Connecting with an Existing WhatsApp Business Account

If your Dapta account already has a **WhatsApp Business Account (WABA)** linked from a previous connection, the process is slightly different:

1. Follow **Steps 1 through 4** as described above.
2. Instead of the Meta popup, you will receive a **6-digit verification code** via SMS to the phone number you entered.
3. Enter the code in the **verification modal** and click **Verify**.
4. Dapta will register the sender and display the success screen once complete.

> **Tip:** If you don't receive the verification code, click **Resend Code** to have it sent again.

***

## Troubleshooting

| Issue                               | Solution                                                                                                            |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Meta popup is blocked               | Allow pop-ups for `app.dapta.ai` in your browser settings and try again                                             |
| Phone number already registered     | Deregister the number from your existing WhatsApp account first                                                     |
| Verification code not received      | Click **Resend Code** and check that you have signal on the phone number                                            |
| Connection stuck on "Creating"      | Wait a few minutes — the registration can take up to 60 seconds. If it persists, try disconnecting and reconnecting |
| Meta requires business verification | Make sure your Meta Business Account has a valid website or Instagram Business profile URL configured               |
