Automate IoT Deployments with Soracom Event Handler

Automate IoT Deployments with Soracom Event Handler

Overview

Soracom Event Handler is a service that allows you to build IoT automations based on SIM events, such as when a SIM status changes or when its data usage exceeds a particular threshold. When triggered, it can send email notifications, throttle or disable a SIM, execute a webhook, and more. Event handler can be applied to a single subscriber, a group of SIMs, or to all SIMs in your operator account.

Parameters

Each individual event handler consists of the following configuration parameters:

  • Name and Description – Any name or description to identify the event handler.
  • Target – Defines which SIMs or subscribers to which the event handler should apply.
  • Rule – Defines a condition that should be evaluated. When this condition is met, the actions will be performed.
  • Actions – Defines what actions should be performed when the event handler conditions have been met. Multiple actions can be specified for a specific event handler.
  • Status – Enables or disables the event handler.

You can also use variables with certain actions in order to dynamically change the value of the action parameter, such as using ${simId} to include the SIM ID of the relevant SIM in an email notification or webhook.

Limitations

Below are some limitations when using Event Handler.

  • If you configure multiple event handlers that have their respective rule conditions met simultaneously, then both event handlers will be executed.
  • When the target of an event handler is set as a group, the rule condition will be evaluated for each individual SIM or subscriber belonging to the group, rather than to all SIMs or subscribers collectively.
  • Each event handler is limited to a maximum of 5 actions.
  • Each Soracom account is limited to the following number of event handler configurations:
TargetLimit
Subscriber10 per subscriber
SIM10 per SIM
Group10 per group
Operator10 total

Update rules to take action when SIM status changes

Specifying the pre-change status of the SIM

Event Handler has recently added support for SIM status changes as a condition to take action on. For instance, Event Handler can send an email when a SIM is changed to a specific status. You can also use a SIM changing from a specific status as a condition, such as “When the SIM status is changed from Active status perform this action.”

For a real life use case consider a situation where a Soracom SIM or eSIM is incorporated into a product during the manufacturing process. The period between manufacture and use by the end customer may be up to several months or even years. How can a customer prevent having to pay upkeep costs on the SIM while it sits on the shelf, but still have it perform some specific action as soon as the end user begins using it? With Soracom Event Handler we can solve the issue easily. A normal process might look like this:

  1. The SIM is installed into the product when it is manufactured.
  2. Quality assurance is performed on the product and the SIM is tested, resulting in a status change from Ready to Active when the first cellular session is created.
  3. Using the Soracom user console, API, or CLI the SIM is then put into Standby status where it incurs no daily fee until the next data session is created.
  4. The end user starts using the product and creates their first data session, resulting in another status change of Standby to Active

Now say you want to take an action such as “call AWS Lambda when the end user starts using it.” In the past, you could only specify the condition “when the current status is Active,” which in our scenario would result in the action being performed both during QA testing and at first use by the end customer. However, by setting our event handler to only perform this action on the change from Suspended to Active, it will only be taken when the end user starts using the device. 

Addition of Standby as a target status parameter.

Standby has now been added as a target status parameter, meaning that the event handler can execute its actions if the SIM or subscriber status changes specifically to Standby.

Event Handler, Image by Soracom
Reference: https://developers.soracom.io/en/docs/air/subscriber-status/

Addition of an action to change during suspension 

In the past, there was only an action to set the SIM status to Standby when an event occurred. Now, the same behavior can be performed with the Suspended status as well! Please note that some subscriptions may incur charges even while they are in Suspended status, or when they are moved from Suspended to Active. Please see this page for pricing details.

Finally

From time to time, we may introduce new enhancements to our platform in order to meet the needs of our customers. The event handler is just such an enhancement.

This feature is based on feedback from our customers. Soracom will continue to improve its platform, so please let us know if you have any requests for additional functionality.

………………

Got a question for Soracom? Whether you’re an existing customer, interested in learning more about our product and services, or want to learn about our Partner program – we’d love to hear from you!