Usage event
Zenskar relies on usage events to support usage-based pricing models. These events represent units of customer activity—such as API calls, data transferred, minutes streamed, or any other measurable action—that are used to calculate charges.
What is a usage event
A usage event is a single record of customer activity. It typically includes:
- customer identifier
- timestamp
- quantity
- unit of measurement
- optional metadata (e.g., region, SKU, feature type)
Usage events can be ingested into Zenskar from multiple systems using APIs, CSV uploads, or data connectors.
Usage events can be granular or aggregated
Zenskar accepts two forms of incoming usage events:
- Granular usage events – representing raw, individual units of activity (e.g., “user A streamed 1 minute at 11:34 PM”).
- Aggregated usage events – representing pre-summarized activity (e.g., “user A streamed 1,000 minutes this month”).
No matter the format, all usage events must follow a consistent schema and be mapped to the appropriate customer and metric in Zenskar.
From usage events to billable metrics
Usage events are not billed directly. Instead, Zenskar transforms usage events into billable metrics, which are values used to drive pricing calculations.
This transformation is done using one of two methods:
- a visual query builder (for business users)
- a SQL-based query builder (for advanced transformations)
For example:
- you may use the sum of all “compute hours” in a billing period to create a billable metric
- or take the max number of “active users” on a given day
flowchart LR subgraph InputData [Usage event types] Granular[Granular] Aggregated[Aggregated] end subgraph Processing Aggregator[SQL aggregation using SUM, COUNT, MIN, MAX, etc.] end subgraph Output [Billable metrics] Metrics[Billable metrics] end Granular --> Aggregator Aggregator --> Metrics Aggregated -->|Already in billable form| Metrics Metrics --> Invoicing[Invoice generation]
Terminology
Term | Definition |
---|---|
Usage event | A single record of customer activity, ingested into Zenskar |
Aggregate | A pre-summarized usage event (e.g., monthly totals) |
Billable metric | A derived metric used to compute charges, created from usage events |
Updated 3 days ago