One connected system: an AI ad dashboard, a WhatsApp chatbot, and the clinic CRM.
A four-branch pain-treatment clinic ran its ads, its patient chats, and its clinic operations in three separate places, with no line from ad spend to a booked patient. Autoflow built the connected system: an AI marketing dashboard, an AI WhatsApp chatbot, and a clinic CRM that share one attribution spine.
The challenge
Yap Chan Kor is a Malaysian pain-treatment clinic chain across four branches (Ampang, Old Klang Road, Shah Alam, Subang Jaya), serving patients in English, Malay, and Chinese.
Three things ran in three separate places. Ad spend lived in Google and Meta. Patient conversations lived in WhatsApp. Clinic operations lived in an off-the-shelf system the clinic could not shape. Nothing connected them, so no one could draw a line from a ringgit of ad spend to a booked, paying patient.
How the pieces connect
Campaigns bring patients in. The chatbot books them. The CRM records what happens, tagged back to the campaign that paid for it.
Autoflow’s role
Autoflow Solutions designed and built the full system end to end: discovery, architecture, all three applications, the automation layer that connects them, migration off the clinic’s old software, and deployment.
Constraints
- The build had to connect three tools that normally never talk: two ad platforms, a WhatsApp bot, and a clinic database.
- It is the system of record for both care and money across four branches, so reliability came before features.
- Patients speak three languages, so the bot, the CRM, and the patient guides all had to work in English, Malay, and Chinese.
- An AI touching live ad accounts and patient data needed hard guardrails, not blind trust.
How we built it
- 01
One attribution spine across all three tools
We tied every step together. An ad click carries its campaign tags into the WhatsApp chat, the chatbot books the patient, and the booking lands in the CRM still tagged to the campaign that paid for it. For the first time the clinic can see which ad produced which patient.
- 02
The chatbot touches the CRM only through a locked-down contract
The bot reads and writes patient data through a small set of server-side functions, never the database directly. A returning-patient lookup needs both phone and full name and never echoes stored details back, so the chat cannot be used to fish for who is a patient.
- 03
A guardrail layer between the AI and the live ad accounts
The dashboard’s AI proposes changes, but every recommendation is graded eligible, manual-only, or suppressed before anything reaches the live Google or Meta account. Entity IDs are validated and changes can be rolled back, so the AI can optimise without spending money by mistake.
What we delivered
- AI marketing dashboard (AdsPulse): Google and Meta ads in one place, an AI planner that ranks optimisations, and a guardrailed executor that applies approved changes through the ad APIs.
- AI WhatsApp chatbot (ManyChat + Make.com) backed by a retrieval knowledge base: answers pain-condition questions, captures and attributes ad leads, looks up returning patients, and books, reschedules, or cancels appointments.
- Clinic CRM (Supabase PWA) replacing the old system across four branches: patient records, scheduling, clinical session capture with pain scores and a body diagram, invoicing, and reporting.
- Multilingual marketing website (Next.js) in English, Malay, and Chinese, with dedicated ad landing pages.
- Malaysia LHDN e-invoicing service and a full data migration off the incumbent clinic system.
- Trilingual new-patient recovery guides, delivered automatically by the chatbot after a patient’s first plan.
Evidence
Want a system your business actually owns?
Tell us what breaks or slows you down. If a build makes sense, we will tell you. If it does not, we will tell you that too.