Triggered Alerts

Rather than send an alert immediately or on a schedule basis, you can also setup ‘trigger’ points such as SMS keywords, Email subject lines or shortlink URLs. When these trigger points are setup the alert is stored away until such a time as one of those trigger points is activated (for instance by someone visiting the shortlink URL).

In addition, you can request that a previously stored or deferred alert is actually the one to be launched when a trigger is activated. If you do this then the current /sendalert api continues to be processed; this allows you to be able to send out confirmation SMS/Emails containing the trigger point shortlink URLs and other details in advance.

"trigger": {
    "minimumRepeatInterval": "5m",
    "maximumRepeats": 1
    "storeDetails" : {
        "storeName" : "myPreviouslyStoredAlert"
    },
    "triggers" : [
        {
            "type" : "shortlink",
            "keyword" : "",
            "tag" : "myShortLink"    
        }
    ]
}

ParameterRequirementDefaultDescription
minimumRepeatIntervalOptional1mSpecifies the grace period during which repeated triggering of the same alert (e.g. more than one person visiting the shortlink URL) will not result in the alert being resent.
maximumRepeatsOptional0How many times the alert can be resent when activation triggers are received. A value of 0 means that the alert can be resent indefinitely.
storeDetailsOptionalNoneIf a valid, existing, store is specified then it is used as the alert to be launched when one of the triggers is activated. See API guide for more details. Alerts can be pre-stored by either calling the /storecontent api call or by specifying a deferral JSON object when making a /sendalert api call. If a stored alert is used here then the remainder the current /sendalert is processed.
triggersMandatoryNoneSet of JSON objects, each describing a trigger to associate with this alert.
    typeMandatoryNoneOne of: sms, email, shortlink
    keywordMandatoryNoneFor type:sms or type:email this must specified a unique keyword that Alerting Hub would receive as either an inbound SMS or an inbound email subject line. For type=shortlink this can be set to an empty string.
    tagOptionalNoneAn optional tag for this keyword. The tag can then be used when sending sms or emails (or even TTS voice calls) as Alerting Hub will auto-populate the following lookup keys:
  • trigger-[tag]-keyword = keyword used/generated
  • trigger-[tag]-sender = sender used
  • trigger-[tag]-recipient = recipient used
    senderOptionalallSpecifies a restriction list of who can activate the keyword. For type=sms this would be sender phone numbers, for type=email this would be email senders and for type=shortlink this would be ip addresses.
    recipientOptionalallSpecifies a restriction list of recipients that can check for this keyword. For type=sms this would be receiving virtual numbers, for type=email this would be email recipients and for type=shortlink this is ignored (the shortlink itself is the only recipient).