connection.usage.change event

The connection.usage.change event is triggered when the connection's data, voice, or SMS usage is changed.

Form

Parameters

Name Type Required Description
Usage type String Yes

Type of usage to be filtered by, options are:
Data - Data usage in megabytes as reported by the CDRs, this value is synchronized from carriers daily.
Data (Estimated) - Data usage in megabytes as reported via RADIUS. This value updates in real-time, but is not guaranteed to be accurate.
SMS - SMS usage as reported by the CDRs, this value is synchronized from carriers daily.
Voice - Voice minutes usage as reported by the CDRs, this value is synchronized from carriers daily.

Time period String Yes Month to date - Evaluate the usage of the connection in the current billing month.

Last time period - Allows you to specify the "Last period" value to determine the usage of the resource over the defined time period.

The period(Last time period) used for evaluation will include all of the first day for the period requested. For example, if you specified 2d(2 days), and the trigger is executed at 5am on the 4th, the trigger will evaluate usage from the 2nd at midnight, through 5am of the 4th: 53 hours worth of data, not 48 hours.

Since activation - Evaluate the usage of the connection since the connection was activated. This feature can look back at most 180 days, if the connection has been active longer than 180 days, the usage will be calculated for the last 180 days.

Usage threshold value Integer A minimum limit for the usage in megabytes (for data), number of messages for SMS, and minutes for voice. If this value is specified, the value compared against the connection usage to execute the trigger. If the threshold is set to 10, the value of the current connection's usage must exceed 10 MB (10.01, 11, or 99, for example).
Require thing exists String Yes True or false.
Connection tags String Limits the trigger to the connections specified by tags. Leave blank to not limit this trigger to connections specified by tag. When multiple tags are specified in the trigger event, the connection must have at least one tag in common for the trigger to execute.
Notification frequency String The frequency that this event will re-execute once the condition is met. Setting this value to 7d means that after the condition is met, the trigger will not fire again until 7 days pass and the condition is true again. The format is a number followed by m (minutes), h (hours), d (days). The maximum period is 30 days. Examples: 24h, 7d, 30d, 120m.
Carrier String   Limits the trigger to the connections within the specified carrier. Leave blank to not limit this trigger to connections specified by carrier. For example, AT&T, T-Mobile, Verizon, Vodaphone, Sprint and so on

Event variables

Name
Type
Description
$(event.conn.iccid) String The ICCID of the connection that initiated this trigger.
$(event.conn.imei) String The IMEI of the connection that initiated this trigger.
$(event.conn.imsi) String The IMSI of the connection that initiated this trigger.
$(event.conn.meid) String The MEID of the connection that initiated this trigger.
$(event.prevUsage) Integer The previous usage of the connection that initiated this trigger.
$(event.usage) Integer The end usage block that caused the trigger to execute. For example, if you set the trigger to execute when it reaches 100MB in 7d (7 days). The usage reaches 97 MB in 3 days and in the 4th day it uses 5MB, the $(event.usage) is 5MB.
$(event.periodUsage) Integer The amount of usage for the time period specified by the trigger that caused the trigger to execute. For example, if you set the trigger to execute when it reaches 100MB in 7d (7 days). The usage reaches 97 MB in 3 days and in the 4th day it uses 5MB, the $(event.periodUsage) is 102 MB.
$(event.thing.key) String The key of the thing that initiated this trigger.
$(event.thing.name) String The name of the thing that initiated this trigger.
$(event.ts) String The timestamp of the connection status change that initiated this trigger.