Account metrics model
Account metrics are custom time-series attached to accounts: any numeric (or parsed numeric) signal you want to trend over time—health scores, adoption indices, usage ratios, survey results, etc. They appear in account detail and feed Metric changed style behaviors where configured.
Prerequisites
- Accounts model
- Optional: Products if you scope metrics with
product_id
Field reference
Model keys
| Property | Type | Description |
|---|---|---|
account_id | string | Account the metric row belongs to. |
metric_id | string | Stable name or id for the metric (for example health_score, weekly_active_users). |
timestamp | timestamp | Point in time for the sample. |
Default properties
| Property | Type | Description |
|---|---|---|
value | json | Numeric value stored in a JSON-compatible form; the pipeline parses numeric usage from strings and numbers. |
Optional properties
| Property | Type | Description |
|---|---|---|
product_id | string | When set, scopes the metric to a product from the Products model for multi-product accounts. |
Configure
- Add model → Account metric.
- Build a query that returns one row per sample: account, metric id, timestamp, and value.
- Map to the properties above. Ensure timestamps are valid—see Timestamp formatting.
- Validate, save, refresh.
- Open account detail for a test account and confirm the metric series.
Notes
- Duplicate rows for the same account, metric, product, and time window may be deduplicated or skipped depending on refresh logic; prefer idempotent queries or clear time bucketing.
- Use consistent
metric_idstrings so charts aggregate correctly across refreshes.
Related
- Products
- Usage (plan-dimension utilization, distinct from custom metrics)
- Data models overview