Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Jan 2, 2026

Summary

  • Add canonical users table (migration 074) with WorkOS as primary identity provider
  • Add engagement scoring functions (migration 075) for computing activity-based scores from Slack, email, conversations, and community participation
  • Add unified contacts view (migration 076) that combines users, Slack-only, and email-only contacts with automatic goal selection
  • Add admin contacts UI (/admin/contacts) with filtering, stats dashboard, and detail modal
  • Add WorkOS user sync via webhooks (user.created, user.updated, user.deleted) and backfill endpoint
  • Fix SQL injection vulnerability in LIKE pattern escaping
  • Add input validation for contact type filtering

Engagement System

The system computes two scores for each user:

  • Engagement Score (0-100): Based on observable activity (Slack messages/reactions, email opens/clicks, Addie conversations, community events)
  • Excitement Score (0-100): Based on expressed sentiment from conversation insights

These scores determine a lifecycle stage: newactiveengagedchampion / at_risk

Goal Selection

The system automatically selects an Addie goal for each contact based on their:

  • Link status (Slack mapping, account creation)
  • Engagement/excitement scores
  • Organization subscription status

Goals include: link_slack, link_account, drive_engagement, membership_pitch, drive_value, deepen_relationship

Test plan

  • Migrations run successfully
  • Admin contacts page loads and displays contacts
  • Filtering by contact type works
  • Search by name/email works
  • Contact detail modal shows engagement scores
  • TypeScript compiles without errors
  • All tests pass

🤖 Generated with Claude Code

- Add canonical users table (074) with WorkOS as primary identity
- Add engagement scoring functions (075) for computing activity-based scores
- Add unified contacts view (076) combining users, Slack-only, and email-only contacts
- Add admin contacts UI with filtering, stats, and detail modal
- Add WorkOS user sync via webhooks and backfill endpoint
- Fix SQL injection vulnerability in LIKE pattern escaping
- Add input validation for contact type filtering

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bokelley bokelley force-pushed the bokelley/test-member-insights branch from 5fab4d8 to d45fde6 Compare January 2, 2026 01:13
- Rename migrations 074-076 → 079-081 to avoid conflicts with main branch
- Move backfill-users endpoint to admin/users.ts as /sync-users
- Remove duplicate backfill endpoints from http.ts
- Update error message to reference new endpoint path

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bokelley bokelley merged commit 73ee6a9 into main Jan 2, 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