Creating Meter Types

Cloud_Edition_button.webp

Meter types can be created either in the or by using the API, see . See and for information about what meter types are and what they are used for.

To create a meter type in the user interface:

  1. Click on the Usage metering option in the left navigation panel in the graphical user interface.

    UM-button.png
  2. Click on the Create meter type button located at the top right in the Usage metering view.

    The Create meter type dialog opens.

  3. Enter a unique name for your meter type in the Meter type name field, for example “Streaming service”. The name can consist of a maximum of 80 characters.

  4. If you want to add a more detailed description for the meter type, you can enter it in the Description field, for example, “Streaming service basic usage based subscription”. This description can consist of a maximum of 200 characters and will be displayed if you expand the meter type in the .

  5. If you have your products defined in an external system that Usage Engine is connected to, enter the identifier of the product in the External reference field. External references can be used when creating meters using the APIs. They must be unique, and they can consist of a maximum of 100 characters.

  6. Select a category for the meter in the Category field.
    The category is used when configuring the meter processor for guiding usage, where you can add different guiding rules for different categories, see .
    When you expand this field by clicking on the arrow to the right, you can either select from existing categories or create a new category by entering the name of the category in Add Field and clicking on the plus sign. If you do not want to specify any categories, you can use the DEFAULT category which will always be available.

     

Note!

Adding a field does not mean that it will be saved, it only means that it is available for selection. Any categories that are not used will be removed.

 

You can add the same category to multiple meter types to group several product offerings together. This allows you to set up meter types that are affected by the same set of input data without needing to re-configure the meter processor in your stream.

Example -Using Category to group products with different offerings

Scenario 1: Adding meters types with different product offerings under the same category

You provide a tiered streaming service with a gold and a silver subscription. Gold customers get the first 10 streaming units free and silver customers get the first 7 steaming units free. You have two meter types (gold, and silver) labeled with the same category, “streaming“. You now want to add a third subscription tier to your product, ‘bronze'. You can label it with the same category ‘streaming’ without the need to update any configuration in your meter processor.


Scenario 2: Grouping meter types with different billing periods and rates under the same category

You provide two subscription types for your product, a graphics editing platform. The first subscription type bills customers monthly at one rate and the second bills them yearly at a different rate. Both meter types are set up with the same category ‘graphics editing', but they will have separate meters configured to aggregate usage over different periods.

 

  1. Select a unit in the Unit field. This will be the unit you want to count usage in, for example, minutes, bytes, or sessions. If the unit you want is unavailable, you can create it directly in the drop-down. The Unit field can consist of a maximum of 50 characters.

Note!

Adding a unit does not mean that it will be saved, it only means that it is available for selection. Any units that are not used will be removed.

  1. Select how you want to aggregate the data in the Aggregation type field;

    1. Sum - will summarize all values within a selected time interval. For example, if you get 3 records with the values 3, 5, and 7, they will be summed up as 3 + 5 + 7 = 15. The initial value is 0.

    2. Increment - will increment the number of occurrences within a selected time interval. For example, if you get 4 records with the values 2, 4, 6, and 8, the number of records will be counted as 1 +1 + 1 +1 = 4. The initial value is 0

    3. Max - will pick the highest value registered within a selected time interval. For example, if you get 3 records with the values 2, 8, and 4, the highest value which is 8 will be picked. The initial value is Null.

    4. Min - will pick the lowest value registered within a selected time interval. For example, if you get 3 records with the values 2, 8, and 4, the lowest value which is 2 will be picked. The initial value is Null.

  2. Select the timezone that that you want to base the Active from, Active to, and Schedule on in the Timezone drop-down list.

  3. Select the start and end of the active period in the Active from and Active to fields. By default,
    the start time will be 00:00:00, and the end time will be 23:59:59 in the timezone you have added in the previous field. The timespan between Active from and Active to is when all the meters belonging to this meter type are active. If Active from is set to a time in the past, it will be converted to the time that the meter type was created.

  1. Configure the Reset schedule by selecting interval in the Interval type drop-down list. This is used to calculate the period end on the meters. When period end occurs, the meter value is reset and the collected data is sent to downstream systems using the forwarding function in your stream.

    Depending on which option you select, you will see different settings beneath:

    1. Day:

      1. Start time - Enter the time of day to reset the usage counter.

    2. Week

      1. Day(s) of the week - Enter the day(s) of the week you want to reset the usage counter, one specific day, or multiple days.

      2. Start time - Enter the time of day to reset the usage counter.

    3. Month

      1. Day(s) of the month - Enter the day(s) of the month you want to reset the usage counter, one specific day, or multiple days.

      2. Start time - Enter the time of day to reset the usage counter.

    4. Year

      1. Month(s) of the year - Enter the month(s) of the year you want to reset the usage counter, one specific month, or multiple months.

      2. Day(s) of the month - Enter the day(s) of the month you want to reset the usage counter, one specific day, or multiple days.

      3. Start time - Enter the time of day to reset the usage counter.

  2. Click on the Create button.

If everything has been configured correctly, you will get a message saying that the meter type has been successfully created, and it will be listed in the Usage metering view.