Need help with Automatic email sending to Assignment groups with Alerts count > 20.

Anoop S
Tera Contributor

Hi Team,

So I have this requirement in one of my projects where we need to get all the active Alerts from em_alert table and I need to get the count of Alerts assigned to each assignment group for Critical Severity and we need to automatically send emails to the assignment groups whose count is more than 20 alerts. Please help me with this. 

Currently what I am doing is by going to Event Management->All Alerts, I apply the below filter 

find_real_file.png

And export this to excel sheet and create a pivot table to find the number of alerts for each assignment group. Then use an excel macro to send the emails to the assignment groups. 

Any inputs will be great, thanks in advance. 

1 ACCEPTED SOLUTION

Hello,

Unfortunately, this reply contradicts what you said in your original post, there you said:

"I need to get the count of Alerts assigned to each assignment group for Critical Severity and we need to automatically send emails to the assignment groups whose count is more than 20 alerts."

Now, you're saying something else. I'd recommend that you please review your question to the community, edit your post properly, and then let us know when you have all the details. Otherwise, it's unfair to those who are helping or could help because you're changing the ask.

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hello,

You can create a business rule or flow that on insert/update of an alert to check the assignment group, severity, and state and if a particular group has > 20 alerts, fire an event. The event will then trigger a notification. You'd have to think through this a bit more because what if alert 22 and then alert 23 come in and both go to the same assignment group and that assignment group just got an email because alert 21 triggered this whole process, do they get another at 22? then again at 23?

In any case, that's separate from your question here, but felt I'd throw that out there.

Business rule: https://docs.servicenow.com/bundle/rome-application-development/page/script/business-rules/task/t_Cr...

GlideRecord: https://developer.servicenow.com/dev.do#!/reference/api/paris/server/no-namespace/c_GlideRecordScope...

Event: https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/platform-events/task...

Notification: https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/notification/task/t_Crea...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

I want to see all the assignment groups and the total count of Alerts assigned to them as a report or table or as a form with a send email button. The email notifications has to be triggered to the assignment groups ONLY when the user clicks the send notification button on the table or report or form  (Not automatic or scheduled timings).

Hello,

Unfortunately, this reply contradicts what you said in your original post, there you said:

"I need to get the count of Alerts assigned to each assignment group for Critical Severity and we need to automatically send emails to the assignment groups whose count is more than 20 alerts."

Now, you're saying something else. I'd recommend that you please review your question to the community, edit your post properly, and then let us know when you have all the details. Otherwise, it's unfair to those who are helping or could help because you're changing the ask.

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!