LogoLogo
  • AI FinOps
    • ✨Revenium: AI FinOps
  • 🚀Quick Start Guide
  • 💹AI Analytics
  • ❗Cost & Performance Alerts
  • 📜System & Transaction Logs
  • 🗣️Customer & Subscriber Management
    • 🏢Organizations
    • 👥Subscribers
    • 🔑Subscriber Credentials (AI)
  • AI & API Monetization
    • 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

Was this helpful?

Customer & Subscriber Management

In Revenium, the following hierarchy and nomenclature is used to manage internal or external customers, users, subscribers, and credentials / API keys.

Term
Usage
Middleware Parameter

Organizations

Organizations can be either company names or internal business units. The organization object in Revenium supports various metadata fields to allow you to easily sync these objects to internal systems (typically CRM).

Example Values:

AcmeSoft (customer)

Finance (internal)

Organizations can be associated with one or many subscribers

organization_id

Subscribers

Subscribers are individuals who consume AI or digital products. The subscriber object contains their email address and name. Email addresses are used to identify the subscriber in API / middleware calls.

Example Values: joe@acme.com

Subscribers can be associated with one or many subscriber credentials.

subscriber_identity

Subscriber Credentials

Credentials contain unique identifiers used by subscribers to access services. In some use cases, it will be the email address of the subscriber, but it could also be an alias for different API keys used by internal developers or external customers, particularly when one subscriber could have multiple API keys and you wish to track usage for each credential separately. Example Values: key1-hubspot, key2-financeProject

subscriber_credential

Example API Call Incorporating Customer Data

import openai
import revenium_middleware_openai

# Ensure REVENIUM_METERING_API_KEY & 
# OPENAI_API_KEY environment variables are set

response = openai.chat.completions.create(
    model="gpt-4",
    messages=[
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "What is the meaning of life?"
        },
    ],
    max_tokens=500,

    # Example usage data showing how organizations, subscribers,
    # and credentials are used.
    usage_metadata={
            "organization_id": "AcmeSoft",
            "subscriber_identity": "joe@acme.com",
            "subscriber_credential": "key1-hubspot",
        },
)
print(response.choices[0].message.content)

Last updated 1 month ago

Was this helpful?

🗣️