How the connection works
A Zalo OA chatbot is a small program on your server that Zalo talks to. When a customer writes to your OA, Zalo sends the message to an address you registered, called a webhook. Your server passes the text to the AI model together with your own data: prices, opening hours, service list or booking slots.
The AI drafts a reply, your server checks it against your rules, and then sends it back through the Zalo OA API. The customer sees the answer in the same chat, under your OA name. Your staff can still open the conversation in the OA inbox and reply by hand.
- Zalo: delivers messages to your webhook and sends replies from your OA
- Your server: holds the rules, the data and the access keys
- AI model: reads the question and drafts the answer
- Your systems: calendar, CRM or spreadsheet the bot reads from or writes to
Step 1. Check the OA and who owns the access
Start with ownership. The OA should belong to your company, not to a former employee or an agency account. Find out who is the admin and whether the OA has the verification level Zalo asks for API features.
Write down which phone number and personal Zalo account control the OA. Losing that account later can lock you out of the developer app as well.
Verification rules and the API features open to each OA type are set by Zalo. We read the current Zalo documentation for your case instead of relying on memory.
Step 2. Register a developer app and link it to the OA
On the Zalo developer platform you create an app, link it to your OA and request the permissions it needs, for example reading and sending OA messages. The OA admin approves the link.
The app gives you keys. Treat them like passwords: store them on the server, never in a shared document or in the chat with your developer.
Step 3. Set up the webhook and a test path
The webhook is a public HTTPS address on your server that receives events from Zalo: new message, follow, unfollow. Zalo needs to reach it at all times, so it should not run on a laptop.
Before real customers see the bot, test it with staff accounts. Check that the server answers Zalo quickly and that one message never produces two replies.
Step 4. Connect the AI and your data
The bot is only as good as the data it can read. Give it a short, current source: a price sheet, a list of services with durations, a booking calendar. Long PDFs and old brochures produce confident but wrong answers.
Write explicit limits into the rules: what the bot never promises (discounts, medical advice, delivery dates it cannot see), and which words send the chat to a person.
- One source of truth for prices and hours
- A list of topics the bot must not answer
- A short tone guide in Vietnamese and English
- A log of every reply for review
Step 5. Respect Zalo's messaging rules
An OA cannot message people freely. Replies inside an active conversation are treated differently from messages the OA starts on its own, and notifications by phone number go through ZNS with approved templates and a fee.
Design the bot to answer, not to chase. Reminders and follow-ups that go outside the conversation window are a separate decision with its own cost; see the comparison of OA messages and ZNS.
Rules and fees for OA messages and ZNS change. We confirm the current conditions with the Zalo documentation on the audit.
Step 6. Decide when a person takes over
Every chatbot needs an exit. Typical triggers: the customer asks for a person, the question is about a complaint or a refund, the bot is not sure, or the topic is on the forbidden list.
When the bot hands over, it tells the customer who will answer and roughly when, and it alerts your staff in the channel they actually watch. A hand-off that nobody sees is worse than no bot.
After launch: what to check each week
Read a sample of conversations every week for the first month. Look for questions the bot answered wrongly, questions it should have passed on, and gaps in your price list.
Update the data source rather than adding exceptions to the code. Most fixes are a line in the price sheet or a new rule about what to hand over.