Skip to content

Dashboard & Analytics Feature

Overview

The Dashboard (/dashboard) is the central command center of ConnectGain, providing real-time insights, metrics, and customizable widgets to monitor your business performance at a glance. It serves as the primary interface for tracking communication metrics, sales performance, task completion, and contact growth.


Features

1. Communication Metrics Widgets

Incoming Messages: - Real-time count of messages received across all channels - Channel breakdown (WhatsApp Lite, WhatsApp Cloud, Facebook Messenger, Instagram) - Click-through to channel settings - Date range filtering (Today, Yesterday, This Week, This Month, Custom Range) - Comparison with previous period - Percentage change indicators

Ongoing Conversations: - Active conversation count - Real-time updates - Period-over-period comparison - Visual trend indicators

Unread Conversations: - Conversations with unread messages - SLA tracking - Priority indicators - Quick action buttons

Online Agents: - Count and list of agents currently online - At-a-glance team availability

Median Reply Time: - Average response time across team - Performance benchmarking - Historical trends

Longest Awaiting Reply: - Oldest unresponded conversation - Urgency indicators - Direct link to conversation

2. Sales & Deals Widgets

Won Leads: - Successfully closed deals - Value tracking - Period comparison - Conversion metrics

Active Leads: - Deals in pipeline - Stage breakdown - Value aggregation

Lead Sources: - Origin tracking for leads - Channel attribution - Source performance

Active Deals: - Current pipeline value - Deal count - Total value

3. Tasks & Contacts Widgets

Tasks Overview: - Task completion metrics - Overdue tasks count - Completion rate - Priority breakdown

Total Companies: - Company database size - Growth tracking

Total Contacts: - Contact database size - Growth metrics - Period comparison

Upcoming Meetings: - Next scheduled meetings / bookings - Quick view of what's coming up

4. Custom Widgets

Create Custom Metrics: - Build personalized widgets - Query any database table - Aggregation options (Count, Sum, Average, Min, Max) - Format options (Number, Currency, Percentage, Time Duration) - Custom positioning - Show/hide controls

5. Performance Charts

4-Week Performance Overview: - Visual trend analysis - Conversations over time - Deals closed tracking - New contacts growth - Interactive charts

6. Recent Activity Feed

Live Activity Stream: - Latest platform events - New messages - Deal updates - New contacts - Clickable items for quick navigation - Time-ago indicators

7. Dashboard Customization

Drag-and-Drop Widgets: - Reorder predefined widgets - Hide/Show widgets - Customize visible metrics

Date Range Selection: - Today, Yesterday, This Week, This Month - Custom date range picker - Saved preferences

Widget Management: - Add, edit, delete custom widgets - Widget positioning - Widget visibility controls


Use Cases

Use Case 1: Daily Performance Monitoring

Scenario: A sales manager wants to monitor daily team performance.

Steps: 1. Open Dashboard 2. Set date range to "Today" 3. View widget metrics: - Incoming Messages (target: < 10) - Unread Conversations (target: 0) - Active Leads (target: > 20) - Tasks Completed (target: > 5) 4. Review recent activity feed 5. Check performance charts for trends

Expected Outcome: Manager sees real-time performance metrics and can identify areas needing attention.

Use Case 2: Weekly Team Review

Scenario: Team lead conducts weekly performance review.

Steps: 1. Open Dashboard 2. Set date range to "Last 7 days" 3. Review all widget metrics 4. Analyze performance charts 5. Export metrics report 6. Share with team

Expected Outcome: Team lead has comprehensive weekly performance data for team meeting.

Use Case 3: Custom Metric Tracking

Scenario: Business wants to track custom metric (e.g., high-value deals).

Steps: 1. Open Dashboard 2. Click "Add Widget" 3. Select "Custom Widget" 4. Configure query: - Table: deals - Filter: value > 10000 - Aggregation: COUNT 5. Set title: "High-Value Deals" 6. Save widget 7. Position widget on dashboard

Expected Outcome: Custom metric displayed on dashboard and tracked over time.

Use Case 4: Executive Dashboard

Scenario: Executive needs high-level overview of business metrics.

Steps: 1. Configure dashboard with key widgets: - Total Contacts - Active Deals - Won Leads - Total Revenue 2. Hide detailed widgets 3. Set default view 4. Share dashboard link

Expected Outcome: Executive has clean, focused dashboard with key metrics.


Test Cases

Test Case 1: Widget Display

Test: Verify widgets display correct data

Steps: 1. Open Dashboard 2. Verify each widget displays data 3. Check data accuracy against source tables 4. Verify date range filtering works

Expected Result: All widgets display accurate, up-to-date data

Test Data: - Create test contacts, deals, conversations - Verify widget counts match actual data

Test Case 2: Widget Customization

Test: Verify widget customization functionality

Steps: 1. Click "Add Widget" 2. Select widget type 3. Configure widget settings 4. Save widget 5. Drag widget to new position 6. Hide widget 7. Show hidden widget 8. Delete widget

