Complete CRM Feature Guide
Last Updated: October 27, 2025 Version: 2.0 Status: Production-Ready URL: https://crm.sagentix.ca
Table of Contents
- Overview
- Contact Management
- Distribution Lists
- Email Campaigns
- Analytics & Reporting
- Contact Tagging System
- Email Templates
- External Subscriptions
- CASL Compliance
- Security & Compliance
- Advanced Features
- API Reference
- Integration Options
Overview
What is the CRM?
A fully-featured, multi-tenant email marketing and CRM platform built on AWS serverless architecture. Designed for managing contacts, creating targeted email campaigns, and analyzing marketing performance.
Key Capabilities
- ✅ Contact Management - Full CRUD operations with visual engagement tracking
- ✅ Email Campaigns - Create, schedule, and send targeted campaigns
- ✅ Analytics Dashboard - 4 interactive charts with real-time insights
- ✅ Contact Tags - Organize and segment with color-coded tags
- ✅ Bulk Operations - Select, delete, export multiple items
- ✅ Duplicate Detection - Find and merge duplicate contacts
- ✅ CASL Compliant - Canadian Anti-Spam Legislation compliance
- ✅ External Subscriptions - Public signup forms for your website
- ✅ Integration Code Generator - One-click code for website, email, and social media integrations (NEW! 🔥)
- ✅ PBMM Security Compliance - 15-minute inactivity timeout with warning (NEW! 🔒)
- ✅ Multi-Tenant - Complete isolation between organizations
Technology Stack
Frontend: - Vanilla JavaScript (no framework dependencies) - Chart.js 4.4.0 for analytics - Quill.js for WYSIWYG email editor - Amazon Cognito for authentication - CloudFront + S3 for hosting
Backend: - AWS Lambda (Python 3.11) - 32 serverless functions - API Gateway (REST API) - DynamoDB (11 tables) - On-demand billing - Amazon SES for email delivery - Amazon Cognito User Pools
Contact Management
Features
1. Create Contacts
- Manual Entry: Add contacts one at a time
- Excel Import: Bulk import from .xlsx files
- API Import: Programmatic contact creation
- External Forms: Public subscription forms
Required Fields: - Email address (unique)
Optional Fields: - First name - Last name - Organization - Status (ACTIVE, UNSUBSCRIBED, BOUNCED, PENDING) - Source (Manual_Entry, Excel_Import, External_Subscription, etc.)
2. Edit Contacts
Inline Editing (NEW!): - Click on contact name to edit first/last name inline - Click on organization to edit inline - ✓ to save, ✕ to cancel - No modal required
Modal Editing: - Click "Edit" button for full edit modal - Update all fields at once - Validation on save
3. Visual Engagement Indicators (NEW!)
Automatic Categorization Based on Age: - 🔥 New Lead (0-7 days) - Red border/badge - ⭐ Recent (8-30 days) - Orange border/badge - 👤 Active (31-90 days) - Blue border/badge - 📋 Established (90+ days) - Gray border/badge
Status Badges: - ✓ Active (green) - Can receive emails - ✕ Unsubscribed (red) - Opted out - ⚠️ Bounced (yellow) - Email bounced - ⏳ Pending (gray) - Not yet confirmed
4. Search & Filter (Advanced 4-Way System)
Filter Options: 1. Text Search - Search by email, name, or organization 2. Status Filter - Active, Unsubscribed, Bounced 3. Engagement Filter - New Lead, Recent, Active, Established 4. Tag Filter - Filter by any tag
Combine multiple filters for precise segmentation.
5. Duplicate Detection (NEW!)
- Click "Find Duplicates" button
- Automatically scans all contacts for duplicate emails
- Shows grouped duplicates with full details
- One-click delete for each duplicate
- Color-coded: Green = keep, Orange = duplicates
6. Export Contacts
- Export to CSV with all fields
- Includes: Email, First Name, Last Name, Organization, Status, Source, Created Date
- Filename includes export date
7. Delete Contacts
- Individual delete with confirmation
- Bulk delete multiple contacts
- Removes from all distribution lists automatically
Distribution Lists
User Interface
Aligned Grid Layout
Distribution lists are displayed in a clean, professional grid layout with perfect column alignment:
Display Columns: 1. List Name (300px fixed width) - List name with ellipsis overflow for long names 2. Created Date (130px) - Formatted as "Oct 27, 2024" 3. Member Count Badge (80px) - Circular gradient badge with 👥 icon and count 4. Action Buttons (flexible width, right-aligned) - All list operations
Visual Features: - Blue left border accent for each list item - Circular member count badge with blue gradient and shadow - Consistent spacing and alignment across all lists - Hover effects on action buttons - Responsive layout adapts to screen size
Action Buttons: - 🔗 Integration - Get integration code (primary button) - View Members - See list contacts - Edit - Update list details - Duplicate - Clone list with members - Delete - Remove list (danger button)
This layout makes it easy to scan multiple lists, compare member counts, and access common actions quickly.
Features
1. Create Lists
- Name (required)
- Description (optional)
- Automatically tracked member count
- Multi-tenant isolated
2. Manage List Members
Add Contacts: - Add existing contact by email - Create new contact and add simultaneously - View all list members
Remove Contacts: - Remove individual members - Bulk remove (future enhancement)
3. List Operations
- View Members: See all contacts in a list
- Edit List: Change name/description
- Duplicate List: Clone list with all members
- Delete List: Remove list (members remain in system)
4. Get Integration Code (NEW! 🔥)
One-Click Integration for Every Distribution List
Each distribution list now has a "🔗 Get Integration Code" button that automatically generates ready-to-use integration code for multiple channels. No manual configuration needed - everything is pre-filled with your actual API endpoints and list IDs.
Available Integration Types:
1. 🌐 Website Form Integration - Complete HTML subscription form with inline styling - Full JavaScript implementation for API calls - Success/error message handling - Ready to paste into any webpage - No dependencies required
2. ✉️ Email Signature Links - Plain URL format for text signatures - HTML format for rich email signatures - Pre-filled with list ID and tracking parameters - Opens subscription form when clicked
3. 📱 Social Media Integration - Pre-written post template with engaging copy - Includes subscription link - Optimized for LinkedIn, Twitter, Facebook - Ready-to-use hashtags included
4. 💼 LinkedIn Profile/Company Page - Formatted text for LinkedIn contact info section - Professional wording - Direct subscription link
How to Use: 1. Navigate to Distribution Lists 2. Click "🔗 Get Integration Code" on any list 3. Choose your integration type 4. Click "📋 Copy" button 5. Paste the code wherever you need it
Benefits: - ✅ Zero configuration - all URLs and IDs pre-filled - ✅ Professional, production-ready code - ✅ Copy-paste ready in seconds - ✅ List-specific - automatically customized per list - ✅ Multiple formats for different use cases
5. Use in Campaigns
- Select list when creating campaign
- All ACTIVE members receive emails
- UNSUBSCRIBED members automatically excluded
Email Campaigns
Features
1. Create Campaigns
Required Information: - Distribution list selection - Email subject line - From name - From email address - Email body (HTML via Quill editor)
Optional Information: - Plain text version - Email template (select from saved templates) - Schedule for later (NEW! - UI implemented)
2. Campaign Status Tracking
Statuses: - DRAFT - Created but not sent - SENDING - Currently sending (live pulse animation) - SENT - Completed successfully - FAILED - Send operation failed
3. Campaign Statistics (6 Metrics Per Campaign)
- 👥 Recipients - Total contacts targeted
- 📤 Sent - Emails dispatched
- ✅ Delivered - Successfully delivered (with %)
- ⚠️ Bounced - Email bounces
- ❌ Failed - Send failures
- 📊 Success Rate - Overall delivery rate
4. Campaign Operations
Clone Campaign (NEW!): - One-click duplication - Creates draft copy with "Copy of [Name]" - Preserves all settings and content
Send Campaign: - Sends to all ACTIVE list members - Real-time progress tracking - Automatic CASL compliance checks
Delete Campaign: - Remove campaign - Keeps email send history
Bulk Operations (NEW!): - Select multiple campaigns with checkboxes - Bulk delete - Bulk export to CSV
5. Campaign Scheduling (UI Implemented)
- Checkbox to "Schedule for later"
- Date/time picker
- Defaults to tomorrow at 9 AM
- Saves as SCHEDULED status
- Note: Backend automation requires additional implementation
Analytics & Reporting
Dashboard Features (4 Charts + 4 Stat Cards)
Stat Cards (Gradient Design)
- Total Campaigns - Purple gradient
- Emails Sent - Pink gradient
- Avg Delivery Rate - Blue gradient
- Total Contacts - Green gradient
Interactive Charts
1. Campaign Status Distribution (Doughnut Chart) - Visual breakdown by status - Green = SENT - Yellow = SENDING - Red = FAILED - Gray = DRAFT - Hover for exact counts
2. Email Delivery Overview (Pie Chart) - Delivered (green) - Bounced (yellow) - Failed (red) - Shows email infrastructure health
3. Contact Growth Timeline (Line Chart) - Month-by-month cumulative growth - Filled area chart with blue gradient - Shows subscriber acquisition trends
4. Top Performing Campaigns (Bar Chart) - Top 5 campaigns by delivery rate - Green horizontal bars - Percentage-based ranking
Export Capabilities
- Campaign Export: CSV with ID, subject, status
- Contact Export: CSV with all contact fields
- Analytics Screenshots: Chart.js charts are screenshot-ready
Contact Tagging System
Features (Fully Implemented)
1. Create Tags
Tag Modal: - Tag name input - 8 color options: Blue, Green, Orange, Red, Purple, Pink, Cyan, Lime - Live preview as you type - Color picker with selection indicators
2. Apply Tags to Contacts
- Click "+ Tag" button on any contact
- Select tag name and color
- Save to apply
- Multiple tags per contact supported
3. View Tags
- Tags display as colored chips on contact cards
- Color-coded for visual scanning
- Shows tag name in white text
4. Remove Tags
- Click × on any tag chip
- Confirms before removal
- Updates immediately
5. Filter by Tags
- Tag dropdown auto-populated with all unique tags
- Filter contacts by specific tag
- Combine with other filters
Use Cases
- Segmentation: VIP, Newsletter, Prospect, Customer, etc.
- Lifecycle Stages: Lead, Opportunity, Customer, Churned
- Campaigns: Tag contacts who received specific campaigns
- Sources: LinkedIn, Website, Referral, Event
- Custom: Any categorization you need
Email Templates
Features
1. Create Templates
- Template name
- Category (Newsletter, Promotional, Transactional, etc.)
- Description
- HTML body (WYSIWYG editor)
- Plain text version
2. Use Templates
- Select template when creating campaign
- Loads template content into editor
- Edit before sending (templates don't lock content)
3. Manage Templates
- List all templates
- Edit existing templates
- Delete templates
- Preview templates
4. Template Categories
Organize templates by purpose: - Newsletter - Promotional - Transactional - Event - Custom
External Subscriptions
Public Subscription Forms
Overview
Allow people to subscribe to your distribution lists without logging into the CRM. Perfect for website signup forms, landing pages, or social media links.
Features
1. Public Subscription Endpoint
POST https://zqkprqp60h.execute-api.ca-central-1.amazonaws.com/Prod/public/subscribe
2. Required Data:
{
"email": "subscriber@example.com",
"listId": "4f41dfcd-7848-407a-a67d-ef1041f8a1f6",
"firstName": "John", // optional
"lastName": "Doe" // optional
}
3. Automatic Processing: - Creates contact if doesn't exist - Adds to specified distribution list - Sets source as "External_Subscription" - Sends confirmation (optional) - CASL compliant
Implementation Examples
HTML Form:
<form id="subscribe-form">
<input type="email" name="email" required placeholder="Your email">
<input type="text" name="firstName" placeholder="First name">
<input type="text" name="lastName" placeholder="Last name">
<button type="submit">Subscribe</button>
</form>
<script>
document.getElementById('subscribe-form').addEventListener('submit', async (e) => {
e.preventDefault();
const formData = new FormData(e.target);
const response = await fetch('https://zqkprqp60h.execute-api.ca-central-1.amazonaws.com/Prod/public/subscribe', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: formData.get('email'),
firstName: formData.get('firstName'),
lastName: formData.get('lastName'),
listId: '4f41dfcd-7848-407a-a67d-ef1041f8a1f6'
})
});
if (response.ok) {
alert('Subscribed successfully!');
}
});
</script>
JavaScript/React:
async function subscribe(email, firstName, lastName) {
const response = await fetch('https://zqkprqp60h.execute-api.ca-central-1.amazonaws.com/Prod/public/subscribe', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email,
firstName,
lastName,
listId: '4f41dfcd-7848-407a-a67d-ef1041f8a1f6'
})
});
const data = await response.json();
return data;
}
Use Cases
- Website Footer: Newsletter signup
- Landing Pages: Lead capture forms
- Blog: Subscribe to updates
- Webinars: Event registration
- Social Media: Link in bio → signup form
- QR Codes: Print materials → mobile signup
CASL Compliance
Canadian Anti-Spam Legislation Features
1. Unsubscribe Mechanism
Every Email Includes: - Unsubscribe link in footer - One-click unsubscribe (no login required) - Immediate processing - Confirmation message
Unsubscribe Endpoint:
GET /public/unsubscribe?token=<contact-specific-token>
2. Consent Tracking
Recorded for Each Contact: - Source of acquisition - Date added - Subscription status - Unsubscribe date (if applicable)
3. Email Requirements
All campaign emails automatically include: - Sender identification (from name/email) - Subject line (no deceptive subjects) - Unsubscribe mechanism - Physical address (configurable)
4. Status Management
- ACTIVE: Consented, can receive emails
- UNSUBSCRIBED: Opted out, blocked from campaigns
- BOUNCED: Email invalid, auto-blocked
- PENDING: Not yet confirmed (for double opt-in)
Security & Compliance
PBMM-Compliant Inactivity Timeout (NEW! 🔒)
Automatic Session Management for Protected B Security
The CRM platform implements a 15-minute inactivity timeout that meets Canadian PBMM (Protected B, Medium Integrity, Medium Availability) compliance standards.
How It Works
- Activity Monitoring
- Timer starts automatically after login
- Tracks mouse movements, keyboard input, scrolling, and touch events
-
Any activity resets the 15-minute countdown
-
Warning System
- At 14 minutes of inactivity, a warning modal appears
- Live countdown shows remaining seconds (60 seconds)
-
Clear explanation of security requirement
-
User Options
- "Stay Logged In" - Extends session and resets timer
- "Logout Now" - Immediate logout
-
Automatic logout if no action taken
-
Automatic Logout
- Occurs at exactly 15 minutes of inactivity
- JWT tokens removed from session
- Cognito session terminated
- User redirected to login page
- Clear message: "You have been logged out due to inactivity"
Why This Matters
- Compliance: Meets PBMM requirements for Protected B data handling
- Security: Prevents unauthorized access to sensitive contact data
- Best Practice: Industry standard for government and enterprise systems
- User Protection: Safeguards information when workstations are left unattended
Technical Details
- Timeout Period: 15 minutes (900 seconds)
- Warning Period: 1 minute before logout
- Events Monitored: mousedown, mousemove, keypress, scroll, touchstart, click
- Session Cleanup: Complete removal of authentication tokens
Advanced Features
1. Inline Editing
- Click-to-edit contact names and organizations
- No modal required
- ✓ and ✕ buttons for save/cancel
- Instant updates
2. Bulk Operations
Campaigns: - Select multiple with checkboxes - Bulk delete - Bulk export to CSV - Selection counter
Contacts: - Ready for bulk operations (can be implemented)
3. Empty States
Professional onboarding screens when no data exists: - Campaigns (purple gradient) - "Create Your First Campaign" - Contacts (green gradient) - "Add Contact" or "Import from Excel" - Lists (pink gradient) - "Create Your First List"
4. Campaign Cloning
- Purple "Clone" button on every campaign
- One-click duplication
- Creates editable draft
- Preserves all content and settings
5. Excel Import
- Upload .xlsx files
- Maps columns to contact fields
- Bulk create contacts
- Validates data
- Shows import results
API Reference
Base URL
https://zqkprqp60h.execute-api.ca-central-1.amazonaws.com/Prod
Authentication
All authenticated endpoints require:
Authorization: Bearer <JWT_TOKEN>
Obtain token via Amazon Cognito login.
Endpoints
Contacts
| Method | Endpoint | Description |
|---|---|---|
| GET | /contacts |
List all contacts |
| GET | /contacts?status=ACTIVE |
Filter by status |
| POST | /contacts |
Create contact |
| PUT | /contacts/{contactId} |
Update contact |
| DELETE | /contacts/{contactId} |
Delete contact |
Lists
| Method | Endpoint | Description |
|---|---|---|
| GET | /lists |
List all distribution lists |
| POST | /lists |
Create list |
| PUT | /lists/{listId} |
Update list |
| DELETE | /lists/{listId} |
Delete list |
| GET | /lists/{listId}/members |
Get list members |
| POST | /lists/{listId}/members |
Add contacts to list |
| DELETE | /lists/{listId}/members/{contactId} |
Remove from list |
Campaigns
| Method | Endpoint | Description |
|---|---|---|
| GET | /campaigns |
List all campaigns |
| POST | /campaigns |
Create campaign |
| GET | /campaigns/{campaignId} |
Get campaign details |
| POST | /campaigns/{campaignId}/send |
Send campaign |
| POST | /campaigns/{campaignId}/clone |
Clone campaign |
| DELETE | /campaigns/{campaignId} |
Delete campaign |
Tags
| Method | Endpoint | Description |
|---|---|---|
| GET | /contacts/{contactId}/tags |
List contact tags |
| POST | /contacts/{contactId}/tags |
Add tag to contact |
| DELETE | /contacts/tags/{tagId} |
Remove tag |
Templates
| Method | Endpoint | Description |
|---|---|---|
| GET | /templates |
List all templates |
| POST | /templates |
Create template |
| GET | /templates/{templateId} |
Get template |
| PUT | /templates/{templateId} |
Update template |
| DELETE | /templates/{templateId} |
Delete template |
Public Endpoints (No Authentication)
| Method | Endpoint | Description |
|---|---|---|
| POST | /public/subscribe |
External subscription |
| GET | /public/unsubscribe |
One-click unsubscribe |
Integration Options
1. Website Integration
Newsletter Signup Form:
- Add HTML form to website
- POST to /public/subscribe endpoint
- Specify your listId
- Style to match your branding
Example locations: - Website footer - Blog sidebar - Landing pages - Contact page
2. LinkedIn Integration (Planned)
Potential Integrations: - LinkedIn Lead Gen Forms → CRM import - Profile scrapers → contact creation - Connection exports → bulk import - Message campaigns → tracking
Implementation Status: Not yet implemented Effort Required: Medium (2-4 hours) Dependencies: LinkedIn API access or third-party tools
3. Email Signature
Add subscription link:
<a href="https://yourwebsite.com/subscribe">
Subscribe to our newsletter
</a>
4. Social Media
Link in Bio: - Instagram/TikTok → Landing page with signup form - Twitter/X → Link to subscription page - Facebook → Page CTA button
5. QR Codes
Print materials: - Generate QR code pointing to subscription form - Business cards - Flyers - Event materials
6. Zapier/Make.com (Future)
Automation potential: - Form submissions → CRM contacts - Webinar registrations → Distribution list - E-commerce orders → Customer list - CRM unsubscribes → Update other platforms
Status: Not yet implemented Effort: Low-Medium (webhook endpoints ready)
7. API Integration
Direct API calls: - Integrate with custom applications - Mobile apps - Other SaaS platforms - Internal tools
Authentication: Cognito JWT tokens Documentation: See API Reference above
Database Schema
Tables (11 Total)
- CrmContacts-dev - Contact records
- CrmDistributionLists-dev - Email lists
- CrmListMemberships-dev - List-contact relationships
- CrmCampaigns-dev - Email campaigns
- CrmEmailSends-dev - Individual email send records
- CrmEmailTemplates-dev - Saved templates
- CrmContactTags-dev - Contact tags
- CrmEmailOpens-dev - Email open tracking (ready, not implemented)
- CrmEmailClicks-dev - Link click tracking (ready, not implemented)
- CrmContactActivities-dev - Contact timeline (ready, not implemented)
- CrmContactNotes-dev - Contact notes (ready, not implemented)
Multi-Tenancy
All tables include tenantId for complete data isolation:
- Users can only access their tenant's data
- Enforced at API and database level
- Supports unlimited tenants
Performance & Scalability
Current Configuration
DynamoDB: - On-demand billing (pay per request) - Auto-scaling - No capacity planning needed - Handles traffic spikes automatically
Lambda: - 256 MB memory (most functions) - 512 MB for campaign sending - 15-second timeout (most) - 300-second for sending
Email Sending: - Amazon SES - 14 emails/second rate - Automatic throttling - Bounce/complaint handling
Capacity
Current limits: - Contacts: Unlimited - Lists: Unlimited - Campaigns: Unlimited - Emails/month: 62,000 free, then $0.10/1000 - Concurrent users: Unlimited (API Gateway auto-scales)
Security Features
Authentication
- Amazon Cognito User Pools
- JWT token-based
- Multi-factor authentication available
- Password policies enforced
Authorization
- Multi-tenant isolation
- Role-based access (can be implemented)
- Tenant validation on every request
Data Security
- DynamoDB encryption at rest (KMS)
- HTTPS/TLS for all traffic
- API Gateway with Cognito authorizer
- No public database access
Compliance
- CASL compliant
- GDPR-ready architecture
- Audit trail via CloudTrail
- Data retention policies
Cost Optimization
Current Monthly Cost: $15-35
Breakdown: - DynamoDB (11 tables): $5-15 - Lambda (32 functions): $0-5 - S3 Storage: $0.10-2 - CloudFront: $0-1 - CloudWatch Logs: $0.50-2 - SES Email: $0-10
Optimizations Applied: - ✅ On-demand DynamoDB billing - ✅ 90-day log retention - ✅ S3 lifecycle policies - ✅ No reserved capacity waste - ✅ Appropriate Lambda sizing
Future Enhancements
Planned Features
- Email Open/Click Tracking - Database ready, needs implementation
- Contact Timeline - View all contact interactions
- Contact Notes - Add notes to contacts
- Custom Contact Fields - Define your own fields
- A/B Testing - Test subject lines and content
- Advanced Segmentation - Complex filtering logic
- Drag-and-Drop Email Builder - Visual email design
- Campaign Automation - Scheduled sends, drip campaigns
- LinkedIn Integration - Import connections
- Mobile App - iOS/Android apps
Community Contributions
This is a proprietary system, but feature requests are welcome!
Support & Troubleshooting
Common Issues
1. Changes not appearing: - Hard refresh: Cmd+Shift+R (Mac) or Ctrl+F5 (Windows) - Wait 1-2 minutes for CloudFront invalidation - Clear browser cache
2. Login issues: - Check email/password - Check Cognito user pool status - Verify user confirmed
3. Emails not sending: - Verify SES is not in sandbox mode - Check sender email is verified - Review CloudWatch logs
4. Import failing: - Check Excel file format (.xlsx) - Verify required columns present - Check file size (<5 MB)
Getting Help
- Documentation: See README.md and this guide
- Logs: CloudWatch Logs for debugging
- Architecture: See ARCHITECTURE.md
Conclusion
This CRM platform provides commercial-grade email marketing capabilities with:
✅ Full contact management ✅ Targeted email campaigns ✅ Visual analytics ✅ CASL compliance ✅ External subscriptions ✅ Advanced segmentation ✅ Cost-optimized infrastructure ✅ Scalable architecture
Total Cost: $15-35/month Commercial Equivalent: $200-800/month Your Savings: 95%+
For detailed deployment instructions, see DEPLOYMENT.md.
For architecture details, see ARCHITECTURE.md.
For development guidelines, see DEVELOPMENT_GUIDE.md.
Version: 2.0 Last Updated: October 27, 2025 Production URL: https://crm.sagentix.ca