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

# WhatsApp through your own provider

> Send Flabs reports and bills from your lab's own WhatsApp number, using any WhatsApp provider.

By default, Flabs sends report and bill WhatsApp messages from the Flabs number (or your AiSensy account), and the CRM / Bookings page opens WhatsApp with its booking and quotation messages. If your lab uses **another WhatsApp provider** (Wati, Interakt, Gupshup, Meta Cloud API, …), they can go out **from your own number** instead.

## How it works

```mermaid theme={null}
sequenceDiagram
    participant U as Lab user
    participant F as Flabs
    participant W as Your webhook
    participant P as Your WhatsApp provider
    U->>F: Send report / bill
    F->>W: POST report.send / bill.send
    W->>P: Send template message
    W-->>F: 200
    Note over F: On failure, Flabs retries<br/>(like every webhook)
```

1. [Register](/whatsapp/register-webhook) your webhook URL (once per branch).
2. Add the [templates](/whatsapp/templates) to your provider.
3. When your staff click **Send**, Flabs posts the [event](/whatsapp/payload) to your webhook, which sends the WhatsApp. Flabs itself sends nothing for that message.

## Events

| Message | Event | Sent to |
| - | - | - |
| Report to patient | `report.send` | Patient |
| Report due reminder | `report.send` | Patient |
| Report to B2B centre | `report.send` | B2B centre |
| Report to doctor | `report.send` | Referring doctor |
| Bill to patient | `bill.send` | Patient |
| Patient Booking Confirmation (CRM, Bookings) | `booking.send` | Patient |
| Phlebotomist Booking Details (CRM, Bookings) | `phlebotomist.send` | Phlebotomist |
| Patient Quotation (CRM leads) | `quotation.send` | Patient |

## Key rules

* An event is sent only where Flabs would send a WhatsApp anyway.
* These are ordinary Flabs webhook events: registered, authenticated, delivered and retried exactly like `bill.completed` (see [Webhooks](/webhooks/introduction)).
* Once your webhook is subscribed to an event, only your provider sends that message. If your webhook fails, Flabs retries it; it does not fall back to the Flabs number or AiSensy.
* Register each WhatsApp event on **one** webhook per branch. Every webhook that includes an event receives it, so the same event on two webhooks sends the message twice (see [Register](/whatsapp/register-webhook)).
* Messages you have not subscribed to keep going out the normal way (AiSensy if configured, otherwise the Flabs number).
* Bill and report messages carry the bill's `billID`; CRM messages carry the lead's `leadID`. Both stay the same on every resend.

To get started, see [Connect Your WhatsApp Provider](/whatsapp/connect-your-provider).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.