Overview
The CRM module (AdminViews.tsx:622-1279) provides comprehensive contact management with:
- Contact database with advanced filtering
- Email campaign orchestration
- Engagement metrics and scoring
- List and segment management
- Mailrelay integration
- Bulk operations and automation
Contact Structure
Contacts are stored with detailed profile information (types.ts:268-286):
Accessing the CRM
Dashboard KPIs
The CRM dashboard displays real-time metrics (AdminViews.tsx:83-120):
Total Contactos CRM
Total contacts with breakdown of subscribed count
Emails Enviados
Total emails sent with open rate percentage
Tasa de Apertura
Email open rate as percentage
Tasa de Efectividad
Subscribed contacts / total contacts ratio
KPI Calculations
KPIs are calculated from live data (AdminViews.tsx:41-47):
Contact Statuses
| Status | Description | Badge Color |
|---|---|---|
| Subscribed | Active, receives emails | Green |
| Pending | Awaiting confirmation | Amber |
| Unsubscribed | Opted out of emails | Gray |
| Bounced | Email address invalid/rejected | Red |
| new | Newly created, not processed | Blue |
Contact Details Panel
Click any contact to open the detailed off-canvas panel (AdminViews.tsx:284-513):
Information Sections
- Quick Actions
- Contact Info
- Email History
- Metrics
- Email: Send individual message
- Sincronizar: Sync with Mailrelay
- Métricas: View engagement statistics
Engagement Scoring
Engagement scores help identify active vs. inactive contacts:Score Calculation
Scores are calculated based on:- Email opens: +5 points each
- Email clicks: +10 points each
- Recent activity: Weighted by recency
- Campaign participation: Bonus points
Score Ranges
- High (70-100): Very engaged, green indicator
- Medium (40-69): Moderately engaged, amber indicator
- Low (0-39): Needs re-engagement, red indicator
Search and Filtering
The CRM provides powerful filtering options (AdminViews.tsx:643-672):
Search Query
Search box filters by:- Contact name (case-insensitive)
- Email address
- Tags
Filter Options
- By Status
- By List
- By Tag
- All statuses
- ✅ Subscribed
- 🕐 Pending
- 🚫 Unsubscribed
- ⚠️ Bounced
Clear Filters
Click the Limpiar button to reset all filters to defaults.Bulk Operations
Select multiple contacts to perform bulk actions (AdminViews.tsx:1023-1082):
Available Bulk Actions
| Action | Description | Icon |
|---|---|---|
| Enviar Email | Send mass email to selected | ✉️ |
| Agregar Tag | Apply tag to all selected | # |
| Agregar a Lista | Add to contact list | 📋 |
| Suscribir | Change status to Subscribed | ✓ |
| Desuscribir | Change status to Unsubscribed | ✕ |
| Eliminar | Permanently delete contacts | 🗑️ |
Email Metrics Dashboard
When “Ver Métricas” is enabled, view detailed email analytics (AdminViews.tsx:870-969):
Charts and Visualizations
- Email Activity Chart: 7-day trend of sent vs. opened emails
- Queue Status: Real-time sending queue with throttle limits
- Rate Metrics: Open rate, click rate, bounce rate cards
List-Specific Metrics
Filter metrics by contact list to see:- Performance of specific segments
- Engagement by audience type
- Comparative analysis between lists
Email Queue and Throttling
The platform implements hourly send limits to avoid spam flags (AdminViews.tsx:914-950):
The system automatically throttles sending to stay within your hosting provider’s hourly email limit (typically 80 emails/hour for shared hosting).
Mailrelay Integration
Sync contacts with external Mailrelay system (storage.ts:805-812):
Sync Function
Contact Import
Bulk import contacts from CSV or JSON (storage.ts:650-664):
CSV Format Example
Contact Editor
Create or edit contacts with the dedicated editor modal (AdminViews.tsx:622):
Editable Fields
- Name: Full name or display name
- Email: Primary email address (unique)
- Phone: Contact phone number
- City / Country: Location information
- Status: Subscription status
- Tags: Comma-separated tags
- Lists: Assign to one or more lists
- Notes: Internal notes (not visible to contact)
Validation
- Email must be valid format
- Email must be unique in database
- Name is required
- Phone format is validated for Chilean numbers
SMTP Configuration
Configure email sending settings (storage.ts:717-726):
SMTP credentials are stored in localStorage. For production, migrate sensitive config to environment variables.
Data Storage
CRM data is stored in localStorage (storage.ts:10):
| Key | Content |
|---|---|
cafh_contacts_v1 | Array of Contact objects |
cafh_crm_lists_v1 | Contact list definitions |
cafh_email_logs_v1 | Email send history |
cafh_email_metrics_v1 | Aggregate email metrics |
cafh_smtp_config_v1 | SMTP server configuration |
Storage Limits
- Contacts: ~2,000-5,000 (depending on field data)
- Email Logs: Limited to prevent overflow
- Lists: Unlimited (lightweight objects)
Related Documentation
Contact Lists
Manage lists and segmentation
User Roles
Configure admin access permissions