Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Only fire one alert

Highlighted
Alberto Ocaña d
Regular Collector

Only fire one alert

Hi,

In our Service record we have two special fields: Total Hours of Service, and porcentage of Hours used). Porcentage is updated daily with a Java script that counts the duration of all the Workorders of the Service Calls of the Service.

I've made an alert that fires when the porcentage of the Total Hours is above certain value. How can I do for firing the alert only once when this porcentage value is reached?

My alert is evaluated when the Service is created or modified (only the porcentage field).

Now, when the threshold value is reached I have an alert everytime the Service is modified.

Anyone could help me?

Thanks.
1 REPLY
David L Anderso
Acclaimed Contributor

Re: Only fire one alert

Probably the easiest way is to activate a custom boolean (checkbox) field that is hidden or not on the Service form at all named something like "Alert Fired". Add a condition of Alert Fired = No to the rule that calls your alert script and an action that sets it to Yes if the alert fires so that it only fires the first time called.

You will also want to add a second(DB)rule (Update from external system) that calls the script when the value of Alert Fired is Yes to check to see if the value percentage value has dropped below the threshhold you have set and if so, reset the Alert Fired flag to No so that your alert will fire again if the threshhold is subsequently exceeded.
I'm not sure there is an easier way.
//Add this to "OnDomLoad" event