Documentation
WhatsApp Business Setup

WhatsApp Database Chatbot: Twilio Setup and Costs

AskYourDatabase can route WhatsApp text questions to a configured database chatbot through Twilio. Start with the WhatsApp destination and access instructions in your chatbot dashboard. Adding an authorized user is different from connecting a new business sender: custom numbers require a confirmed provisioning arrangement, not just a webhook URL.

Reviewed October 11, 2026. This guide covers the current AYD channel workflow and the checks for a custom Twilio setup. It does not promise automatic approval, a fixed setup time, or universal support for every Twilio feature.

Choose a setup path

Your taskActionEvidence before continuing
Let a colleague message an existing chatbotUse its WhatsApp tab, add the colleague's number, and follow the displayed destination instructionsCorrect chatbot and approved user mapping
Use your own business numberConfirm provisioning with AskYourDatabase before buying, registering, or migrating a numberAgreed sender, account owner, reply route, and billing owner
Build a standalone WhatsApp botFollow Twilio's quickstart (opens in a new tab)Your own application and delivery handling; this does not connect an AYD chatbot
Query private customer recordsFirst review the channel's authorization and processing pathApproved data scope and successful isolation checks

The distinction matters because the current AYD WhatsApp dashboard registers people who may use the chatbot. The deployed service supplies the Twilio account and outbound sender configuration. A sender registered in a separate Twilio account is not automatically available to that service. Do not paste Twilio credentials into a chatbot conversation, training document, or customer-name field.

1. Prepare the chatbot

Create a chatbot, connect an approved database, and add the definitions it needs through training and schema context. Use a database identity restricted to the reporting views your users may read.

Validate a simple answer in the web interface first. For example, with a synthetic reporting view containing Warehouse A rows of 12 and 8 units, the question “How many units are available in Warehouse A?” should total 20. A follow-up such as “Only the first item” should return 12, while retaining the warehouse scope. These are illustrative expected answers, not measurements of AYD accuracy.

Keep the expected rows and definitions alongside the test. If the web answer is wrong, changing the messaging channel will not repair ambiguous column meanings or an incorrect metric definition. The text-to-SQL evaluation guide explains how to compare generated answers with a reference.

2. Add approved users

Open your chatbot's WhatsApp tab and add each approved user's name and phone number. Use an international number with the country code, such as +15551234567 as a format example; do not include spaces or punctuation beyond the leading plus sign.

This is the user's number, not the bot's business sender. Ask the user to message the destination currently displayed in your dashboard or confirmed for your deployment. Avoid copying a destination from an old screenshot or another account.

Check the mapping before a pilot, especially if the same person uses multiple chatbots. Do not assume that a phone number automatically selects the right customer, tenant, or chatbot in every deployment. Confirm how removal and reassignment work before enabling real customer records.

3. Custom senders

If your agreed deployment uses your own sender, assign one owner to Twilio registration and another to application configuration. They may be the same person, but both responsibilities must be covered.

For a direct Twilio customer, WhatsApp Self Sign-up (opens in a new tab) requires an upgraded account, the necessary Meta Business Portfolio access, and an eligible number that can complete verification. Existing numbers may need a migration path; check current provider instructions before changing a working messaging service. Business verification and sender registration are separate from AYD configuration. Approval timing varies; do not schedule launch around a guaranteed number of days.

Once the provisioning path is agreed, the deployment owner confirms:

  • Which Twilio account and registered business sender the application uses for replies.
  • Which HTTPS endpoint receives incoming messages, and whether it belongs to the intended environment.
  • Who maintains credentials, billing, delivery logs, and incident handling.
  • How approved WhatsApp users map to the intended database chatbot.

For the hosted AYD route, the documented inbound endpoint is:

https://www.askyourdatabase.com/api/whatsapp/webhook
Method: POST
Request format: application/x-www-form-urlencoded

Use it only as part of the confirmed hosted setup. Private deployments need their own agreed endpoint. Pointing an arbitrary sender at this URL does not provision the outbound account or establish customer isolation.

4. Messaging costs

Twilio's WhatsApp pricing (opens in a new tab), checked October 11, lists a $0.005 fee per inbound or outbound message, plus applicable Meta template fees. The 24-hour customer service window starts after a user message. Meta waives free-form and utility template fees within that window; marketing and authentication templates may still incur Meta charges. Twilio's fee remains separate.

An illustrative pilot with 100 inbound messages and 120 outbound messages therefore has 220 × $0.005 = $1.10 in Twilio message fees at that listed rate. This excludes Meta charges, number rental, taxes, application subscriptions, and any separately agreed infrastructure or model costs. Count billable inbound and outbound messages rather than user questions: the current AYD implementation can split a long reply into multiple messages.

