Email Notifications Guide
Overview
TrafficPOS supports automated email notifications for important business events, even when operating in offline mode. When an internet connection is available, the system can send email alerts for various business events using EmailJS, a free browser-based email service.
System Architecture
Browser-Based Email
- Client-Side Operation: Emails sent directly from browser
- No Backend Required: Perfect for offline-first operation
- EmailJS Integration: Free, reliable email service
- HTTPS Security: All communication encrypted
- Multiple Providers: Gmail, Outlook, Yahoo support
Queue Management
- Offline Queue: Notifications stored when offline
- Automatic Retry: Failed emails retried with backoff
- Persistent Storage: Queue survives browser restarts
- Smart Processing: Efficient batch sending
- Rate Limiting: Respects EmailJS limits
Real-Time Triggers
- Event-Driven: Immediate notification generation
- Configurable Thresholds: Customizable trigger conditions
- Multiple Events: Various business event types
- Scheduled Reports: Daily summaries and reports
- Smart Filtering: Avoid notification spam
Business Intelligence
- Low Stock Alerts: Inventory management
- High Value Sales: Revenue monitoring
- Daily Summaries: Performance reporting
- System Events: Backup and sync status
- Till Management: Cash handling alerts
Notification Flow Process
Event Detection
Business events trigger notification system (low inventory, high sale, etc.)
Configuration Check
System verifies notifications are enabled for the specific event type
Delivery Decision
If online: send immediately | If offline: queue for later delivery
Automatic Processing
When connection returns, queued emails are sent automatically
EmailJS Setup Process
Create EmailJS Account
- Visit EmailJS.com
- Sign up for a free account (200 emails/month)
- Verify your email address
- Complete account setup
Configure Email Service
- In EmailJS dashboard, click "Email Services"
- Click "Add New Service"
- Choose your email provider (Gmail, Outlook, Yahoo, etc.)
- Follow provider-specific authorization instructions
- Save your Service ID (format:
service_xxxxxxx
)
Create Email Template
- In EmailJS dashboard, click "Email Templates"
- Click "Create New Template"
- Configure template with required variables (see template example below)
- Save and note your Template ID (format:
template_xxxxxxx
)
Get Public Key
- In EmailJS dashboard, go to "Integration"
- Copy your Public Key (User ID)
- This key is safe to use in browser applications
Email Template Configuration
Required Template Variables
Template Settings:
- Subject:
{{subject}}
- From Name:
{{store_name}}
- From Email: Your dispensary email
- To Email:
{{recipient_email}}
or hardcoded address
Email Content Template:
Event Type: {{event_type}}
Time: {{timestamp}}
{{message}}
---
Sent from {{store_name}} POS System
Location: {{store_address}}
Contact: {{store_phone}}
TrafficPOS Configuration
Configure in TrafficPOS
Navigate to Admin → Notification Settings
- Service ID: Your EmailJS service identifier
- Template ID: Your email template identifier
- Public Key: Your EmailJS public key
- Recipient Email: Where notifications should be sent
- Store Information: Name, address, phone for template
Test Configuration
- Enable "Email Notifications" toggle
- Click "Send Test Email" to verify setup
- Check recipient inbox for test message
- Verify all template variables populated correctly
Available Notification Types
Low Inventory Alerts
- Trigger: Stock falls below threshold
- Default Threshold: 10 units
- Frequency: Once per day per product
- Information: Product names, remaining stock, reorder suggestions
- Configuration: Per-product thresholds available
High Value Sale Alerts
- Trigger: Sale exceeds threshold amount
- Default Threshold: $500
- Frequency: Immediate for each occurrence
- Information: Sale total, cashier, item count, customer type
- Configuration: Adjustable dollar threshold
Daily Sales Summary
- Trigger: Scheduled time each day
- Default Time: 6:00 PM
- Frequency: Once daily
- Information: Total sales, transaction count, top products
- Configuration: Customizable send time
System Events
- Backup Complete: Successful backup notifications
- Sync Errors: Failed sync operation alerts
- Till Closing: Cash handling summaries
- System Updates: Software update notifications
- Security Events: Login anomalies
Notification Details
Notification Type | Default Enabled | Threshold | Frequency Limit |
---|---|---|---|
Low Inventory | Yes | 10 units | Once per day per product |
High Value Sale | Yes | $500 | Immediate |
Daily Summary | Yes | 6:00 PM | Once daily |
Backup Complete | No | N/A | Per backup |
Sync Errors | Yes | N/A | Once per hour |
Till Closing | No | N/A | Per closing |
Advanced Configuration
Notification Rules
Individual Notification Settings
Navigate to Admin → Notification Settings → Individual Notifications
Each notification type can be configured with:
- Enabled/Disabled: Master toggle for each notification
- Custom Thresholds: Dollar amounts, stock levels, time schedules
- Frequency Limits: Prevent notification spam
- Recipient Override: Different email for specific notifications
- Priority Level: High, medium, or low priority classification
Multiple Recipients
Send to Multiple Recipients
Option 1: EmailJS Template Configuration
- Use CC/BCC fields in your EmailJS template
- Add multiple email addresses separated by commas
- Configure different recipient lists for different notification types
Option 2: Multiple Notification Rules
- Create separate notification rules for different recipients
- Assign different priorities and thresholds
- Customize content for different audience types
Custom Email Templates
Advanced Template Configuration
- Multiple Templates: Create separate templates for each event type
- Conditional Logic: Use EmailJS template conditions
- Custom Branding: Add logos, colors, and formatting
- Rich Content: HTML formatting and styling
- Dynamic Content: Include relevant business data
Troubleshooting Common Issues
Email Delivery Problems
Emails Not Sending
- Check Internet Connection: Verify browser has connectivity
- Verify EmailJS Credentials: Confirm Service ID, Template ID, and Public Key
- Test EmailJS Service: Send test email from EmailJS dashboard
- Check Browser Console: Look for JavaScript errors
- Verify Template Variables: Ensure all required variables are in template
Quota and Rate Limiting
- Free Tier Limit: 200 emails per month
- Rate Limit: Maximum 2 requests per second
- Check Usage: Monitor quota in EmailJS dashboard
- Upgrade Plan: Consider paid plan for higher volume
Configuration Issues
Invalid Credentials Error
- Double-check Service ID format:
service_xxxxxxx
- Verify Template ID format:
template_xxxxxxx
- Confirm Public Key is copied correctly
- Check that EmailJS service is active and authorized
Template Variable Errors
- Ensure all
{{variable}}
syntax is correct - Verify required variables exist in template
- Check for typos in variable names
- Test template with sample data in EmailJS
Queue Management Issues
Queued Emails Not Processing
- Check if browser tab is active (required for processing)
- Verify internet connection has returned
- Clear browser cache and reload
- Check local storage for queue data
- Monitor browser console for processing errors
Security and Privacy
Data Security
- Local Storage: EmailJS credentials stored in browser
- No Sensitive Data: No customer PII sent via email
- HTTPS Only: All communication encrypted
- Public Key: Safe for client-side use
🛡️ Best Practices
- Dedicated Email: Use separate email for notifications
- Access Control: Limit notification configuration access
- Regular Monitoring: Review email delivery status
- Backup Credentials: Keep EmailJS credentials secure
Integration Options
Third-Party Integrations
Extended Notification Systems
EmailJS can integrate with:
- Slack: Email-to-Slack forwarding for team notifications
- SMS Gateways: Email-to-SMS for urgent alerts
- Ticketing Systems: Automatic ticket creation
- CRM Platforms: Customer relationship management integration
- Business Intelligence: Data analytics and reporting tools
Performance and Limitations
EmailJS Free Tier Limitations
- Monthly Quota: 200 emails per month
- Rate Limiting: 2 requests per second maximum
- No Attachments: Free tier doesn't support file attachments
- Browser Dependency: Requires active browser tab for sending
- Template Limit: Limited number of email templates
Optimization Recommendations
Efficient Notification Management
- Set Reasonable Thresholds: Avoid notification spam
- Consolidate Similar Events: Group related notifications
- Use Daily Summaries: Instead of individual alerts for high-frequency events
- Monitor Email Quota: Track usage to avoid limits
- Prioritize Critical Alerts: Focus on business-critical notifications
Related Guides
Offline Mode Guide
Understanding offline operation and notification queuing
Security Guide
Security considerations for email notifications
Database Backup
Backup notification configuration and management