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

# WhatsApp

> Appointment management and FAQs via WhatsApp: how MarIA attends patients through messaging

In addition to voice calls, MarIA handles inbound **WhatsApp** conversations. The patient messages the center's number and the agent responds, manages appointments, and resolves frequent queries the same way it would over the phone.

## Capabilities via WhatsApp

| Capability               | Description                                                                               |
| ------------------------ | ----------------------------------------------------------------------------------------- |
| **Schedule appointment** | Patient requests appointment, MarIA queries the EHR and confirms in the same conversation |
| **Cancel appointment**   | Patient indicates which appointment to cancel; MarIA cancels it in the EHR                |
| **Modify appointment**   | Combines cancellation and new scheduling in the conversation thread                       |
| **Center FAQs**          | Answers questions about schedules, locations, coverage, and specialties                   |
| **Escalation to human**  | Transfers the chat to a human agent with full context when needed                         |

## Outbound notifications

MarIA can also proactively send messages to patients via WhatsApp:

* **Appointment confirmation**: immediately after scheduling (by phone or WhatsApp).
* **Appointment reminder**: 24 to 48 hours before the appointment to reduce no shows.

Both notifications are sent using Meta approved templates. Contact [support@omniloy.com](mailto:support@omniloy.com) to set up or add templates.

## Inbound conversation flow

```mermaid theme={null}
sequenceDiagram
  autonumber
  participant P as Patient (WhatsApp)
  participant M as MarIA
  participant E as EHR/HIS

  P->>M: "I'd like to book a cardiology appointment"
  M-->>P: "Which center do you prefer?"
  P-->>M: Indicates the center
  M->>E: appointment.getBenefits / getSlots
  E-->>M: Availability
  M-->>P: Proposes date and time options
  P-->>M: Confirms
  M->>E: appointment.create
  E-->>M: appointmentId confirmed
  M-->>P: Appointment confirmed + WhatsApp confirmation
```

## WhatsApp APIs

Appointment management through WhatsApp uses MarIA shared API contracts. See [APIs: Webhook events](/maria/en/webhooks-eventos) and [APIs: EHR integrations](/maria/en/integraciones-ehr) for applicable events and contracts.

## FAQ knowledge base

Frequent questions are answered using documents indexed at `POST /faq/documents`. The same knowledge corpus is used for both voice calls and WhatsApp conversations. Keep documents up to date with information about centers, coverage, schedules, and specialties.

## HMAC signatures on webhooks

MarIA webhooks are signed with `HMAC-SHA256`. Header `X-Integration-Signature: sha256=<hex>` computed over the RAW body. See [HMAC Signature Verification](/maria/en/webhooks-firmas).
