Segmented Aggregations - m3ter Documentation
Segmented Aggregations
Segmented Aggregations allow you to segment the usage data collected by a single Meter. This capability is very useful for implementing some pricing and billing use cases. This topic introduces an example usage-based pricing use case and explains how to create and work with Segmented Aggregations:
- Example Use Case
- Configuration for Example Use Case
- Creating Segmented Aggregations
- Pricing Plans with Segmented Aggregations
- Reviewing Bills for Segmented Aggregation Pricing
- Custom Descriptions for Segmented Aggregations
- Using Copy or Cut and Paste to Create and Manage Segment Values
- Using Wildcards or Defaults in Segmented Aggregations
Example Use Case
Suppose you offer a service to companies to perform background checks on employee candidates to support their hiring process. Pricing for this service will vary by candidate location and the level of check done. The service is offered for candidate locations across three countries and you can perform three levels of background check for each location: Standard, Extended, or Complete. If you want to price differently for each possible combination of check for Country/Level, this would mean having to set up multiple Meters/Aggregations to support usage-pricing for all possible combinations. This then places the burden of deciding which Meter to use for pricing on you when sending customer usage data into the m3ter platform. For such cases, you can use Segmented Aggregations on the same Meter usage data, which means you can always send us data for the same Meter and allows a different pricing to be created for each segment.
Configuration for Example Use Case
Here’s the configuration for the example.
Meter
Create and configure a single Meter with three Data Fields:
| Data | Field | Category | Example Values |
|---|---|---|---|
| Candidate location | location | Where | China | USA | UK |
| Background check level | type | What | Standard | Extended | Complete |
| Number of checks performed | quantity | Measure | 1 |
Aggregations
First, you can define which Meter Data Fields are part of the segmented Aggregation - for the current example, these are location and type.
Tip: Only String Data Fields can be Segmented! That is: Who, What, and Where Data Fields. Numeric Data Fields, such as Measure, Cost, and Income cannot be segmented.
Second, you can then define different segmented values for the Aggregation, where for each value you want to assign a specific pricing. For the current example, let’s suppose we want to set up six segment values:
| Segments | location | type |
|---|---|---|
| Segment value 1 | China | Standard |
| Segment value 2 | China | Extended |
| Segment value 3 | USA | Extended |
| Segment value 4 | USA | Complete |
| Segment value 5 | UK | Standard |
| Segment value 6 | UK | Complete |
Creating Segmented Aggregations
This section explains how to create a Segmented Aggregation for the example use case described above. It’s assumed that a Meter with the required three Data Fields has been set up.
Note: Limit on Segmentation Fields? The maximum number of fields that can be used for segmentation is 5.
To create a Segmented Aggregation:
Select Metering>Aggregations. The Aggregations page opens.
In the Product drop-down, select the Product for which you want to create the new Segmented Aggregation.
Select Create aggregation. The Create page opens.
Under Aggregation details, enter a Name and Code for the new Aggregation:
Under Meter settings, select the Meter previously created for the example and with the required Data Fields: Location, Type, and Quantity:
Enter the Aggregation settings:
Open the Segments panel:
In the Segments panel, select the Meter fields you want to use to create segments. The panel adjusts to add a first blank row for the selected Meter fields:
Enter segment values for the first row and then use the Add segment button to successively add the required segments you want to price by. For the current example, we’ve added six segment values using the Location/Type Meter fields:
Select Create aggregation. The Aggregation details page opens:
If you want to edit an Aggregation’s details, select the Edit button, make your changes, and click Update.
If you want to remove an Aggregation, return to the Aggregations page and select the Delete button for the Aggregation:
Select Yes to confirm the delete action.
Tip: Create Segmented Aggregation using API call? You can also use the Create Aggregation API call.
Pricing Plans with Segmented Aggregations
When pricing Plans you can define a pricing for each segmented value set up for an Aggregation. For more details, see Pricing Plans Using Segmented Aggregations.
Reviewing Bills for Segmented Aggregation Pricing
If you use Segmented Aggregations to price your Product Plans, then at billing one line item will be created per Aggregation segment value you’ve used for pricing and any default pricing you’ve used:
- Each Bill line item shows a charge for a priced segment.
- If you do not use a segment value for pricing, then no line item for this appears on the Bill.