> ## Documentation Index
> Fetch the complete documentation index at: https://q.odontox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Up WhatsApp End To End

> Setting up WhatsApp once means appointments confirm, reminders fire, and patients can reschedule themselves — all without copy-pasting into chat.

Setting up WhatsApp once means appointments confirm, reminders fire, and patients can reschedule themselves — all without your team copy-pasting into the chat. This guide is the day-one setup; the in-product reference for the same features lives at `/admin/whatsapp`.

## What you will set up

* Confirmation, reminder, cancellation, reschedule and completed-visit templates, approved by Meta.
* Automations that map every variable into the body, header and URL buttons before they can be saved.
* Inbound media handling (photos, voice notes, GIFs, stickers, PDFs).
* Real delivery and read receipts.
* Patient self-reschedule, including after a cancellation or no-show.
* Inbox access for doctors and receptionists, plus per-tab visibility for staff roles.

## Who can use it

By default, doctors and receptionists can open the inbox, send approved templates and manage quick replies. Doctors see only the patients on their own appointment book. Analytics stays admin-only. The module opens inside the dashboard, so the sidebar and top bar stay visible.

## How it works

* **Lifecycle automation.** WhatsApp messages fire automatically on Confirm, Cancel, No-Show, Reschedule, a new booking request, a new manually-scheduled appointment, and a completed visit (with an optional Google Review survey one day later). Patient name, date, doctor and clinic fill in from the appointment.
* **Automated messages read like real messages.** When an automation fires, the chat thread shows the real rendered text the patient received — not a template placeholder.
* **Approved-only template picker with live preview.** The automations editor lists only Meta-approved templates, grouped by category (Utility / Marketing / Authentication). A live preview shows the full approved template — header, body and buttons — with your chosen variables filled in.
* **Map every variable.** You can wire variables into URL buttons and header text, not just the body. An automation can't be saved until every placeholder is mapped, so it can never silently fail to send.
* **Attach quotations and receipts.** The patient conversation sidebar has **Recent invoices**, **Recent quotations** and **Recent receipts** cards, each with an attach button. One click stages the branded PDF on the composer, and it arrives on the patient's phone as a proper PDF.
* **Conversation window indicator.** The composer shows a "waiting for patient reply" state. WhatsApp's 24-hour window reopens only when the patient messages back — sending an approved template does not reset it. Until they reply, you can send only approved templates.
* **Inbound media renders properly.** Photos, GIFs, voice notes, stickers and PDFs all show in their proper format.
* **Real ticks.** Sent check → delivered double-check → read double-check (blue) on every outbound message. Inbound reads are reported back so the patient sees double-blue on their phone.
* **Markdown.** `*bold*`, `_italic_`, `~strike~` and inline code render in the chat thread, and URLs autolink.
* **Reschedule via WhatsApp, even after a no-show.** Patients reply "reschedule" and pick a new slot; the slot list respects clinic operating hours and the assigned doctor's schedule.
* **Per-tab toggles.** Independently enable or disable the Inbox, Templates, Automations, Quick replies, Analytics and Events tabs inside the WhatsApp module.

## Step by step

<Steps>
  <Step title="Open the WhatsApp module">Connect your WhatsApp Business number using the on-screen flow. The module opens inside the dashboard.</Step>
  <Step title="Submit templates to Meta">On the **Templates** tab, submit each operational template for approval — confirmation, reminder, cancellation, reschedule, completed-visit. Use the OdontoX-provided starter templates if you do not have your own.</Step>
  <Step title="Wait for Meta approval">Templates approved by Meta show as Active in OdontoX and become selectable in the automations editor.</Step>
  <Step title="Build an automation">On the **Automations** tab, pick a template from the category-grouped picker, map every variable into the body, header and any URL buttons, and check the live preview. You can't save until every placeholder is mapped.</Step>
  <Step title="Verify the inbox">Confirm it shows inbound media properly — photos, voice notes, GIFs — and that automated messages display the real text the patient received.</Step>
  <Step title="Test billing attachments">Open a patient thread and attach a quotation, receipt or invoice from the sidebar cards. Confirm the branded PDF arrives on the patient's phone.</Step>
  <Step title="Test patient self-reschedule">Reply "reschedule" to one of your test bookings. The bot should offer slots based on the clinic's operating hours and the doctor's schedule.</Step>
  <Step title="Configure per-tab toggles">Hide tabs that specific roles do not need. Receptionists usually want Inbox and Quick replies; admins keep everything visible.</Step>
</Steps>

## Need help?

If anything is unclear, write to [support@odontox.io](mailto:support@odontox.io) or open a ticket from **Settings → Support**.
