# Add an AI agent to WhatsApp > Connect a WhatsApp number so your QwryAI agent answers customers on WhatsApp The WhatsApp channel connects your QwryAI agent to a WhatsApp Business phone number, so the agent answers the messages customers send to that number. It suits any business that already talks to customers on WhatsApp, such as an online store answering order questions or a clinic confirming appointments. This guide covers connecting a number through Meta, then the **Connection**, **Leads**, **Response delay**, **Actions** and **Automation** tabs, costs, and what to check when something goes wrong. > [card] What you can do: | /docs/user-guides/integrations/whatsapp#how-to-connect-whatsapp | Answer customers on the app they already use, around the clock, with the same knowledge, instructions and Actions as your website agent. > [!NOTE] > > Customers can send photos and documents, and your agent reads them before it replies. See [Images and attachments](/docs/user-guides/chatbot/behavior/images-and-attachments). > [!NOTE] > > One agent can answer on several WhatsApp numbers. Every number you connect is listed on the WhatsApp channel's **Connection** tab. ## Use cases **Customer support.** Your agent answers from its [data sources](/docs/user-guides/chatbot/data-sources) and reads the photos customers send, such as a picture of a damaged parcel. When someone needs a person, the [Escalations](/docs/user-guides/chatbot/actions/escalate-to-human) Action opens a ticket and the AI stays quiet in that chat while your team replies from the **Inbox**. **Order questions.** With [Shopify](/docs/user-guides/integrations/shopify) connected, customers can ask "Where is my order?" on WhatsApp and get the status from your store. See [Shopify Actions](/docs/user-guides/chatbot/actions/shopify-actions). **Proactive messages.** [WhatsApp campaigns](/docs/user-guides/chatbot/outbound-whatsapp) send an approved [template](/docs/user-guides/integrations/whatsapp-templates) to the contacts you choose, and [WhatsApp Automations](/docs/user-guides/integrations/whatsapp-automations) send one for every new Shopify order. **Selling in the chat.** [WhatsApp Catalog](/docs/user-guides/chatbot/actions/whatsapp-catalog) shows your Shopify products as WhatsApp product cards that customers can add to a cart. ## Before you start A number you connect the regular way is used by QwryAI through Meta's WhatsApp Business Platform, so it can't also be signed in to the WhatsApp or WhatsApp Business app. > [!TIP] > > Already answering customers from the WhatsApp Business app on this number and want to keep doing so? Connect it with [WhatsApp Business app coexistence](/docs/user-guides/integrations/whatsapp-coexistence) instead, and the app and your agent share the number. > [accordion] The number is already registered in the WhatsApp app > > Delete the account in the app first: > > 1. Open WhatsApp or WhatsApp Business on the phone that uses the number. > 2. Go to **Settings › Account**. > 3. Select **Delete my account**. After a few minutes the number can be registered again. > [accordion] You used the number with Meta's developer tools before > > Turn off two-step verification for it in Meta's WhatsApp Manager: open the phone number, then **Settings › Two-step verification**, and turn it off. You also need a Facebook account that can manage your business on Meta, and a display name for the number that Meta can approve. ## How to connect WhatsApp ![Selecting Setup on the WhatsApp card, signing in with Facebook in Meta's window, choosing a business portfolio and WhatsApp Business account, adding and verifying a number, selecting Finish, and landing on the WhatsApp channel's Connection tab with the new number listed as Active.](walkthroughs/whatsapp-signup.gif) **1. Open the WhatsApp channel** Open your agent, select **Channels** in the sidebar, and find the **WhatsApp** card: *Connect your agent to a WhatsApp number and let it respond to messages from your customers.* Select **Setup**. ![The Channels page with the Shopify and WhatsApp cards, and the pointer on the WhatsApp card's Setup button.](annotated/01-whatsapp-card.webp "Channels › WhatsApp › Setup.") To find it quickly, type in **Search channels**. ![The Channels page with whatsapp typed in Search channels and only the WhatsApp card listed.](annotated/02-search.webp "Search channels to find WhatsApp.") **2. Sign in with Facebook** **Setup** opens Meta's own sign-up window. Sign in with the Facebook account that manages your business and continue. > [!NOTE] > > If nothing opens, an ad blocker or your network may be blocking Meta: QwryAI then shows *Couldn't open Meta sign-in*. Allow `connect.facebook.net` and try again. Closing Meta's window before the end shows *Whatsapp integration cancelled!* **3. Choose your business and WhatsApp account** In Meta's window, pick your business portfolio (or create one), then choose or create the WhatsApp Business account the number belongs to, and fill in its profile. **4. Add and verify the number** Enter the phone number and its display name, then verify it with the code Meta sends by text message or call. **5. Finish** Select **Finish** in Meta's window. QwryAI saves the number, confirms it, and from then on the **WhatsApp** card shows **Manage**. **6. Check the Connection tab** Select **Manage** on the **WhatsApp** card. The **Connection** tab lists your **Connected phone numbers**. Each card shows the number, **Active** or **Inactive**, the verified business name, an on and off switch, and a menu. ![The WhatsApp channel's Connection tab with the Overview, Connection, Leads, Response delay, Actions and Automation tabs, and two number cards under Connected phone numbers.](connected/annotated/c01-connection.webp "Connection: every number on this agent.") To add another number, select **Connect a new number** at the bottom of the list. The switch on a card pauses the agent on that number without disconnecting it: chats still arrive in the **Inbox**, but the agent doesn't reply. **7. Edit the business profile (optional)** Open a number's menu. **Edit Profile** opens the number's profile in Meta's WhatsApp Manager, where you change the picture, description and other details customers see. **Reconnect** runs Meta's sign-up again for the number, and **Delete Number** removes it from QwryAI. ![A WhatsApp number card with its menu open: Edit Profile, Reconnect and Delete Number.](connected/annotated/c02-number-menu.webp "Edit Profile, Reconnect or Delete Number.") > [!TIP] > > Scan the QR code under **Test AI Agent**, next to the WhatsApp preview, to open a chat with the number on your phone, and send a message to check that your agent replies. ![The Test AI Agent card with a QR code, Scan QR to test on your phone, and a select for the number to test.](connected/annotated/c09-test.webp "Test from your phone.") ## Automatic lead collection QwryAI can save each customer who messages your WhatsApp numbers as a contact, with their phone number and WhatsApp name. To turn it on: 1. Open **Channels › WhatsApp › Manage › Leads**. 2. Turn on **Enable automatic collection of leads**. 3. Tick the numbers it should apply to. ![The Leads tab with Automatic lead collection and the Enable automatic collection of leads switch.](connected/annotated/c05-leads.webp "Leads: collect name and number.") Collected leads appear in [Contacts](/docs/user-guides/chatbot/contacts/contacts-overview). > [!NOTE] > > To ask customers for details such as an email address, use the [Collect Leads](/docs/user-guides/chatbot/actions/collect-leads) Action. ## Response delay People often send several short WhatsApp messages in a row. If the agent answered at once, it would reply to each one before the customer had finished. The response delay makes the agent wait after the customer's latest message; anything sent during the wait is answered in one reply. To set it: 1. Open **Channels › WhatsApp › Manage › Response delay**. 2. For each number, enter a **Minimum delay** and a **Maximum delay** in seconds. 3. Select **Save** under that number. ![The Response delay tab with a form for one number: Minimum delay, Maximum delay and Save.](connected/annotated/c06-delay.webp "A minimum and a maximum per number.") For each reply the agent waits a random time between the two values, so replies don't arrive at a mechanical interval, and each new message starts the wait again. Enter the same value twice for a fixed wait. For example, with a minimum of 5 and a maximum of 10 seconds, a customer who writes "Hi", then "I ordered a jacket last week", then "Where is it?" a few seconds apart gets one answer to all three. > [!NOTE] > > Both values must be whole seconds from 2 to 30, and the maximum can't be lower than the minimum. A number you haven't set waits 2 seconds. ## Channel settings **Overview** shows the model and data sources your agent uses everywhere, the Actions turned on for WhatsApp, and the instructions. Turn off **Sync with global instructions** to write instructions for WhatsApp only. ![The WhatsApp channel's Overview tab with the model, data sources, Actions and Instructions with Sync with global instructions.](connected/annotated/c07-overview.webp "Overview: what WhatsApp uses.") **Actions** lists your agent's Actions with a switch for each, so you decide which ones run on WhatsApp. ![The WhatsApp channel's Actions tab listing Actions with a switch for each.](connected/annotated/c08-actions.webp "Pick the Actions that run on WhatsApp.") **Automation** sends WhatsApp templates for new Shopify orders. See [WhatsApp Automations](/docs/user-guides/integrations/whatsapp-automations). ## Messaging limits and billing WhatsApp has two separate costs: **QwryAI message credits.** Each reply your agent sends uses message credits according to its [AI model](/docs/user-guides/chatbot/models-comparison), as on every other channel. See [Usage](/docs/user-guides/workspace/usage). **Meta's charges.** Meta bills your WhatsApp Business account for the messages sent through the platform, including every template message, at rates that depend on the country and the template category. Add a payment method in Meta Business Suite before you send templates or campaigns. See Meta's WhatsApp pricing for current rates. **The 24-hour window.** Your agent and your team can send free-form replies for 24 hours after the customer's last message. After that, the only way to reach the customer is an approved [template](/docs/user-guides/integrations/whatsapp-templates). When the customer writes again, the window opens again. **Messaging tiers.** Meta limits how many people a number can start conversations with each day, depending on its quality and volume. Your current use shows on the WhatsApp campaigns page. See [WhatsApp campaigns](/docs/user-guides/chatbot/outbound-whatsapp). > [!NOTE] > > Turning off a number's switch pauses the agent on it without disconnecting. Chats keep arriving in the **Inbox**, and you can switch it back on at any time. ## Limitations * **The number is for the platform only.** A number connected the regular way can't also be used in the WhatsApp or WhatsApp Business app. To keep the app, use [coexistence](/docs/user-guides/integrations/whatsapp-coexistence). * **Free-form replies end after 24 hours.** After that, send an approved [template](/docs/user-guides/integrations/whatsapp-templates). * **Meta's account problems stop replies.** If Meta locks the WhatsApp Business account or blocks it over billing, the number's card says so, with a link to WhatsApp Manager or Meta Business Suite, and messages resume once Meta lifts the block. ![A WhatsApp number card showing Disconnected from WhatsApp under the number.](connected/annotated/c04-disconnected.webp "A card shows when a number stops working.") ## Best practices > [card] Give WhatsApp its own instructions | /docs/user-guides/integrations/whatsapp#channel-settings | Turn off Sync with global instructions to ask for shorter answers that read well on a phone. > [card] Turn on the commerce Actions together | /docs/user-guides/chatbot/actions/shopify-actions | If you sell on WhatsApp, turn on the cart and order Actions alongside product search, so customers can check out in the chat. > [card] Set up a path to your team | /docs/user-guides/chatbot/actions/escalate-to-human | Add an Escalations Action so customers who need a person get one in the same chat. > [card] Add Meta billing early | /docs/user-guides/integrations/whatsapp#messaging-limits-and-billing | Add a payment method in Meta before you send templates or campaigns, or template messages can fail. Changes to instructions and Actions go into a draft. WhatsApp customers keep talking to the live agent until you select **Publish**, so try changes in the [Playground](/docs/user-guides/chatbot/playground) first. See [Drafts and publishing](/docs/user-guides/chatbot/drafts-and-publishing). ## Troubleshooting > [accordion] The number can't be connected > > If the number is registered in the WhatsApp or WhatsApp Business app, delete the account in the app first, or connect it with [coexistence](/docs/user-guides/integrations/whatsapp-coexistence). If you used it with Meta's developer tools, turn off two-step verification. See [Before you start](#before-you-start). > [accordion] The number card says Disconnected from WhatsApp > > Meta no longer accepts QwryAI's access to the number, for example after the number was removed in WhatsApp Manager. Open the number's menu and select **Reconnect** to connect it again. > [accordion] The agent stopped replying in one conversation > > Check whether the conversation has an open ticket or was taken over: the AI stays quiet until the ticket is closed or the conversation is handed back. A conversation can also be paused from the **Inbox** with **Pause AI**, or by [spam detection](/docs/user-guides/chatbot/guardrails). If the agent is silent on every chat, check that the number's switch is on. > [accordion] You can't send a free-form reply > > The 24-hour window has closed. The **Inbox** shows *The 24-hour reply window has closed* with **Choose template**: send an approved [template](/docs/user-guides/integrations/whatsapp-templates) instead. > [accordion] Template or campaign messages fail > > Check that the contact has a valid WhatsApp number, that the template is still approved, and that a payment method is set in Meta Business Suite. See [WhatsApp campaigns](/docs/user-guides/chatbot/outbound-whatsapp). ## Frequently asked questions > [accordion] Can I keep using my number in the WhatsApp Business app? > > Yes, with [WhatsApp Business app coexistence](/docs/user-guides/integrations/whatsapp-coexistence). Your agent and the app share the number, and replying from the app pauses the AI in that chat. > [accordion] Can the agent message customers first? > > Only with an approved template: one customer at a time from the **Inbox**, many at once with [WhatsApp campaigns](/docs/user-guides/chatbot/outbound-whatsapp), or automatically for Shopify orders with [WhatsApp Automations](/docs/user-guides/integrations/whatsapp-automations). > [accordion] How much does WhatsApp cost? > > Your agent's replies use QwryAI message credits based on its model. Meta separately bills your WhatsApp Business account for messages, including each template message. See [Messaging limits and billing](#messaging-limits-and-billing). > [accordion] Can I connect more than one number? > > Yes. Select **Connect a new number** on the **Connection** tab. Lead collection and response delay are set per number. ## Next steps > [card] WhatsApp Templates | /docs/user-guides/integrations/whatsapp-templates | Reach customers after the 24-hour window with templates Meta has approved. > [card] WhatsApp Automations | /docs/user-guides/integrations/whatsapp-automations | Send a template automatically for every new Shopify order.