Building an LLM-powered WhatsApp Business API chatbot starts with securing API access through Meta or an approved Business Solution Provider, then connecting incoming and outgoing messages to a backend service that routes each customer message to a large language model grounded in your knowledge base. WhatsApp's rules matter as much as the AI architecture: you can only send free-form messages within a 24-hour window after the customer last messaged you, and any outbound message outside that window must use a pre-approved message template, so your conversation design needs to account for this constraint rather than assume open-ended chat like a website widget. The LLM layer should retrieve from your help center and order systems, maintain conversation state per phone number, and hand off to a human agent through the same thread when confidence is low or the customer asks for one. Media handling, since customers frequently send images of receipts or damaged products, and multilingual support, since WhatsApp is dominant in markets with diverse languages, are common early requirements rather than later additions. Nanobase AI builds these WhatsApp integrations with the messaging window and template rules handled correctly from day one.
Design the conversation around WhatsApp's rules, not the other way around
Teams that design a WhatsApp bot's conversation flow first and only think about the platform's messaging rules during integration tend to discover late that a core part of their design, following up with a customer after 24 hours, is not simply a matter of sending another message. The 24-hour session window is a hard platform constraint, not a configuration option, so conversation design and technical architecture both need to account for it from the first draft.
Session messages versus template messages
| Message type | When it applies | Constraints |
|---|---|---|
| Session message | Within 24 hours of the customer's last message | Free-form text, can include the LLM's generated response directly |
| Template message | Outside the 24-hour window, or initiating contact | Must use a pre-approved template with fixed structure, approved by Meta in advance |
This distinction shapes the architecture: any workflow where the bot needs to follow up after a delay, a refund confirmation that takes longer than 24 hours to process, for example, needs a pre-approved template ready to send, since the LLM cannot simply generate free text once the window has closed.
The technical build sequence
- Secure API access through Meta directly or an approved Business Solution Provider, and register your business phone number.
- Stand up a webhook receiver that ingests incoming messages and routes each one, by phone number, to a session state store that tracks conversation history and window status.
- Connect the LLM layer to retrieval, grounding responses in your help center and order systems the same way a web chatbot would, rather than treating WhatsApp as a separate knowledge source.
- Design and submit message templates for every scenario that might need contact outside the 24-hour window, since template approval by Meta can take time and should not block launch.
- Add media handling for images customers send, receipts, damaged product photos, since this is a common early request on WhatsApp specifically.
- Build the human handoff path within the same WhatsApp thread, so escalation does not require the customer to switch channels.
Why multilingual support tends to surface early on WhatsApp
WhatsApp adoption skews heavily toward markets outside North America where it is the dominant messaging channel, which means multilingual support is often a day-one requirement rather than a later expansion, unlike a web chat widget where English-first is a more common starting point. Building the retrieval and response generation to handle the target languages from the start, rather than bolting on translation later, avoids a second integration pass; the approach for Turkish, German and Arabic specifically generalizes to most WhatsApp-heavy language combinations.
Frequently asked questions
Can the LLM generate a response inside a template message?
No, template messages have a fixed, pre-approved structure with limited variable substitution slots, so the LLM's role there is populating those variables rather than generating free-form text, which is only possible within a session message.
How long does WhatsApp template approval take?
It varies, but treat it as a process that runs in parallel with development rather than a final step, since waiting until the bot is otherwise ready to submit templates can delay launch unnecessarily.
Do we need a separate WhatsApp-specific knowledge base?
No, the same retrieval-grounded knowledge base used for web chat or other channels should serve WhatsApp, keeping answers consistent across channels rather than maintaining duplicate content.
What happens if a customer messages again after the 24-hour window closes?
That new message reopens a fresh 24-hour session window, so the constraint only affects business-initiated follow-ups, not the customer's ability to continue the conversation whenever they choose to message again.
How Nanobase AI helps
Nanobase AI builds these WhatsApp integrations with the session window and template approval process handled correctly from day one, connecting the same retrieval-grounded LLM used across other channels rather than building WhatsApp as an isolated system. This work is frequently paired with evaluating which vendor or team should build the bot when a company is scoping the project for the first time, based in Silicon Valley with experience across regional WhatsApp deployments.
Ready to discuss your project? Contact Nanobase AI or email hello@bumu.tech.