Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Jan 3, 2026

Summary

  • The hot prospects view was showing no results because the old scoring system used a priority-based approach where only the highest-priority signal counted
  • Email exchanges, Slack users, and other engagement signals weren't factoring into "hot" status
  • Implemented new additive engagement scoring (0-100) that combines all signals

Changes

  • Migration 109: New compute_org_engagement_score function with additive scoring:
    • Slack users: 0-20 pts (5 pts per user)
    • Team members: 0-15 pts
    • Working groups: 0-15 pts
    • Recent activity: 0-15 pts
    • Email engagement: 0-15 pts (opens + clicks)
    • Event interest: 0-10 pts
    • Interest level: 0-10 pts (manual setting)
    • Low interest caps score at 20
  • prospects.ts: Use stored engagement_score for hot prospects filter (score >= 30), convert to 1-5 display level for backwards compatibility
  • admin-prospects.html: Updated tooltip to show "Score: X/100" with all contributing reasons
  • Added POST /api/admin/prospects/refresh-scores endpoint
  • Added performance indexes for engagement_score queries

Test plan

  • TypeScript builds successfully
  • All tests pass
  • Manual testing in dev environment shows hot prospects view working
  • Engagement scores computed correctly by migration

🤖 Generated with Claude Code

bokelley and others added 4 commits January 3, 2026 16:05
The hot prospects view was showing no results because the old scoring
system used a priority-based approach where only the highest-priority
signal counted. Email exchanges and Slack users weren't factoring into
"hot" status.

Changes:
- Add migration 109_org_engagement_scoring.sql with additive scoring (0-100)
  - Slack users: 0-20 pts
  - Team members: 0-15 pts
  - Working groups: 0-15 pts
  - Recent activity: 0-15 pts
  - Email engagement: 0-15 pts
  - Event interest: 0-10 pts
  - Interest level: 0-10 pts
  - Low interest caps score at 20
- Update prospects.ts to use stored engagement_score
  - Hot prospects filter: score >= 30
  - Convert 0-100 score to 1-5 display level for backwards compatibility
  - Show all contributing factors in engagement_reasons
- Add refresh-scores endpoint for manual score updates
- Add performance indexes for engagement_score queries
- Update UI tooltip to show "Score: X/100" with all reasons

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bokelley bokelley merged commit ec23066 into main Jan 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants