Logo

Usage and Balance NotificationsKeep your customers informed, drive expansion, and prevent overage surprises with automated notifications.

Peter Marton
Peter Marton@slashdotpeter
cover

We are thrilled to announce Notifications, which provide automated triggers when specific entitlement balances and usage thresholds are reached, ensuring that your customers and sales teams are always informed. For example, you can email your customers when they reach 75%, 100%, and 150% of their monthly token allowance and notify your sales team when an overage happens to drive expansions.

Why Notifications Matter

Usage and balance notifications are essential for proactive customer management to:

  • Keep Customers Informed: Notify your customers when their usage reaches critical thresholds, such as 50%, 75%, and 100% of their allocated resources. This transparency helps customers manage their consumption effectively.
  • Prevent Overage Surprises: Alert customers as they approach or exceed their limits, allowing them to take corrective action before incurring unexpected charges with usage-based pricing.
  • Drive Revenue Growth: Notify your sales team when customers are nearing their limits, providing an opportunity to engage them in discussions about upgrades or additional services. This is a crucial strategy in Product-Led Growth (PLG) and Product-Led Sales (PLS) models.

Who Should Use Notifications?

OpenMeter's notification feature is ideal for businesses that:

  • Want to Increase Transparency: By providing timely updates on usage, you empower your customers to manage their resources better.
  • Aim to Boost Conversions: Leverage usage data to create timely opportunities for upselling and cross-selling, essential in PLG and PLS approaches.
  • Offer Spend Management Tools: Enable your customers to set their usage limits and receive notifications, giving them more control over their spend.

How does this work?

Notification is built on OpenMeter's real-time and event-driven usage metering, allowing customers to receive WebHooks in their systems whenever a specific notification condition is met. Your system can then handle webhooks to send notifications like emails, Slack messages, etc. In OpenMeter, you can set up multiple channels and rules, while notifications are triggered once and only once per entitlement period.

Getting Started with Notifications

To get started with notifications, visit the OpenMeter Cloud Dashboard or use one of our SDKs:

1. Set Ip a URL to receive notifications

Create a URL that can receive notification webhooks or use the Svix Playground.

2. Define the channel to receive notifications

OpenMeter needs to know where to deliver the notifications to. In this step, we are creating a notification channel that will be used to deliver events:

import { OpenMeter } from '@openmeter/sdk';
 
const openmeter = new OpenMeter({
  baseUrl: 'https://openmeter.cloud',
  // OpenMeter Cloud only
  token: '<API_TOKEN>',
});
 
const channel = await openmeter.notification.channels.create({
  type: 'WEBHOOK',
  name: 'My Webhook Channel',
  // Your URL to receive notification webhook
  url: 'https://play.svix.com/in/e_4Iv1ft38HaoM36eVa3X1Q7w1vN5',
});

3. Define notification rules

In this example, we are to create a Balance Change Notification Rule that emits an event to the channel if the gpt_4_tokens feature's usage reaches 80% or 100% (the feature is defined in the Entitlements Getting Started guide).

await openmeter.notification.rules.create({
  type: 'entitlements.balance.threshold',
  name: 'Limit Notifications',
  channels: [channel.id],
  thresholds: [
    {
      type: 'PERCENT',
      value: 80,
    },
    {
      type: 'PERCENT',
      value: 100,
    },
  ],
});

4. Ingest meter events

Start ingesting metered events for a subject; when the usage reaches 80%, a notification should arrive at the webhook URL defined in the first two steps.

Get Started Today!

Ready to leverage Notifications?

With Notifications, OpenMeter empowers you to offer better customer service, prevent overages, and unlock new growth opportunities. Start today and take your customer management to the next level!