Skip to content

Add unified account lifecycle stage to admin tools#632

Merged
bokelley merged 1 commit into
mainfrom
bokelley/account-lifecycle
Jan 5, 2026
Merged

Add unified account lifecycle stage to admin tools#632
bokelley merged 1 commit into
mainfrom
bokelley/account-lifecycle

Conversation

@bokelley

@bokelley bokelley commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add get_account as the primary tool for looking up any organization
  • Introduce computeLifecycleStage() function that combines subscription_status and prospect_status into a unified view
  • Mark lookup_organization and find_prospect as deprecated (still functional for backwards compatibility)

Lifecycle Stages

prospect → contacted → responded → interested → negotiating → member
                                                            ↘ declined
                                                            ↘ churned

Problem Solved

Previously, find_prospect would show paying members (like Mediaocean) as "prospect" because it only checked prospect_status and ignored subscription_status. Now all tools show the correct lifecycle stage.

Subscription Status Handling

  • active, trialingmember
  • canceled, past_due, unpaid, incomplete_expiredchurned
  • incompletenegotiating (started payment but didn't complete)

Test plan

  • TypeScript compiles without errors
  • All existing tests pass
  • Code review completed and suggestions addressed

🤖 Generated with Claude Code

- Add `get_account` as the primary tool for looking up any organization
- Introduce `computeLifecycleStage()` function that combines subscription_status
  and prospect_status into a unified view: prospect → contacted → responded →
  interested → negotiating → member (or declined/churned)
- Handle all subscription statuses: active, trialing, canceled, past_due,
  unpaid, incomplete, incomplete_expired
- Mark `lookup_organization` and `find_prospect` as deprecated (still functional)
- Update `find_prospect` to show lifecycle stage instead of raw prospect_status
- Export `LIFECYCLE_STAGE_EMOJI` constant for consistent emoji usage

This fixes the issue where paying members (like Mediaocean) would incorrectly
show as "prospect" in find_prospect because it didn't check subscription_status.

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

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

1 participant