Use current rates for the destination, template category, and account. Do not assume a recurring free-message allowance. Check AYD plans and confirm channel availability and any custom provisioning charges before committing a budget.

Download the blank WhatsApp pilot record to record sender ownership, expected answers, observed delivery, and actual cost. This is a planning aid, not an AYD import or a provider invoice calculator.

5. Pilot checks

Run a small pilot with synthetic data and authorized test users before broad rollout. Record each layer independently:

TestWhat to recordPassing evidence
Approved user asks the known inventory questionInbound request, chosen chatbot, expected total, actual replyCorrect destination and answer of 20 for the stated fixture
User asks a scoped follow-upRetained warehouse filter and selected itemAnswer of 12 for the stated first item
Unregistered test user sends a questionAccess decision and any returned contentNo database results disclosed
A second approved test user asks for another user's recordsEffective database and application permissionsOnly the data that user is authorized to read
Reply fails to arriveOutbound delivery status and provider error detailsFailure is visible and assigned to an owner
A number is removed or reassignedOld conversation and new-message behaviorAccess and routing match the approved policy

These are acceptance criteria, not claims that these tests have been run against your deployment. The WhatsApp channel is currently text-oriented; do not expect image/chart parity with the web interface. Use the embedded web chatbot guide when visual or in-app exploration is the actual requirement.

Troubleshooting

No inbound request: verify the active sender and endpoint in Twilio. If registration is incomplete, resolve the provider's reported issue before changing chatbot prompts.

Inbound received, user rejected: verify the end user's normalized number and intended chatbot in AYD. Adding the business sender to the customer list does not authorize the end user.

Inbound accepted, no delivered reply: check the configured outbound sender, credentials, applicable messaging window, and delivery error. An HTTP success response from the webhook is not proof of message delivery.

Reply delivered, answer incorrect: inspect the approved database view, metric definition, and actual chatbot context. Reproduce with synthetic data in the web interface before changing access or connection settings.

Template or media requirement: check whether the agreed AYD route implements that capability. Twilio's support for a feature does not establish AYD channel support. Do not build a launch plan around unverified outbound campaigns, buttons, or media.

Security and data flow

Phone registration, sender authenticity, and row access are different controls. Twilio documents request-signature validation (opens in a new tab); ask the deployment owner to confirm and test it on the actual inbound route. This page does not certify that every deployment validates signatures. A phone allowlist by itself does not authenticate a webhook request.

Review database access controls against the real WhatsApp identity path, rather than assuming the web session's properties carry across unchanged. Keep database-side privileges narrow. Prompts and a generated SQL filter alone are not an authorization boundary.

Messages travel through the messaging provider, the application, and the configured model service; content and query results may appear in history or logs. Agree permitted data, processing locations, retention, deletion, and operational access using the security and data-flow guide. Do not describe the full analysis path as end-to-end private or offline merely because the user's interface is WhatsApp.

Next step

For an existing chatbot, follow its WhatsApp tab and complete the synthetic pilot record. For a custom business number or a private-data workflow, confirm the supported deployment before changing the sender. If you are still evaluating database querying, start with the chatbot setup guide and verify one known answer first.

Frequently asked questions

Can I connect my own WhatsApp Business number from the dashboard?

The WhatsApp tab manages authorized user phone numbers. It is not a self-service form for connecting an arbitrary Twilio account or business sender. Confirm the supported provisioning path with AskYourDatabase before registering or migrating a number.

Which phone number goes in the authorized customer list?

Add the end user's WhatsApp number, including its country code, to the intended chatbot. This is different from the business sender that receives messages and sends replies. Use the destination shown in your current dashboard or confirmed deployment instructions.

Are WhatsApp chatbot messages free inside the 24-hour window?

Not necessarily. Meta exempts free-form and utility template messages during the customer service window, but Twilio's messaging fee still applies. Marketing and authentication templates can carry Meta charges. Check the current provider rates and your AskYourDatabase plan separately.

Does WhatsApp access prove that users can only see their own database rows?

No. Phone registration, webhook authenticity, and database authorization are separate checks. Verify the actual WhatsApp user-to-chatbot mapping and data permissions with synthetic users before allowing sensitive queries.

Can users receive the same charts as in the web chatbot?

Do not assume feature parity. The current WhatsApp integration is a text conversation path and its dashboard guidance excludes image display. Use the web interface for visual analysis and verify any required channel capability before rollout.

How should I investigate a message that gets no reply?

Check sender registration and the inbound request in Twilio first, then the authorized user and intended chatbot in AskYourDatabase. Check outbound delivery status separately. A successful webhook response alone does not prove that a reply was delivered or that its database answer was correct.