Setting up alert rules
For the best user experience, we strongly recommend you provide your users with an interface in your application where they can set up alert rules for their assets. This way, users can stay within the confines of your application with a user interface they recognize and are familiar with. The Notifense APIs can be used to provide the data and operations to support your user interface. If you are, for any reason, unable to modify your application in this way, Notifense also provides its own alert rules portal. Call theGET /v1/accounts/{accountId}/assets/{assetId}/alertRules/portalLink API endpoint to retrieve a secure URL to our alert rules portal for a specific asset. This link is valid for 2 hours after retrieving it. Your application can redirect the user to this URL to configure the alert rules for an asset.
Who
Every alert rule must have arecipient. A recipient is a phone number, a culture and a time zone. The phone number is used to identify the person or business that resolved the event, and, when an event is escalated, to reach the recipient by the recovery specialist who processes the escalation. The culture (an IETF language tag like nl-NL) and time zone (an IANA time zone name like Europe/Amsterdam) are used to correctly calculate local dates and times and to format and translate messages for the recipient.
How
An alert rule must have achannel. A channel is a means of contacting a recipient. For example, this can be a phone call, an SMS message or a Telegram message. For phone calls and SMS messages, the phone number in the recipient object is used. For other channels, the specific channel options object may contain properties that define how the recipient can be reached (e.g. the Telegram channel configuration object contains the chatId property, which is a Telegram chat ID). When creating alert rules, you must specify the desired channel type and the corresponding channel options object.