# Weekly active seats setup

## Business definition

Unique customer users who completed at least one workflow in the seven complete
UTC days before each snapshot. Exclude internal users. Include zero for an
existing customer with no qualifying activity. The unit is seats.

## Data owner

- Warehouse and dataset:
- Query owner:
- Source ingestion finishes by:
- Contact for failed or late source loads:

## Identity and metric

- Company external ID matches Cust's existing External ID exactly.
- Query company reference: extid- followed by that external ID.
- Cust metric label: Weekly active seats
- Cust metric API name: weekly_active_seats
- Target: Company
- Format: Number
- Grain: Daily (the query already calculates the seven-day window)
- Company metric layout: add Weekly active seats

## Sync configuration to agree with Cust

- Source: BigQuery
- Resource type: metric_data
- Query: attached weekly-active-seats-bigquery.sql, with source tables adapted
- Field mapping (Cust field to query column):
  company: company
  metric_slug: metric_slug
  value: value
  timestamp: timestamp
- ID fields: company, metric_slug, snapshot_date
- Updated-at field: snapshot_date
- Example schedule: daily window 06:00 to 07:00, workspace timezone UTC
- First-load history: query returns the latest 31 snapshot dates
- Older or corrected historical data: agree on a backfill range and run

## Acceptance check

Record the source and Cust values for the same company and snapshot timestamp.

| Check | Source | Cust |
| --- | --- | --- |
| Company external ID | | |
| Metric API name | weekly_active_seats | weekly_active_seats |
| Snapshot timestamp, ISO 8601 with timezone | | |
| Value, seats | | |
| Zero-activity customer included | | |

Confirm Data synced shows the configured metric resource and its last sync.
Open the company's metric chart and compare the individual reading, not a
separately aggregated rolling value. Investigate any mismatch before using the
metric in a customer review or health rule.
