Subscriptions model
The subscription model represents entitlements for an account: which plan applies, the subscription type, validity window, optional per-subscription dimensions, and linked products. In many stacks the same model holds opportunities, contracts, or deals as long as you map them to these properties.
Prerequisites
- Accounts model
- Plans model (strongly recommended so
plan_idresolves) - Products model if you use the
productsfield
Field reference
Model keys
| Property | Type | Description |
|---|---|---|
subscription_id | string | Stable id for this subscription or contract row. |
account_id | string | Account that holds the entitlement. |
Default properties
| Property | Type | Description |
|---|---|---|
plan_id | string | References a row in the plans model. |
type | string | Subscription category: typically free, trial, paid, poc, partner, or internal. |
created_at | timestamp | When the subscription record was created. |
valid_from | timestamp | Start of the entitlement window. |
valid_until | timestamp | End of the entitlement window (if applicable). |
dimensions | json | Per-subscription overrides to plan dimensions (same key semantics as plan dimensions). |
products | json | Product linkage for multi-product contracts—align with Products product_id values where used. |
Optional properties
| Property | Type | Description |
|---|---|---|
subscription_type | string | Additional subtype or commercial label from your source when distinct from type. |
features | json | Array of the capability feature keys this subscription grants, such as ["analytics_reports", "analytics_exports"]. See Feature entitlements. |
Custom-mapped fields may appear as extra properties for filtering or workflows.
Feature entitlements
When your Products define features, the subscription model records which of them an account is entitled to:
- Capability features — map a column holding a JSON array of feature keys to a property named
features. A mapped[]clears the subscription's grants. Leavingfeaturesunmapped, or mapping a null, keeps the grants already stored. - Amount features — put the allowance in
dimensions, under the feature's key.
SELECT
subscription_id,
account_id,
plan_id,
'["analytics_reports", "analytics_exports"]' AS features,
'{"analytics_api_calls": 1200}' AS dimensions
FROM subscriptions
Which products an account has still comes from the account model's products property, so grant a feature only on a subscription for a product the account has.
Activities
Subscription models participate in subscription created and updated style activities for timelines when those rules are enabled.
Configure
- Add model → Subscription.
- Point at the connection that contains subscription, deal, or contract data.
- Map identifiers and dates; ensure
account_idmatches the accounts model. - Serialize
dimensions,products, andfeaturesas JSON in the query result if those columns are not native JSON in the source. - Validate, save, refresh, then check subscription details on accounts in the app.