How to send a notification only once

10382
Kilo Contributor

I want to send a notification to the customer when the Incident State is "assigned'.   But… I only want to send it THE FIRST TIME the Incident is in the State of "assigned'.

 

I'm using Send when "event is fired" and the event is "incident.assigned.to.group", with a condition of incident state is 'assigned'.

       

Because an incident can be assigned to different groups at different stages of the incident, it could move into Incident state of Assigned more than once during the life of the ticket.

 

Only want to send this notification ONCE.   The first time.

 

Any thoughts on how I can do this?

 

Thank you!

4 REPLIES 4

Ken83
Mega Guru

Hello Julie,



        I think to accomplish this you may need to set the condition by an assignment field. So, something like the assignment group or assigned to. That'll make it a lot easier to account for that one time change. So your condition would be something like this..



- current.assignment_group.changes&&!current.assignment_group.nil()&&previous.assignment_group.nil()



OR



- current.assigned_to.changes&&!current.assigned_to.nil()&&previous.assigned_to.nil()



This should be:


current.assignment_group.changes()&&!current.assignment_group.nil()&&previous.assignment_group.nil()


mduluk
Giga Expert

Anther option would be to add a checkbox to the incident table, something like assigned.   It doesn't have to show on the form.   Your business rule could check to see if assigned is false, and trigger the event, and then set the assinged checkbox to true.   Once the assigned checkbox is true, the event should never fire again.


Kalaiarasan Pus
Giga Sage

perfect answer by Kenneth Pruitt... mark this as closed so that the loop is closed..