Email and SMS alerts
Alerts were always a strong part of the product in Iguana 4.5 but with the Translator it easier still. There two kinds of alerts to consider: Inactivity Alerts and Custom Alerts.
Inactivity alerts are pretty much the same as they were in Iguana 4.5. Here’s some good advice for smart way to use them.
- Set up a Channel Group which has all your production channels. i.e. the ones you care about if they go down.
- Set up two channel inactivity rules:
- One should be during working hours and should have a short time of inactivity.
- The second should be out of working hours with a longer period for inactivity.
This means you end up with relatively little configuration work to do for these types of rules.
Whenever you use an iguana.logInfo() statement from within a Lua Translator channel the output will get logged into the logs for that channel. This provides a great hook for implementing custom email notification logic.
The idea is this:
- Make yourself a helper function like this:
function Alert(Message) iguana.logInfo("ALERT:n"..Message) end
- From your Lua code you can invoke this function based on any arbitrary rule you like. That’s dead easy to do since it’s a full language and you can access any part of the data. i.e.
if ZID:nodeValue() == 'VIP' then Alert("VIP patient - call the special team!") end
- Set up one custom notification rule that have the text query expression set to “ALERT” in an Informational message.
So now whenever the custom function is invoked it puts that into the logs which triggers the custom notification rule.
Soon there should be an interface for generating an email directly from Lua which will provide an alternative approach for doing this.