Skip to content

SMS User Flows

This document outlines the desired SMS notification behaviors from a business process perspective. It contrasts the current implementation with the desired state where all appointment actions trigger consistent notifications.

Current Implementation

In the current DailyDesk implementation, customers receive SMS confirmations only when booking online. Appointments made or changed by receptionists do not trigger notifications, creating an inconsistent experience.

graph TD
    subgraph "Customer Experience"
        A[Customer Books Online] -->|SMS Sent| B(Confirmation Service)
        B --> C[User receives standard confirmation]
    end

    subgraph "Receptionist Experience"
        D[Customer calls Receptionist] --> E[Receptionist creates/updates Ticket]
        E -->|No Trigger| F[No SMS Sent]
        F --> G[Customer unsure of appointment details]
    end

Desired Unified Experience

The goal is to provide a consistent notification experience for the customer, regardless of how the appointment is managed.

Appointment Lifecycle

The following state diagram illustrates the valid states and transitions for an appointment.

graph LR
    %% States
    S(("Scheduled /<br/>Rescheduled /<br/>Multiple Rescheduled"))
    C((Confirmed))
    CI((Checked In))
    TC((Ticket Created))
    X((Canceled))
    Start(( ))
    End(( ))

    %% Actions
    CheckIn[User Checks In]
    Resched[User Reschedules]
    Cancel[User Cancels]
    Confirm[User Confirms]
    CreateTicket[System Creates Ticket]

    %% Flow
    Start --> S

    S --> Confirm --> C

    S --> Resched
    C --> Resched
    Resched --> S

    S --> Cancel
    C --> Cancel
    Cancel --> X

    C --> CheckIn
    S --> CheckIn
    CheckIn --> CI

    CI --> CreateTicket --> TC

    X --> End
    TC --> End

    %% Styles
    classDef state fill:#e1f5fe,stroke:#01579b,stroke-width:2px;
    class S,C,CI,TC,X,Start,End state;

1. Customer Booking Flow (Online)

Standard flow where the customer interacts directly with the booking portal.

%%{init: {'theme':'base', 'themeVariables': {'fontSize':'12px', 'fontFamily':'arial'}, 'flowchart': {'nodeSpacing': 30, 'rankSpacing': 40, 'padding': 10, 'useMaxWidth': true}}}%%
graph TD
    A[Customer] -->|Books Online| B(Online Booking System)
    B -->|Creates Appointment| S1["Appointment Status:<br/>Scheduled"]
    S1 --> D["Send SMS: Initial (w/ Mgmt Link)"]
    D --> A2[Customer]

    A2 -->|Clicks Appointment<br/>Management Link| E{Choose Action}
    E -->|Reschedule| S_Res["Appointment Status:<br/>Rescheduled"]
    E -->|Confirm| S_Conf["Appointment Status:<br/>Confirmed"]
    E -->|Cancel| S_Can["Appointment Status:<br/>Canceled"]

    %% Receptionist Reschedule Flow
    B_Res[Receptionist] -->|Inputs Data| C_Res(Scheduling Tab)
    C_Res -->|Reschedules Appointment| S_Res

    S_Conf --> G1["Send SMS: Confirmed"]
    S_Res -.->|Debounced| G2["Send SMS: Rescheduled"]
    S_Can --> G3["Send SMS: Canceled"]

2. Receptionist Booking Flow (Manual)

New Requirement: When a receptionist books or updates an appointment on behalf of a client, the system must trigger the same notifications, allowing the customer to manage it.

%%{init: {'theme':'base', 'themeVariables': {'fontSize':'12px', 'fontFamily':'arial'}, 'flowchart': {'nodeSpacing': 30, 'rankSpacing': 40, 'padding': 10, 'useMaxWidth': true}}}%%
graph TD
    A[Customer] -->|Calls/Walks-in| B[Receptionist]
    B -->|Inputs Data| C(Scheduling Tab)
    C -->|Creates/Updates Appointment| S2["Appointment Status:<br/>Scheduled"]
    S2 --> E["Send SMS: Initial (w/ Mgmt Link)"]
    E --> A2[Customer]

    A2 -->|Clicks Appointment<br/>Management Link| F{Choose Action}
    F -->|Reschedule| S_Res2["Appointment Status:<br/>Rescheduled"]
    F -->|Confirm| S_Conf2["Appointment Status:<br/>Confirmed"]
    F -->|Cancel| S_Can2["Appointment Status:<br/>Canceled"]

    %% Receptionist Reschedule Flow
    B_Res[Receptionist] -->|Inputs Data| C_Res(Scheduling Tab)
    C_Res -->|Reschedules Appointment| S_Res2

    S_Conf2 --> H1["Send SMS: Confirmed"]
    S_Res2 -.->|Debounced| H2["Send SMS: Rescheduled"]
    S_Can2 --> H3["Send SMS: Canceled"]

3. Automated Reminder Flow (Cron)

Process for sending reminders for upcoming appointments (already implemented).

%%{init: {'theme':'base', 'themeVariables': {'fontSize':'12px', 'fontFamily':'arial'}, 'flowchart': {'nodeSpacing': 30, 'rankSpacing': 40, 'padding': 10, 'useMaxWidth': true}}}%%
graph TD
    A[System Clock] -->|Check every 30 minutes| B{Is SMS Enabled?}
    B -->|Yes| Search[Search Upcoming Appts]
    B -->|No| H[Do Nothing]

    Search --> CheckConf{Appointment<br/>Confirmed?}
    CheckConf -->|Yes| H
    CheckConf -->|No| CheckRem{Reminder Already<br/>Sent?}

    CheckRem -->|Yes| H
    CheckRem -->|No| C{"Matches daysBefore<br/>Config?"}

    C -->|Yes| E{Same Day Appt?}
    C -->|No| H

    E -->|Yes| H
    E -->|No| G[Send Reminder SMS]