feat: Add enterprise token consumption schema documentation#48
Open
Daniel Beer (DanielB945) wants to merge 1 commit intomainfrom
Open
feat: Add enterprise token consumption schema documentation#48Daniel Beer (DanielB945) wants to merge 1 commit intomainfrom
Daniel Beer (DanielB945) wants to merge 1 commit intomainfrom
Conversation
## Changes ### New Documentation - **shared/enterprise-token-pools.md**: Comprehensive guide to shared vs non-shared token pools - Shared token pool logic (is_shared_token_pool flag) - Non-shared pool logic (McCann_NY, Cylndr, code users) - Enterprise organization classification - Complete credit limit monitoring queries - Code redemption tracking - Future user cap feature documentation ### Schema Updates (shared/bq-schema.md) - **backend_griffin_market_purchased_consumables**: Token purchases and initial balances - Key fields: consumable_id, ltid, organization_id, is_shared_token_pool, quantity - Shared vs non-shared pool logic - Example queries for credit limit monitoring - **backend_griffin_market_consumed_consumables**: Token consumption transactions - Key field: consumed_by_ltid (critical for shared pool attribution) - Consumption tracking by user - **backend_griffin_market_unified_payment_source**: Payment sources and code redemptions - complimentary_code field for tracking code users - Code redemption query examples - **backend_griffin_shared_subscription_group**: Shared subscription groups - has_shared_token_pool flag - Seat configurations and consumable offerings ### Reference Updates (CLAUDE.md) - Added enterprise-token-pools.md to shared knowledge table - Read before any enterprise token/billing analysis ## Context These tables are critical for: - Credit limit monitoring (Report 4 in daily reports) - Enterprise account health tracking - Token consumption analysis - Code redemption tracking ## Key Insights **Shared Token Pools (most enterprise orgs):** - Records at ORG level: ltid = group_id - Use consumed_by_ltid to track individual user consumption - Examples: Indegene, HearWell_BeWell, Miroma, Deriv, McCann_Paris **Non-Shared Pools:** - Records at USER level: ltid = individual user - Examples: McCann_NY, Cylndr Studios (SSO), code users **McCann Special Case:** - McCann_NY: Separate entity, non-shared pool - McCann_Paris: Catch-all for other McCann offices, shared pool Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
350bdcb to
6df8a81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test Plan