Skip to main content

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

Field reference

Model keys

PropertyTypeDescription
account_idstringAccount the metric row belongs to.
metric_idstringStable name or id for the metric (for example health_score, weekly_active_users).
timestamptimestampPoint in time for the sample.

Default properties

PropertyTypeDescription
valuejsonNumeric value stored in a JSON-compatible form; the pipeline parses numeric usage from strings and numbers.

Optional properties

PropertyTypeDescription
product_idstringWhen set, scopes the metric to a product from the Products model for multi-product accounts.

Configure

  1. Add model → Account metric.
  2. Build a query that returns one row per sample: account, metric id, timestamp, and value.
  3. Map to the properties above. Ensure timestamps are valid—see Timestamp formatting.
  4. Validate, save, refresh.
  5. 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_id strings so charts aggregate correctly across refreshes.