Appearance
SMS Campaigns & Messaging
EaseLab integrates patient notifications through SMS, with campaign history, delivery logging, and quick-send shortcuts from the invoice workflow.
| Screen | Route | Permission |
|---|---|---|
| SMS Campaign / Log | /admin/sms-campaign | sms_log |
| Messaging Test | /admin/messaging-test | quick.send_sms |
Messaging architecture
mermaid
flowchart TB
subgraph Triggers
INV[Invoice events]
RES[Results ready]
CAM[Campaign batch]
MAN[Manual quick send]
end
subgraph EaseLab
MSG[Messaging service]
LOG[SMS log]
end
subgraph Gateway
SMS[SMS provider API]
end
INV --> MSG
RES --> MSG
CAM --> MSG
MAN --> MSG
MSG --> SMS
MSG --> LOGSMS log and campaigns
The SMS Log module (sms_log) provides:
| Capability | Description |
|---|---|
| Delivery history | Per-message status and timestamp |
| Campaign batches | Marketing or reminder blasts |
| Recipient filters | Patients, referral groups, date ranges |
| Template preview | Variable substitution before send |
| Failure reasons | Gateway errors for retry |
Campaign workflow
- Configure SMS gateway in Lab Settings (
settings.edit). - Open Admin → SMS Campaign.
- Compose message with placeholders (
{patientName},{reportLink}, etc.). - Select audience — verify consent and local regulations.
- Schedule or send immediately.
- Review delivery report in SMS log.
Regulatory compliance
Obtain patient consent for marketing SMS. Transactional messages (results ready, appointment reminders) typically require opt-out support per local telecom rules.
Quick Access messaging permissions
High-frequency actions from invoice and results screens:
| Code | Channel |
|---|---|
quick.send_sms | SMS |
quick.send_whatsapp | WhatsApp (when configured) |
quick.send_email |
Grant only to reception and authorized clinicians. Technicians may need quick.send_sms for critical value callbacks — define policy explicitly.
mermaid
sequenceDiagram
participant Reception
participant EaseLab
participant Patient
Reception->>EaseLab: Results verified
Reception->>EaseLab: Quick send SMS
EaseLab->>Patient: Report ready + link
EaseLab->>EaseLab: Log to sms_logMessaging test screen
Before go-live, use Messaging Test (/admin/messaging-test):
- Requires
quick.send_sms. - Send to a staff mobile number.
- Confirm delivery and sender ID.
- Adjust gateway credentials if failed.
Sender ID registration
Many countries require pre-registered alphanumeric sender IDs. Complete provider paperwork before marketing campaigns.
Message templates
Recommended templates:
| Event | Template elements |
|---|---|
| Report ready | Lab name, patient name, public lookup URL |
| Invoice receipt | Amount paid, balance due |
| Home collection | Phlebotomist ETA, preparation instructions |
| Payment reminder | Due amount, payment link |
Store templates in lab settings for consistency across staff.
Integration with CRM and referrals
- CRM wins may trigger welcome SMS batches
- Referral doctors can receive weekly volume summaries (manual export + campaign)
- Link campaign UTM parameters on public URLs for attribution
Permissions summary
| Task | Permission |
|---|---|
| View SMS history | sms_log.view |
| Create campaign | sms_log.create |
| Edit draft campaign | sms_log.edit |
| Delete campaign draft | sms_log.delete |
| Send from invoice | quick.send_sms |
Troubleshooting
| Symptom | Check |
|---|---|
| All sends fail | Gateway API key, credit balance |
| Intermittent failures | Provider rate limits |
| Wrong patient name | Template variable mapping |
| 403 on send | Read-only mode or missing quick permission |
| Messages not logged | sms_log.view for viewer account |
Cost management
| Practice | Benefit |
|---|---|
| Batch non-urgent reminders | Lower per-message cost |
| Validate phone on registration | Reduces failed sends |
| Use email for lengthy content | SMS segment charges |