Guides
Alerts & Webhooks

Alert Types

11min

The following alert (aka. notification) types can be created using the Alerts UI Dashboard or Alerts API.

Usage

Usage is a scheduled alert.

  1. Specify using a cron expression (some cron examples).
  2. Set the range (hour, day, week, month).
  3. Select the meter by setting the meterId. It can found by calling the [Meter Definition API].(Get a list of meters) or UI Dashboard
  4. Select the thresholdCondition and set the thresholdValue

When the trigger condition is evaluated at the scheduled time, it will evaluate the condition against the current meter usage by calling the Usage API. If the condition is true for a customer, then it will fire an alert.

Curl


Prepaid Credits

This is a real time alert which applies to prepaid customers only. It fires an alert if a customer's prepaid credits are depleted so they can buy more credits.

  1. Set the prepaid limit thresholdValue
  2. The thresholdCondition is always less-than
  3. The range or time bucket is always the current billing cycle.

If the current prepaid value on the active invoice in the current billing cycle is below the thresholdValue for a customer, then it will fire an alert.

Curl


Invoice

This is a real time alert which applies to customers with billing enabled by assigning them a pricing plan.

  1. Set the invoice total limit thresholdValue
  2. The thresholdCondition is always greater-than
  3. The range or time bucket is always the current billing cycle and applies to the active invoice.

If the current invoice total in the current billing cycle exceeds the thresholdValue, then it will fire an alert.

Curl


Product Item Usage Limit

This is a real time alert which only applies to invoices having product items breakdown. Product items are linked to meters. This alert tracks the quantity or meter units for that meter as shown below on an invoice.

Document image

  1. Select the meter by setting the meterId. It can found by calling the Meter Definition API or UI Dashboard
  2. Select the pricing plan by setting the productPlanId. This can be obtained from the Account Pricing API or UI Dashboard
  3. Set the meter units limit thresholdValue.
  4. The thresholdCondition is always greater-than
  5. The range or time bucket is always the current billing cycle.

If the meter units or quantity on the current invoice for the selected meter and pricing plan exceeds the thresholdValue, then it will fire an alert.

Curl


Product Item Charge Amount

This is the same as Product Item Usage Limit, except it tracks the product item total charge on the current invoice instead of the meter units.

  1. Select the meter by setting the meterId. It can found by calling the Meter Definition API or UI Dashboard
  2. Select the pricing plan by setting the productPlanId. This can be obtained from the Account Pricing API or UI Dashboard
  3. Set the product item charge limit thresholdValue
  4. The thresholdCondition is always greater-than
  5. The range or time bucket is always the current billing cycle.

If the total product item total charge on the current invoice for the selected meter and pricing plan exceeds the thresholdValue, then it will fire an alert.

Curl


Undefined Customer

This is a scheduled alert triggered when some ingested records reference a customer that has not been defined in Amberflo. Note that there is a cool-down period of one hour between alerts of this type.

Curl


Undefined Meter

This is a scheduled alert triggered when some ingested records reference a meter that has not been defined in Amberflo. Note that there is a cool-down period of one hour between alerts of this type.

Curl