Example 2: Compound Aggregation for Sign-Up Bonus - m3ter Documentation

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Suppose your SaaS company provides a “build-and-host” application service, one which allows customers to develop and run software applications and host these applications on your service:

This topic provides a worked example to illustrate how you can use a Compound Aggregation to provide a suitable metric for pricing Product Plans and easily satisfy this SaaS UBP use case - the pricing metric the Compound Aggregation provides will ensure the sign-up bonus is allowed for when billing is run for Accounts placed on the priced Product Plans. The example goes on to show how to submit some test data against a test Account and then generate a Bill for the test Account and check billed amounts against submitted usage.

Step 1: Create Product

Products represent a product or service that you offer to your end customers. A Meter, Aggregation, Plan Template, Plan, or Pricing typically all belong to a Product. To create a Product:

  1. In the Console, select Products. The Products page opens.

  2. Select Create product. We’ll create a single Product called App Hosting Standard:

  3. Select Create product.

The App Hosting Standard Product can now serve as a container for any Meters, Aggregations, Plan Templates, Plans, or Pricings we’ll need to create and configure for the example.

Step 2: Set up Meters

Meters define the Data Fields that your system will use to submit usage data to the m3ter platform:

To create Meters:

  1. Select Metering. The Meters page opens.
  2. In the Product drop-down, select App Hosting Standard.
  3. Select Create meter.

Here’s the set up for the first Meter to support the pricing model we want to use in the example: For the example, we’ve set up App Hosting Meter 1 and added the single Data Field called Number Apps to capture usage data.

  1. Select Create meter.
  2. Return to the Meters pages and repeat steps 2 and 3 to set up a second Meter:

We’ve set up a second App Hosting Meter 2 and added a single Data Field called Number Requests to capture usage data.

  1. Select Create meter.

We now have a two Meters for the example, which we can use to collect usage data on any Account that consumes the App Hosting Standard Product. This metered usage data will serve as the basis for the Compound Aggregation pricing metric we want to apply to rate Product consumption yet allow for a sign-up bonus.

Step 3: Define Aggregations

Aggregations define how to transform into a single number the individual measurements submitted to a Meter Data Field as usage data. For example, you may choose to simply SUM the submitted usage data values. In this way, Aggregations define the usage-based pricing metrics you’ll use to set up pricing for your products and services. For the usage-based pricing model we want to implement in our example, we’ll need to create two simple Aggregations based on the usage data collected by our two Meters - App Hosting Meter 1 and App Hosting Meter 2. Each simple Aggregation will target a different Meter and field to define a metric:

We’ll then create a Compound Aggregation that references these two simple Aggregations and uses a calculation to ensure the sign-up bonus is factored into the pricing metric it provides. To create two simple Aggregations:

  1. Select Metering>Aggregations:

The Aggregations page opens.

  1. In the Product drop-down, select App Hosting Standard.
  2. Select Create aggregation.

Here’s the setup for the first simple Aggregation:

The Max Apps Hosted Aggregation targets the Number Apps Data Field on App Hosting Meter 1 and uses the Maximum value of the field.

  1. Select Create aggregation.
  2. Repeat steps 3. and 4. to create a second Aggregation.

Here’s the setup for the second Aggregation:

The Number App Requests Aggregation targets the Number Requests Data Field on App Hosting Meter 2 and uses the Sum of values of the field.

  1. Select Create aggregation.

We can now use these two simple Aggregations to set up a Compound Aggregation that provides the pricing metric we need to meet the sign-up bonus UBP use case.

To create a Compound Aggregation:

  1. Select Metering>Compound aggregations:

The Compound aggregations page opens.

  1. In the Product drop-down, select App Hosting Standard.
  2. Select Create compound aggregation.

Here’s the setup for the Compound Aggregation:

Note that for the Calculation:

  1. Select Create compound aggregation.

We can now use the App Requests Minus Free Compound Aggregation to price a Plan for the App Hosting Standard Product.

Step 4: Create Product Plan

Plans represent a pricing plan for one of your products or services. A Plan is always derived from a Plan Template and inherits settings from the Plan Template which control billing operations, such as billing frequency and currency. You can override some of these settings when you create a Plan from a Plan Template. To meet the example requirements:

To create a Product Plan Template:

  1. Select Pricing>Plan templates:

The Plan templates page opens.

  1. In the Product drop-down, select App Hosting Standard.
  2. Select Create plan template. The Create page opens.

Here’s the setup for our Product Plan Template: For the App Hosting Plan Template 1 we’ve:

  1. Select Create plan template. You are returned to the Plan template details page.

We can now create a Product Plan for the example based on this template.

To create a Product Plan:

  1. Select Pricing>Plans. The Plans page opens.
  2. In the Product drop-down, select App Hosting Standard.
  3. Select Create plan. The Create page opens.

