Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

  • Fix HAS_USER and HAS_ENGAGED_USER filters to check pending_organization_id for Slack user associations
  • Add exclusion clause to email domain fallback to prevent double-counting
  • This fixes membership metrics showing 0 for Engaged and Registered tiers

Problem

The membership metrics dashboard showed 0 Engaged and 0 Registered organizations because the HAS_USER and HAS_ENGAGED_USER SQL filters were only matching Slack users by email domain. However, Slack users are primarily associated with organizations via the pending_organization_id field (set during domain discovery), not email domain matching.

Solution

Updated the filters to check for Slack users in three ways:

  1. Via organization_memberships (site users)
  2. Via pending_organization_id (primary Slack association)
  3. Via email domain matching as fallback (with pending_organization_id IS NULL to prevent overlap)

Test plan

  • Build passes
  • All tests pass
  • Deploy to staging and verify metrics show correct Engaged/Registered counts

🤖 Generated with Claude Code

bokelley and others added 3 commits January 13, 2026 20:19
The HAS_USER and HAS_ENGAGED_USER filters were only matching Slack users
by email domain. However, Slack users are primarily associated with
organizations via the pending_organization_id field (set during domain
discovery). This caused Engaged and Registered counts to show 0.

Changes:
- Add pending_organization_id checks to HAS_USER filter
- Add pending_organization_id checks to HAS_ENGAGED_USER filter
- Add exclusion (pending_organization_id IS NULL) to email domain
  fallback to prevent double-counting
- Update both regular and aliased filter versions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The v2.6-rc versioned docs have absolute links (/docs/...) that don't
resolve correctly since the files are at v2.6-rc/docs/. This is a
pre-existing issue with how versioned docs were synced.

Exclude v2.6-rc from the broken links check until the versioning
approach is fixed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit dd0d768 into main Jan 14, 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