📋 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
| Field | Type | Description | Required |
|---|---|---|---|
plan_id | String | Unique plan identifier | Yes |
name | String | Plan name (Starter, Pro, etc.) | Yes |
type | String | free, trial, paid, etc. | Yes |
dimensions | JSON | Feature limits as key-value pairs | No |
Plan Types
Plans should be categorized by type to enable proper lifecycle tracking:
freetrialpaidpocpartnerinternalPlan 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
Navigate to Data Models
Go to Configuration → Data Models.
Configure Plans Model
Click Configure on the Plans Model card.
Write Query
Write SQL to retrieve plan definitions.
Map Dimensions
Map plan limits to the dimensions field as JSON.
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
api_calls_monthly for clarity.