LogoLogo
  • User Guide
    • Getting Started
      • Building a Usage-Based Product in Revenium
      • Setting Up & Using API Analytics & Observability
      • Setting Up & Using Product Analytics
      • Sending Data to Revenium's Metering API
      • Key Concepts & Relationships
    • Connect Your Data
      • cURL Commands for Testing
      • Container-Native Metering
      • Kong
        • Kubernetes Installation
      • Salesforce
        • Revenium Unmanaged Package
          • Anypoint API Experience Hub (AEH)
            • Anypoint API Experience Hub Unmanaged Package Post Installation Instructions
          • Anypoint Community Manager (ACM)
            • Anypoint Community Manager Package Post Installation Instructions
        • Revenium Lightning Web Components
          • Add Components to Experience Cloud site
          • Drop-In Storefront
          • Product Card
          • Product Card (Anypoint)
          • Product Checkout
          • Product Details Button
          • Usage History
          • API Access Requester
      • MuleSoft
        • Metering Policy Configuration
        • Offline Metering Policy Configuration
        • Anypoint API & API Group Synchronization
        • Revenium Connector
        • Disable Default Anypoint Community Manager (ACM) Email Notifications
      • Gravitee
      • Istio
      • Envoy
      • AWS API Gateway
      • Python & Django
      • Golang
      • Spring Boot
      • .Net
      • NodeJs
      • Java/JVM
      • Snowflake
      • Azure API Management
      • IBM
      • Custom Integrations Using Metering Beacons
        • JWT Enrichment
      • Offline Metering via Log Parsing
    • Sources
      • Metering Elements
      • Alerts
        • Alert History
    • API Keys
    • Products & Pricing
      • Product Lines
      • Pricing Rules
        • Revenium Scripting Language
          • RSL Reference
        • Execution Logs
      • SLA Definitions
      • SLA Violation Review
    • Customers
      • Customers
      • Subscribers
      • Subscriptions
      • Subscribers Credentials
      • Subscribers Notifications
    • Billing and Invoicing
      • Manage Refunds
    • Analytics
      • Revenue Analytics
      • Product Analytics
        • Custom Reports (Products)
      • Subscriber Analytics
        • New Subscribers
        • (Daily/Weekly/Monthly) Active Subscribers
        • Most Engaged Subscribers & Customers
        • Historical Usage
      • API Analytics
        • Performance & Availability
        • Compare Periods
        • Traffic by Geography
        • Advanced Search
        • Custom Reports
    • Profile
      • Profile
      • Revenium API Documentation
    • Settings
      • Revenium Users & Organizations
        • Access Permissions by User Type
      • Revenium Subscription
      • Revenium Organizations
      • Notification Templates
      • Transactions Logs
        • Analytics Transaction Log
        • Product Transaction Log
        • Subscription Audit Log
        • No Code Transaction Testing
      • Integrations
        • Data Sync
        • Export Configurations
        • Notification Providers
        • Payment Configurations
          • Customer VAT ID Support
        • ERP Configurations
        • External Integration Logs
        • Identity Providers
      • System Logs
      • Default Configuration Limits
Powered by GitBook

© Revenium - www.revenium.io

On this page
  • Metering Elements Overview
  • Monetization Use Case
  • Metering Element Auto-Creation
  • Steps to Enable Element-Based Pricing Models:
  • Manually Creating & Managing Metering Elements
  • Analytics Use Case
  • Sending Element Usage Data to Revenium
  1. User Guide
  2. Sources

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 5 months ago

Metering Elements Overview

Monetization Use Case

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.

Metering Element Auto-Creation

Metering elements are created automatically when detected in your traffic. If you wish to create specific elements manually before sending traffic containing them, you can do so using the instructions below. You can disable this functionality using a toggle on the metering elements page (though in general we don't recommend you do this as it requires more manual setup)

Steps to Enable Element-Based Pricing Models:

  1. If not using auto-creation for metering elements, create the metering element key value pair using the instructions on this page.

  2. Configure the relevant source with the metering elements you desire Revenium to monitor on the configuration page. This allows the transaction engine to capture metering element information involving transactions from the targeted sources.

  3. Add element-based pricing to your 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.

Manually Creating & Managing Metering Elements

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.

Analytics Use Case

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.

Sending Element Usage Data to Revenium

You can send test element data to the Revenium platform using a curl call like the one below.

// Sending element data to Revenium

curl --verbose --request POST \
     --url 'https://api.revenium.io/meter/v1/api/meter' \
     --header 'content-type: application/json' \
     --header 'x-api-key: ENTER_APIKEY_HERE' \
     --data '
{
  "url": "https://test-asset-url.com/test/",
  "application": "any_application_id",
  "contentType": "application/json",
  "httpProtocol": "HTTP/1.0",
  "method": "POST",
  "responseCode": 200,
  "elements": [{"name": "yourElementName",
                "value": "yourElementValue"}]
}

Note that our 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 for the element to be metered properly (see image below for an example)

Data Connectors
Source
Source
Product
Figure 2: Create Metering Elements
Example of a source configuration that would allow the metering elements in this call to be metered properly.