Real-time Alerts and Signals - Usage

Real-time Usage and Revenue Alerts and Signals

Amberflo can send alerts and signals via email and Webhooks.

A signal can be defined on a specific customer, or on all customers.
A signal rule can be defined as exceeding a constant number or a percentage change of metered data over time.
Signals can be defined on billing data as well to enable valuable alerts to customers, sales teams, and finance teams.

Signal examples:

  1. Get an email for any customer that exceed 1000 hours per week.
  2. Get a slack message for any customer that used 20% less week over week.
  3. Account manager receives email whenever customer usage surpasses amount of prepaid credits in Wallet.
  4. Head of Finance receives email alert when 25, 50, 75, and 90 percent of quarterly revenue target is reached.

The easiest way to configure Alerts & Signals is via the Console.

1844
PropertyDescriptionRequiredType
nameName of the notification. This must be unique.Yesstring
meter_idid as defined in meter-definition API.Yesstring
cronCron expression for the schedule.
See for details https://crontab.guru/examples.html
No - Default is hourlystring
webhook_urlWeb hook url endpoint. Make a POST http request to this url.Either webhook_url or emailstring
webhook_headersStringified JSON for headers with keywords. See keywords below.Nostring
webhook_payloadStringified json with keywords. See keywords below.Nostring
emailEmail address.Either webhook_url or emailstring
threshold_conditionOptions: less-than, greater-than, percent-changeYesstring
threshold_valueThreshold value.Yesinteger/float
rangeAggregation bucket. Options: hour, day, week, monthYesstring
tenantOptions:
"per-tenant" runs aggregation per tenant
"*" aggregates for all tenants
"Wayne Enterprises, Inc." run aggregation for specific tenant as defined in the customerName of customer details API.
No - Default is "*" for all tenantsstring
enabledYesboolean

Supported keywords for web hook:

KeywordDescription
{{tenant}}customerName from customer details API
{{meter-id}}ID from meter definition API
{{meter-name}}meterApiName from meter definition API
{{notification-id}}notification ID
{{notification-name}}notification name
{{current-value}}current aggregated value of the meter
{{threshold-value}}threshold_value as defined in notification API
{{threshold-condition}}threshold_condition as defined in notification API
{{ui-hyperlink}}Amberflo UI dashboard link to view the usage data for the alert

Sample webhook_payload

{
    text: "Amberflo Notification {{notification-name}} ",
    blocks: [
        {
            type: "section",
            text: {
                type: "mrkdwn",
                text: "Amberflo notification: {{notification-name}}"
            }
        },
        {
            type: "section",
            block_id: "section567",
            text: {
                type: "mrkdwn",
                text: "Your meter value has exceeded the allowed threshold limit."
            }
        },
        {
            type: "section",
            block_id: "section789",
            fields: [
                {
                    type: "mrkdwn",
                    text: "*Tenant*\n {{tenant}}"
                },
                {
                    type: "mrkdwn",
                    text: "*Meter*\n {{meter-name}}"
                },
                {
                    type: "mrkdwn",
                    text: "*Threshold condition*\n {{threshold-condition}}"
                },
                {
                    type: "mrkdwn",
                    text: "*Threshold limit*\n {{threshold-value}}"
                },
                {
                    type: "mrkdwn",
                    text: "*Current value*\n {{current-value}}"
                }
            ]
        },
        {
            type: "section",
            block_id: "section790",
            text: {
                type: "mrkdwn",
                text: "<{{ui-hyperlink}}|Click here to view usage details>"
            }
        }
    ]
}

Rendered slack message

1132

POST https://app.amberflo.io/notification

{
    "name": "api calls over 1000",
    "meter_id" : "{{meter_id}}",
    "cron": "0 0 * * 0",
    "webhook_url": "https://hooks.slack.com/services/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",
    "email":"[email protected]",
    "threshold_condition": "greater-than",
    "threshold_value": "1000",
    "range":"day",
    "tenant":"per-tenant",
    "enabled": true
}