What is alert tag? how should I Populate in Alerts ,kindly need with example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2023 11:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2023 11:41 PM
HI @Aswin Kumar P ,
Alert tags allow consolidation for all normalized fields and improve the admin experience to transform and normalize alert fields (key/value)​ enabling reuse of normalized fields across different sources.​ This improves alert quality for correlation and provides more out-of-the-box TBAC (Tag Based Automatic Correlation) definitions​.
Alert tags field appears in the Alerts form. These tags are created by Event Rules and in Event mapping and are saved in the alert tags' table. The naming convention used to create key/value pairs is t_<tag name>.​ This enables reusing tags in the event rules by allowing users to select tags that were previously defined.​ When new alert tags are defined, TBAC (Tag Based Alert Clustering) tags are automatically created.​ Using these TBAC tags, you can create new TBAC alert clustering definitions from the new source of tags​.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2023 12:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2023 12:15 AM
Hi @Aswin Kumar P ,
Hope you are doing great.
An alert tag in ServiceNow is a configurable label or identifier that can be assigned to alerts generated within the platform. These tags help categorize and organize alerts based on specific criteria or characteristics.
Here's an example of how you can achieve this:
you need to define and create the necessary alert tags in ServiceNow. Navigate to the "Alert Tag" table and adding new records for each tag you want to use. Each record should have a unique identifier and a meaningful label.
Once you have your alert tags defined, you can use them when creating or updating alerts. For instance, if you are using a script to generate alerts, you can include a section in your code to populate the "alert_tag" field with the appropriate tag value.
Reference on how you can populate the alert tag field while creating an alert record using a GlideRecord
var alert = new GlideRecord('alert');
alert.initialize();
alert.short_description = 'Alert description goes here';
alert.description = 'Detailed information about the alert';
alert.alert_tag = 'Tag1';
// Insert the new alert record into the database
alert.insert();
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2023 12:26 AM
I created the alert but the tag field is empty!
I created an alert tag called 't_Tag1'
And I modified your code to:
var alert = new GlideRecord('em_alert');
alert.initialize();
alert.short_description = 'Alert description goes here';
alert.description = 'Detailed information about the alert';
alert.alert_tag = 't_Tag1';
// Insert the new alert record into the database
alert.insert();
I don't know why it is not populating.