Difference between revisions of "Setting up Notification Actions"
(Created page with " Datonis Documentation Home > Creating Rules > '''Setting up Notification Actions''' == Introduction to Notification Actions...") |
(No difference)
|
Revision as of 05:55, 18 July 2017
Datonis Documentation Home > Creating Rules > Setting up Notification Actions
Contents
Introduction to Notification Actions
Now that you have created your first set of rules, you can start setting up notifications. If you haven't set up a rule yet, this tutorial Creating Rules shows you how.
Notification actions are set against a rule and get triggered if the rule values to true. You can set notifications of the following type against rules. You can set up multiple notification actions against a rule.
- E-mail : An email is sent to the e-mail id specified when the rule is successfully triggered
- SMS : A SMS is sent to the phone number specified when the rule is successfully triggered
- HTTP: Datonis will make a get/post request to the specified URL if a rule is successfully triggered
- User Defined Property: An action that can set a user defined property against a Thing
E-mail Notification Action
Here's a video that shows you how to set up e-mail notifications.
Some additional details about this action:
- All notification actions are subject to your license. In your license, you will have a setting for the number of notifications allowed in a day.
- You will receive one notification per Thing. Let's say that the rule triggers for three separate Things, you will receive one notification per Thing.
- You can customise subject and the body of the e-mail. You can also use special variables as shown in the video using the syntax {{variable}}. You have access to the following variables.
- {{thing.name}} to know the thing for which this notification was sent.
- {{rule.name}} to know the rule for which this notification was sent.
- {{event.data.<metric name>}} the metric accessible to the rule. For instance, {{event.data.temperature}} to access the temperature metric.
- {{return_code }} which is any custom return code set by the rule
- You can also use HTML in the e-mail body.
Text or SMS Notification Action
Here is a short video that shows you how to set up Text or SMS notification actions
Some additional details about this action:
- All notification actions are subject to your license. In your license, you will have a setting for the number of notifications allowed in a day.
- You can customise subject and the body of the e-mail. You can also use special variables as shown in the video using the syntax {{variable}}. This is very similar to the email notification action.
- Text messages have a 160 character limit.
User Defined Properties Action
Here's a short video that shows you how to set up a User Define Property action.
Some additional details about this action:
- The action will be automatically be applied to every Thing that the rule triggered for. In the video, a property 'state' was set to a value 'warm'. If the rule triggers for a thing, the property is automatically set.
- If the property does not exist for a Thing, it will be created. If it has an existing value, that will be overwritten.
HTTP URL Action
You can ask Datonis to make an HTTP request to a URL when a rule triggers. This is useful if you are integrating any software system with Datonis that needs to get called when a rule triggers. To create an HTTP URL action
- Select the HTTP URL Action tab
- Specify the URL which needs to be called. And specify if the HTTP request should be GET or POST.
- You can specify the number of retries that the request should make before failing.
- You can specify information to be passed in the Header section. This is of the style shown below.
- Content-Type: JSON
- Content-Length: 300
- All entries should be on a new line.
- The body can have the content. It can be customised just like the e-mail notification action using {{variables}}
Instruction Execution Action
You can ask Datonis to execute a control instruction that is sent back down to the Aliot agent. To create this action
- Select the Instruction Execution Action tab
- Select the instruction to execute.
- When a rule triggers for a Thing, Datonis will send an instruction down to the Aliot agent that is transmitting data for that Thing.