
Setting up a Billable Item
Maple supports metering of more transient usage-based items or more persistent object-based items in your product. Maple manages these two concepts distinctly because they made a difference when tracking MRR for your business. Revenue generated through object-based items (such as seats deployed) count towards recurring revenue while revenue generated through usage-based items (such as API calls) do not unless there are a minimum set of pre-purchased items. With both events and objects synced into Maple, you can set up billable metrics that can be aggregated over metadata captured in theproperties
field.

Metrics
Billable metrics are composed of filters and aggregation clauses. Think of these asWHERE
and GROUP BY
SQL clauses respectively. For example, you can create a billable metric for the COUNT()
of API calls based on the following usage based event
COUNT()
to count the number of events that meet the filter constraintsMAX(property)
to get the maximum value of the property for events that meet the filter constraintsSUM(property)
to get the sum of the property for the events that meet the filter constraintsUNIQUE(property)
to get the count of the number of unique values for the property for events that meet the filter constraintsAVG(property)
to get the average of the property for the events that meet the filter constraintsUnique Count(property)
to get the unique count of the property for the events that meet the filter constraintsLast Reported In Period(property)
to get the last reported value of the property in a time period for the events that meet the filter constraintsLast Reported In History(property)
to get the last reported value of the property for the events that meet the filter constraintsHistorical Sum(property)
to get the historical sum of the property for the events that meet the filter constraints

Metrics in Product Pricing
One or more metrics can then be added to a single product pricing as separately priced components. This allows you to offer plans that contain components of different billing types.
- seat-based at $100/mo/user, and
- has a reporting feature that is charged by usage ($2/per report generation)