Key Concepts
Events
Events are individual records of activity that represent something happening in your product (e.g., a user logs in, an email is sent, data is stored).Events are typically sent to Enso via API or uploaded as CSV files. Example event log (CSV):
customer_id | timestamp | activity | value |
---|---|---|---|
CUST001 | 2025-05-01T10:00:00 | Log_in | 1 |
CUST001 | 2025-05-01T11:00:00 | Log_in | 1 |
CUST002 | 2025-05-01T12:00:00 | 1 |
Meter / Metric
A meter (or metric) defines what you want to measure and bill for.A meter aggregates events over a given period (such as daily, monthly, or quarterly) to produce a usage value that can be invoiced.
Meter Properties
-
Aggregation Method:
Determines how events are combined to calculate usage.
Common methods:sum
(total usage)count
(number of events)max
(peak usage)min
(lowest usage)cumulative_start
(running total from a start date)cumulative_end
(running total until a reset date)
cumulative_start
orcumulative_end
), you can configure when the meter resets using these fields:- resetType:
none
(never reset)annual
(reset every year)monthly
(reset every month)custom
(reset on a custom date)
- monthOfReset:
Required ifresetType
isannual
. Select the month when the reset should happen. - dayOfReset:
Required ifresetType
isannual
ormonthly
. Select the day of the month for the reset. - customDate:
Required ifresetType
iscustom
. Specify the exact date for the reset.
-
Window Options:
Defines the time period over which events are aggregated.
Common windows:- Daily
- Monthly
- Quarterly
-
Filters:
Allow you to include only specific events in your metric calculation.
You can filter on event fields (e.g., browser, region) using logical conditions. Example filter (JSON):
- Monthly active users (aggregates login events per month)
- GB of storage used (aggregates storage events per month)
- Emails sent (aggregates email events per month)
- Quarterly API calls (aggregates API call events per quarter)
Usage
Usage is the result of aggregating events for a meter over a specific time window.Usage is what appears on the invoice for each customer.
How It All Connects
Below is a diagram showing the relationship between events, meters, usage, and invoices:- Events are raw activity logs.
- Meters aggregate events using defined methods, windows, and filters.
- Usage is the aggregated value for a customer and period.
- Invoices are generated based on usage.
Summary Table
Concept | What it is | Example |
---|---|---|
Event | Individual activity record | User login, API call |
Meter | Aggregates events over a period | ”Monthly Active Users” |
Usage | Aggregated value for billing | 500 logins in May 2025 |
Invoice | Bill sent to customer | $50 for 500 logins |
Tip:
Events, meters, and usage are the foundation of usage-based billing in Enso.
Understanding their relationship is key to accurate and flexible billing.