Here’s the setup for our Product Plan:

  1. Select Create plan. The Plan details page opens for our new Product Plan.

We can now price this Plan using our App Requests Minus Free Compound Aggregation.

Step 5: Price Product Plan

Pricing allows you to configure the cost of usage data under a specific Plan you apply to an Account and is used to calculate bills. We can use the Pricing editor in the m3ter Console to quickly price up our Product Plan to meet the pricing requirements for the example.

To price Product Plan:

  1. Select Pricing>Pricing editor:

The Pricing editor page opens.

  1. In the Product drop-down, select App Hosting Standard.
  2. Select Add plans. The Select plans dialog opens and lists all Plans created for the App Hosting Standard Product.
  3. Check App Hosting Plan 1 and select Confirm. The dialog closes and the Plan is added to the Pricing editor page.

We’ll use the Compound Aggregation we created at Step 3 for the usage-based metric to price the Plan in accordance with the requirements set out in the example.

  1. Click Add compound aggregations. A Select compound aggregations dialog appears and lists all Compound Aggregations created for the App Hosting Standard Product.
  1. On the Select compound aggregations dialog check App Requests Minus Free.
  2. Click Confirm. The dialog closes and the selected Compound Aggregation is added to the Pricing editor page for the added Plan. You’ll see that no Active pricing has been configured for the Plan using this Compound Aggregation.
  3. In the pricing grid, select Create Plan pricing for App Requests Minus Free. The Create pricing page opens:
  1. Under Pricing settings enter:
  1. Ignore the Minimum spend settings, which are not required for the current example.
  2. Under Pricing settings:
  1. Ignore the Prepayment/Balance overage pricing settings. We are not setting up any Prepayments or Balances on Accounts in the current example.
  2. Select Create pricing. The Create pricing page closes and you are returned to the Pricing editor page:

We now have a Product Plan priced according to the pricing requirements.

Step 6: Create Test Account and Attach Priced Plan

An Account represents one of your end-customers and contains the end-customer name and contact details:

For this step, we’ll create a test Account for the example and attach our priced Plan to it.

To create a test Account and attach Plan:

  1. In the main Console navigation, select Accounts. The Accounts page opens.
  2. Select Create account. The Create page opens.
  3. Enter the details of the new Account:
  1. Select Create account. The Account details page for the new Account opens with the Overview tab selected:

For the worked example, we’ve created the App Hosting Customer 1 test Account.

  1. Select the Attached plans tab.
  2. On the Active and pending attached plans panel, select Create plan attachment. The Create page opens.
  1. On the Create page, leave the radio button for Plan as the default setting and enter the Plan attachment details for the Account Plan:
  1. Ignore the Plan attachment settings
  2. Select Create plan attachment. Back on the Attached plans tab, the Account Plan is shown on the Active and pending attached plans panel:

We now have a test Account set up that will be billed according to the pricing schema we’ve configured for the Plan for any metered usage of the Product.

Step 7: Submit Data to Test Account and Check Bill

We’ll now submit some test data to our test account for App Hosting Meter 1 and App Hosting Meter 2, which will allow us to generate a Bill for the test Account and check that the usage charges on the Bill for the submitted test data are correct.

  1. Select Accounts. On the Accounts page, select the Name hotlink text of the App Hosting Customer 1 test Account we created at Step 6. The Account details page opens with the Overview tab selected.
  2. Select Submit usage:

A Submit usage data dialog appears. To submit usage data measurements for the Account, you must complete two stages using the dialog.

  1. Under stage 1: Select a meter, use the Meter drop-down to select App Hosting Meter 1 and then select Next. The dialog adjusts to show stage 2: Define measurements and send:
  1. Enter a test data Value for the Number Apps Data Field:

  2. Select Submit usage. If the measurement is ingested successfully, under Log you’ll see a {"result" : "accepted"} message under the Log section of the Submit usage data dialog.

  3. For the example, repeat steps 3. to 5. to submit two more measures for the App Hosting Meter 1>Number Apps Data Field:

  1. Close the Submit usage data dialog.
  2. Repeat Steps 2 to 7, to re-open the Submit usage data dialog, but this time select App Hosting Meter 2 and submit a series of measures for the Number Requests Data Field we set up on that Meter:
  1. Go to the test Account details page and select the Bills tab.
  2. On the Bills tab, select Run billing. The Run billing dialog appears.
  3. In the example, we are using monthly billing and the test data was submitted in May 2025, so we select:
  1. Select Run billing. The dialog closes and your Bill job is queued.

  2. When the Bill has generated, it will be listed on the Bills tab for the Account. Select the Reference hotlink text to open the Bill in Bill management.

Before checking a sample Bill we’ve generated for the Account, we can calculate manually what the cumulative usage charges should be for the usage-based pricing we’ve implemented:

For the example, we can see that the Bill based on test usage data we submitted has been calculated correctly in accordance with our usage-based pricing schema.