Send notifications when SLA reaches 70%

Gaetano De Mitr
ServiceNow Employee
ServiceNow Employee

Hi guys,

I need to send notification at two mail adresses and a group.

On my sys_user table, I have two field:

  • email
  • u_email_2

Cattura.PNG

When my SLA reaches the 70% percentage, I must send notifications a group(SLA test) and "assigned_to" of incident,

but user(assigned_to) have 2 mail and the notification must arrive both addresses mail (email, u_email_2).

How Can I make this?

Thanks.

Regards,

1 ACCEPTED SOLUTION

Gaetano De Mitr
ServiceNow Employee
ServiceNow Employee

I've resolved issue:



I've updated SLA warning notification triggered from Default SLA Workflow by sla.warning event:



Cattura.PNG



I add group "SLA Test" and I pass 2 parameters:


parameter1: current.Task.Assigned_to.email
parameter2: current.Task.Assigned_to.u_email_2



When SLA reaches 75%, SLA warning notification send mail



Now it's good working!



Regards,


View solution in original post

5 REPLIES 5

David Stutter
Tera Guru

The SLA has a defined worklow:


https://docs.servicenow.com/bundle/istanbul-it-service-management/page/product/service-level-managem...




You can trigger events or send emails in the workflow:




Workflow


raves12
Kilo Sage

Based on your question I assume you have created the notification on "task_sla" table and notification is getting triggered for the group perfectly.



If the user in assigned to has two email addresses you will have to create another email device for the user.



Go to notification preference UI action link at the bottom of user record   and create "New Device" providing the secondary email details of the user.



Now when the assigned to user will be added to the notification mail will be triggered to both the email IDs,



If you want to extend this to all the users add below business rule in the users table that will automatically create the secondary email device. Adjust conditions of business rule based on your requirement.



var device = new GlideRecord('cmn_notif_device');


device.user = thisSysID;


device.email_address = current.email;


device.primary_email = true;


device.active = true;


device.type = 'Email';


device.name = 'Primary email';


device.insert();


I can have this case:



  • Email is empty and Email2 is not empty (in this case Email2 is primary)
  • Email is not empty , Email2 is not empty (in this case Email1 is primary)
  • Email is not empty, Email 2 is empty (in thi case Email1 is primary)


I would like use the "SLA warning" notification that just exist. This notification is joined Default SLA Workflow.



Do I have to change the "SLA warning" notification? and workflow?


Gaetano De Mitr
ServiceNow Employee
ServiceNow Employee

I've resolved issue:



I've updated SLA warning notification triggered from Default SLA Workflow by sla.warning event:



Cattura.PNG



I add group "SLA Test" and I pass 2 parameters:


parameter1: current.Task.Assigned_to.email
parameter2: current.Task.Assigned_to.u_email_2



When SLA reaches 75%, SLA warning notification send mail



Now it's good working!



Regards,