# 1. Messaging with Teachers

User Type: **Parent**
Source: *Mi Digital Academy - Education CRM Features Document*

---

## 1. Messaging with Teachers

### 1.1 Send a Message to a Teacher
**What it does:** Lets the Parent send a message to the child's teacher. The Parent selects the teacher, writes the message, and sends it. The teacher receives the message within the platform and can reply. This gives the Parent a direct channel to communicate with the teacher.

**Sub-features:**
- Send a message to the child's teacher
- Select the teacher to message
- Message with text
- Message delivery confirmation
- Message thread with the teacher
- Messaging available on web and mobile
- Message event logging (sent, delivered)
- Audit logging of the send a message to a teacher

**Parent User Journey:**
1. Parent opens the teacher communication section.
2. Parent selects the child's teacher.
3. Parent writes a message.
4. The message is sent.
5. A delivery confirmation is shown.
6. The message thread with the teacher is shown.
7. Parent opens Profile → "Activity" and confirms the message events are recorded.

**Rules & Edge Cases:**
- The message is sent to the child's teacher.
- A delivery confirmation is shown.
- The message thread is retained.
- Message events (sent, delivered) are logged with the account and the timestamp.
- The send a message to a teacher is audit-logged with the account and the timestamp.

### 1.2 Message Threads and History
**What it does:** Keeps the Parent's message threads with teachers organized. The Parent sees all conversations with each teacher, can search within threads, and can view the full history. The threads are retained for a platform-defined period. This gives the Parent a record of their communication with the teachers.

**Sub-features:**
- Message threads with each teacher
- Search within threads
- Full message history
- Unread message indicator
- Thread archived state
- History available on web and mobile
- History event logging (viewed, searched)
- Audit logging of the message threads and history

**Parent User Journey:**
1. Parent opens the teacher message threads.
2. The threads with each teacher are listed.
3. Parent searches within a thread.
4. The full message history is shown.
5. An unread message indicator is shown.
6. A thread is archived.
7. Parent opens Profile → "Activity" and confirms the history events are recorded.

**Rules & Edge Cases:**
- The threads are per teacher.
- The search is within threads.
- An unread indicator is shown for new messages.
- History events (viewed, searched) are logged with the account and the timestamp.
- The message threads and history is audit-logged with the account and the timestamp.

### 1.3 Message Notifications
**What it does:** Notifies the Parent when a teacher sends a message or replies. The Parent is notified in-app and, where enabled, by email or push. The notification links to the message thread. This keeps the Parent aware of teacher communication.

**Sub-features:**
- Notification on a new teacher message
- Notification on a teacher reply
- In-app, email, and push channels
- Notification links to the thread
- Notification preferences for teacher messages
- Notification event logging (sent, opened)
- Audit logging of the message notifications

**Parent User Journey:**
1. A teacher sends a message; the Parent is notified.
2. A teacher replies; the Parent is notified.
3. The notifications are in-app, email, and push.
4. Parent taps a notification; the thread opens.
5. Parent sets the notification preferences for teacher messages.
6. The notification events are recorded.
7. Parent opens Profile → "Activity" and confirms the notification events are recorded.

**Rules & Edge Cases:**
- Notifications are sent on new teacher messages and replies.
- The notification channels are in-app, email, and push.
- A notification links to the thread.
- Notification events (sent, opened) are logged with the account and the timestamp.
- The message notifications is audit-logged with the account and the timestamp.
