How to set Assignment Group on Alert based on Event Rule

Hari S1
Tera Contributor

Hi,

 

In Event Management, can the Assignment Group on an alert be set directly using an Event Rule, if we want to rely only on Event Rules and not use Alert Rules, scripts or business rules?

 

Can someone help me on this

 

Thanks in advance!

2 REPLIES 2

vaishali231
Tera Expert

Hey @Hari S1 

In ServiceNow Event Management, you cannot set the Assignment Group on an alert using only an Event Rule. This is expected behavior.

 

Here is the reason in simple terms.

 

Event Rules work at the event ingestion stage. Their job is to process incoming events, filter them, map event fields, set severity, perform correlation, and decide whether an alert should be created or updated. At this stage, the alert record is not fully created.

The Assignment Group field belongs to the Alert table em_alert, not the Event table em_event. Event Rules do not have access to alert specific fields like Assignment Group. Because of this limitation, Event Rules alone cannot assign a group to an alert.

In ServiceNow, alert assignment is handled after the alert exists. That is why Alert Rules are provided. Alert Rules run after an alert is created or updated and are meant specifically for setting Assignment Group, priority, and triggering actions.

So if you want to rely only on Event Rules and avoid Alert Rules, scripts, and Business Rules, then there is no supported way to assign an Assignment Group on alerts. The recommended and supported approach is to use Alert Rules for assignment logic. This is standard behavior in Event Management.

 

If you are open to using a Business Rule, below is a simple and clean example.

Use case
Automatically set the Assignment Group when an alert is created.

Business Rule configuration
Table: em_alert
When: Before
Insert: true
Update: optional
Condition: add your own condition 

Script example

(function executeRule(current, previous) {

if (current.source == 'AppDynamics') {
current.assignment_group = 'Put_Group_sys_id';
}


})(current, previous);

 

This runs before the alert is saved, so the Assignment Group is set immediately.


****************************************************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.

Regards
Vaishali Singh

SIVASANKARIS
Mega Guru

Hi @Hari S1 ,

The short answer is no, you cannot set the assignment_group field directly within an Event Rule.

Event Rules operate on the em_event table to transform data and bind CIs, but the Assignment Group field belongs to the em_alert table. The "Transform and Compose Alert Output" section of an Event Rule does not include the Assignment Group as a targetable field out-of-the-box.

However, you can achieve your goal without writing code by using one of these two No-Code methods:

1. The CI-Based Method (Best for "Event Rules Only" approach)

If you want the Event Rule to be the "driver," ensure your rule binds the event to a Configuration Item (CI).

  • If that CI has a Support Group defined on its record, ServiceNow can automatically pull that into the Alert.

  • Note: Check the system property evt_mgmt.alert_groups_precedence. If configured correctly, the alert will inherit the assignment group from the CI's Support Group or Managed By Group automatically.

2. Alert Management Rules (Recommended)

While technically a separate "rule" type, Alert Management Rules are the modern, no-code way to handle this.

  • Create a rule with a simple condition (e.g., Alert Priority is Critical).

  • In the Actions tab, use the Flow Designer to set the field value. There are several OOB subflows that simply set the Assignment Group based on your criteria without needing a single line of script.

Summary: If you want to avoid scripts and Alert Rules entirely, your best bet is to ensure your CMDB data (Support Groups) is populated and let the Event Rule's CI binding do the work for you.

Hope this helps!

 

If this is useful, please mark it as helpful and accept my solution...

 

Best Regards,

SIVASANKARI S