Creating Meter Types
Meter types can be created either in the Usage Metering View or by using the API, see API Reference. See Usage Metering Concepts and Relations and Getting Started with Usage Metering for information about what meter types are and what they are used for.
To create a meter type in the user interface:
Click on the Usage metering option in the left navigation panel in the graphical user interface.
Click on the Create meter type button located at the top right in the Usage metering view.
The Create meter type dialog opens.
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.
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 Usage Metering View.
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.
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 Meter Processor.
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.
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.
Select how you want to aggregate the data in the Aggregation type field;
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.
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
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.
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.
Select the timezone that that you want to base the Active from, Active to, and Schedule on in the Timezone drop-down list.
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.
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:Day:
Start time - Enter the time of day to reset the usage counter.
Week
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.
Start time - Enter the time of day to reset the usage counter.
Month
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.
Start time - Enter the time of day to reset the usage counter.
Year
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.
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.
Start time - Enter the time of day to reset the usage counter.
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.