- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 02:20 PM
I am working on some changes to notifications and I have two notifications being sent out at the same time and I'm trying to adjust one of them without any luck. The first notification will be sent when an RITM is cancelled and will include additional comments. The second should only be sent if comments are added but the state doesn't change to closed cancelled.
The first is being sent whenever an RITM is cancelled:
The other is being sent when comments are added to the RITM:
I was hoping that I could add a condition that says something like "state does not change to closed cancelled" but that doesn't seem like an option.
Does anyone have any suggestions on how I can do this?
TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2022 11:19 PM
If the target recipients are the same for both notifications, you can prevent duplicate notifications by adjusting the weight of the notification.
See below for an example of notification weights and how they work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 02:27 PM
Hi, you could try
State Changes
AND
State ISNOTONEOF XXX, YYY, ZZZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 06:42 AM
Hello. We'd like for the additional comments notification to go out basically anytime the comments are added except for when the state changes to closed cancelled. I think that condition would only fire the notification if the state changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 12:26 PM
Your initial post requested assistance with conditions to prevent a state change from triggering a notification for specific states, these conditions should be appended to your existing conditions IE
additional comments CHANGES
AND
State CHANGES
AND
State ISNOTONEOF XXX, YYY, ZZZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 11:15 AM
Use a business rule and fire an event.
Business rule condition:
Additional comments changes OR state changes to Closed Cancelled
Business rule script:
// Code not tested
if(current.state.changes() == true) {
// fire event for when the ticket is closed cancelled
gs.eventQueue("ticketClosedCancelled",current);
} else {
// fire event for comments added
gs.eventQueue("ticketCommentAdded",current);
}
Notification 1: Fire on ticketClosedCancelled event
Notification 2: Fire on ticketCommentAdded event
Expected behaviour:
While the ticket is open, adding comments will trigger the business rule because additional comments changed. The script will fire the ticketCommentAdded event, and Notification 2 will be sent based on that event.
When the ticket is moved to closed cancelled, the BR will trigger because the state changed to closed cancelled. The script will fire the ticketClosedCancelled event and Notification 1 will be sent based on that event.
After the ticket has been cancelled, if another update is made and more comments are added, the business rule will fire again and trigger the ticketCommentAdded event and send out Notification 2.