📋 Plan Model

Define subscription plans and their feature dimensions.

Overview

The Plan Model represents the subscription plans offered by your product. Plans define what features and limits are available at each tier. Subscriptions reference plans to determine what an account has access to.

Configure plans to enable license utilization tracking and identify upsell opportunities when accounts approach their plan limits.

Key Fields

FieldTypeDescriptionRequired
plan_idStringUnique plan identifierYes
nameStringPlan name (Starter, Pro, etc.)Yes
typeStringfree, trial, paid, etc.Yes
dimensionsJSONFeature limits as key-value pairsNo

Plan Types

Plans should be categorized by type to enable proper lifecycle tracking:

free
trial
paid
poc
partner
internal

Plan Dimensions

Dimensions define the feature limits for each plan. These are used to calculate license utilization when paired with the Usage Model.

{
  "users": 10,
  "storage_gb": 50,
  "api_calls_monthly": 10000,
  "projects": 5,
  "integrations": 3
}

Configuration Steps

1

Navigate to Data Models

Go to ConfigurationData Models.

2

Configure Plans Model

Click Configure on the Plans Model card.

3

Write Query

Write SQL to retrieve plan definitions.

4

Map Dimensions

Map plan limits to the dimensions field as JSON.

5

Save Model

Test and save the model.

Example SQL Query

SELECT 
  id AS plan_id,
  name,
  CASE 
    WHEN price = 0 THEN 'free'
    ELSE 'paid'
  END AS type,
  JSON_BUILD_OBJECT(
    'users', user_limit,
    'storage_gb', storage_limit_gb,
    'api_calls_monthly', api_limit
  ) AS dimensions
FROM plans
WHERE active = true

✅ Tip

Keep dimension names consistent between Plans and Usage models. Use snake_case like api_calls_monthly for clarity.

What's Next?