Metering Elements
Metering Elements are key value pairs that allow you to track and/or monetize specific elements (such as the content of query parameters) in addition to transaction call counts.
Last updated
Metering Elements are key value pairs that allow you to track and/or monetize specific elements (such as the content of query parameters) in addition to transaction call counts.
Last updated
© Revenium - www.revenium.io
Metering Elements are commonly used in monetization when a transactional pricing model is not detailed enough for the service you are selling. A common scenario for element usage is when certain activities cost you far more to deliver than others, and where you wish to scale costs for users based on different types of usage.
For example, imagine that you operate a shipping tracking service, and you want to charge a subscription fee based on how many regions that an end subscriber accessed in a subscription period. In this example, you don't want to charge transactionally, but instead you will charge a flat fee per region accessed. You can accomplish this type of pricing model using Metering Elements.
Create the metering element key value pair using the instructions on this page.
Configure the relevant source with the possible metering elements for Revenium to monitor on the Source configuration page. This allows the transaction engine to capture metering element information involving transactions from the targeted sources.
Add element-based pricing to your Product configuration (note, the sources configured in step 2 must be included in the Product). This will tell the Revenium metering engine how to charge the end subscriber when the metering elements are received.
Click the 'plus' sign or 'edit' icon to create or manage existing elements respectively. A modal will open allowing you to create or edit an existing Metering Element. (Figure 2)
Attribute | Usage |
---|---|
Element Description | A human readable value that will help you to identify the purpose of the element when viewed in reports, on invoices, etc. |
Element Key Name | The key in the JSON key-value pair that makes up the element. Revenium will look for this key & value in the data you send and rate it according to the pricing rules you define in the Product. |
Element Type | Defining your element as a string or number enables different Product billing models like 'max' or 'average' value calculations. If your use case will contain a mix of numbers and strings, define the value as a string. |
If you simply wish to capture the usage of different query parameters in your API calls, the configuration is exactly the same as the monetization use case, with the exception of Step 3. There is no need to define a pricing model for metering element usage if you are not charging subscribers based on the elements sent to Revenium.
Once you have followed the steps above to enable elements in your account, you can send test element data to the Revenium platform using a curl call like the one below.
Note that our Data Connectors have built in capabilities to convert query parameters and their values into metering element data as well.
Note that the url
parameter in the data block below must match the resource configuration on the related Source for the element to be metered properly (see image below for an example)