> For the complete documentation index, see [llms.txt](https://docs.physiqo.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.physiqo.in/04-product/prd-4.md).

# WhatsApp

## WhatsApp Module

***

## 1. Purpose

The WhatsApp Module enables patients and physiotherapists to interact with the PhysiQo platform through the official WhatsApp Business account.

The objective is to provide a fast, conversational and mobile-first experience while minimizing manual customer support.

***

## 2. Business Objectives

The WhatsApp Module shall:

* Simplify appointment booking.
* Reduce customer support workload.
* Automate onboarding.
* Provide instant booking updates.
* Deliver payment links.
* Improve booking conversion.
* Improve patient engagement.

***

## 3. Supported Users

Current

* Patient
* Physiotherapist

Future

* Customer Support
* Corporate Partners

***

## 4. Supported Features

Current

* OTP Verification
* Patient Onboarding
* Physiotherapist Onboarding
* Booking
* Payment Link Sharing
* Booking Confirmation
* Booking Status
* Assignment Notification

Future

* AI Exercise Guidance
* Voice Messages
* Image Upload
* Report Sharing
* Live Human Support

***

## 5. Patient Conversation Flow

1. User sends "Hi"
2. AI welcomes the user.
3. User selects Patient.
4. OTP verification.
5. Patient profile completion (first-time users only).
6. Booking details collected.
7. Payment link shared.
8. Payment verified.
9. Booking confirmed.
10. Physiotherapist assigned.
11. Appointment reminders.
12. Review request after treatment.

```mermaid
flowchart TD

A[User Sends Hi]

A --> B[AI Welcome]

B --> C[Select Patient]

C --> D[OTP Verification]

D --> E[Complete Profile]

E --> F[Collect Booking Details]

F --> G[Generate Payment Link]

G --> H[Payment Success]

H --> I[Assign Physio]

I --> J[Booking Confirmed]

J --> K[Treatment]

K --> L[Review Request]
```

***

## 6. Physiotherapist Conversation Flow

1. Register
2. OTP Verification
3. Complete KYC
4. Upload Documents
5. Admin Verification
6. Approval
7. Receive Assignments
8. Accept / Reject Booking
9. Complete Treatment
10. Settlement Notification

***

## 7. Conversation State Management

Each WhatsApp conversation shall maintain a session state.

Examples include:

* NEW\_USER
* ROLE\_SELECTION
* OTP\_VERIFICATION
* PROFILE\_COMPLETION
* BOOKING\_DETAILS
* PAYMENT\_PENDING
* PAYMENT\_VERIFIED
* ASSIGNMENT\_IN\_PROGRESS
* BOOKING\_CONFIRMED
* COMPLETED

Session state shall persist until the workflow is completed or expires.

***

## 8. AI Responsibilities

The AI Assistant may:

* Guide onboarding.
* Collect booking details.
* Answer FAQs.
* Share booking status.
* Provide payment instructions.
* Assist with rescheduling.

The AI Assistant shall not:

* Diagnose diseases.
* Prescribe medicines.
* Recommend medications.
* Handle emergency medical situations.

***

## 9. Backend Mapping

Controllers

* WhatsAppWebhookController

Services

* MessageRouter
* OnboardingService
* ConversationSessionService
* BookingService
* NotificationService

Entities

* ConversationSession
* Booking
* User
* Patient
* Physio

***

## 10. Future Enhancements

* Voice Conversation
* Image Recognition
* AI Recovery Coach
* Multi-language Support
* Live Agent Handover
* Appointment Modification

***

## Related Documents

* Authentication PRD
* Booking PRD
* Notification PRD
* User Journey
* Business Rules

***

Status

Draft


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.physiqo.in/04-product/prd-4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
