Gap: Email & SMS Template Management
Status: 🔴 Not Started Priority: Important (Pre-Scale) Estimated Effort: 2-3 days
What's Missing
Complete email and SMS system documentation including:
Template Management
- How templates are stored (files vs. database)
- Template versioning
- Organization-specific templates
- Multi-language support
- Preview/testing mechanism
Template Engine
- Which templating engine (Go templates, Handlebars, etc.)
- Variable interpolation syntax
- Conditional logic
- Loops and helpers
- HTML vs. plain text emails
Available Templates
- Welcome email
- Appointment confirmation
- Appointment reminder
- Password reset
- Form completion request
- Marketing emails (if any)
Variable Catalog
- Available variables per template type
- Patient variables (name, email, etc.)
- Appointment variables (time, specialist, etc.)
- Organization variables (name, logo, etc.)
Email Service Integration
- Which service (SendGrid, AWS SES, Postmark, etc.)
- Authentication and configuration
- Error handling and retries
- Bounce and complaint handling
- Unsubscribe mechanism
SMS Service Integration
- Which service (Twilio, AWS SNS, etc.)
- Phone number validation
- International SMS support
- Character limits and encoding
- Opt-out handling
Why Important
- Automations Feature - References sending emails/SMS but no templates
- User Communication - Critical for user engagement
- Compliance - GDPR requires unsubscribe mechanism
- Branding - Templates represent organization's brand
Current State
- Automations feature references
send_emailandsend_smsactions - No template system documented
- No email/SMS service specified
- No variable catalog
Recommended Location
docs/features/communications/ directory with:
README.md- Communications overviewemail-templates.md- Email template systemsms-templates.md- SMS template systemvariables.md- Available variablesintegrations.md- Email/SMS service integration
Success Criteria
- [ ] Template storage strategy decided
- [ ] Template engine selected
- [ ] Available templates documented
- [ ] Variable catalog created
- [ ] Email service integration documented
- [ ] SMS service integration documented
- [ ] Unsubscribe mechanism implemented