Expected Result: Widget customization works correctly

Test Case 3: Date Range Filtering

Test: Verify date range filtering

Steps: 1. Set date range to "Today" 2. Verify widget data updates 3. Set date range to "Last 7 days" 4. Verify widget data updates 5. Set custom date range 6. Verify widget data updates

Expected Result: All widgets correctly filter by selected date range

Test Case 4: Performance Charts

Test: Verify performance charts display correctly

Steps: 1. Open Dashboard 2. Verify charts render 3. Check chart data accuracy 4. Change date range 5. Verify charts update 6. Test different chart types

Expected Result: Charts display accurate data and update correctly

Test Case 5: Recent Activity Feed

Test: Verify recent activity feed

Steps: 1. Perform various actions (send message, create deal, etc.) 2. Open Dashboard 3. Verify activities appear in feed 4. Check activity timestamps 5. Verify activity details

Expected Result: Activity feed shows recent activities in real-time

Test Case 6: Real-time Updates

Test: Verify dashboard updates in real-time

Steps: 1. Open Dashboard 2. Note current widget values 3. Perform action (create contact, send message) 4. Verify widgets update automatically 5. Check activity feed updates

Expected Result: Dashboard updates in real-time without refresh

Test Case 7: Custom Widget Creation

Test: Verify custom widget creation

Steps: 1. Click "Add Widget" → "Custom" 2. Pick a source table 3. Choose an aggregation (Count, Sum, Average, Min, Max) 4. Set title and format 5. Save widget 6. Verify widget displays correct data 7. Edit widget 8. Delete widget

Expected Result: Custom widgets can be created, edited, and deleted

Test Case 8: Dashboard Persistence

Test: Verify dashboard configuration persists

Steps: 1. Configure dashboard layout 2. Add/remove widgets 3. Set date range 4. Refresh page 5. Verify configuration persists 6. Log out and log back in 7. Verify configuration persists

Expected Result: Dashboard configuration persists across sessions

Test Case 9: Multi-User Dashboard

Test: Verify dashboard works for multiple users

Steps: 1. User A configures dashboard 2. User B logs in 3. Verify User B sees default dashboard 4. User B configures dashboard 5. Verify User A's dashboard unchanged 6. Verify User B's dashboard saved

Expected Result: Each user has independent dashboard configuration

Test Case 10: Performance with Large Datasets

Test: Verify dashboard performance with large data

Steps: 1. Import 10,000+ contacts 2. Create 1,000+ deals 3. Create 5,000+ conversations 4. Open Dashboard 5. Measure load time 6. Verify widgets load correctly 7. Test date range filtering performance

Expected Result: Dashboard loads within acceptable time (< 3 seconds)


API Integration

Get Dashboard Metrics

Endpoint: GET /rest/v1/dashboard_widgets

Query Parameters: - organization_id - Filter by organization - is_visible - Filter visible widgets only

Response:

{
 "widgets": [
 {
 "id": "uuid",
 "widget_type": "incoming_messages",
 "widget_config": {
 "title": "Incoming Messages",
 "query": "SELECT COUNT(*) FROM messages WHERE direction = 'INBOUND'",
 "date_range": "today"
 },
 "value": 42,
 "position": 0,
 "is_visible": true
 }
 ]
}

Create Custom Widget

Endpoint: POST /rest/v1/dashboard_widgets

Request Body:

{
 "organization_id": "org-uuid",
 "widget_type": "custom",
 "widget_config": {
 "title": "High-Value Deals",
 "table": "deals",
 "aggregation": "count"
 },
 "position": 5,
 "is_visible": true
}


Best Practices

  1. Widget Organization
  2. Group related widgets together
  3. Place most important widgets at top
  4. Limit to 12-15 widgets for performance

  5. Date Range Selection

  6. Use "Today" for daily monitoring
  7. Use "Last 7 days" for weekly reviews
  8. Use "Last 30 days" for monthly analysis

  9. Custom Widgets

  10. Keep queries simple and optimized
  11. Use appropriate aggregations
  12. Test queries before creating widgets

  13. Performance

  14. Hide unused widgets
  15. Use date range filtering to limit data
  16. Refresh dashboard periodically

  17. Sharing

  18. Export dashboard reports for stakeholders
  19. Use screenshots for presentations
  20. Share dashboard links for real-time access

Troubleshooting

Widgets Not Loading

Issue: Widgets show loading state indefinitely

Solutions: - Check database connection - Verify the selected table and aggregation for custom widgets - Check date range validity - Refresh page

Incorrect Data

Issue: Widget shows incorrect data

Solutions: - Verify date range selection - Check organization filter - Verify the table and aggregation chosen for custom widgets - Check data in source tables

Performance Issues

Issue: Dashboard loads slowly

Solutions: - Reduce number of widgets - Use date range filtering - Optimize custom widget queries - Check database indexes



Last Updated: January 2025