Send RITM SLA breach notification to Catalog task Asignee

Annirnita Dash1
Tera Contributor

Hello,

I have a requirement to send RITM SLA breach notification (75% and 90%) to associated catalog task's assignees.

Could anyone help on this? 

2 ACCEPTED SOLUTIONS

HI @Annirnita Dash1 ,

 

Try something like below to pass the assigned to of sctask in the parm1:

 

SN_Learn_0-1721019769112.png

 

Parameter 1 Script: 

 

 

(function() {
    var getTask = new GlideRecord('sc_req_item');
    if (getTask.get(current.task)) {
        var scTask = new GlideRecord('sc_task');
        scTask.addQuery('request_item', current.task);
        scTask.query();
        while (scTask.next()) {
            var assignee = scTask.assigned_to;
            return assignee;
        }
    }
}());

 

 

In the notification, triggered by event. 'who will receive' will be as below:

SN_Learn_0-1721020191754.png

 

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

View solution in original post

If this is a new SLA and new SLA workflow, I'd strongly suggest moving your logic to flow designer as workflow is now legacy and largely (some exceptions) not intended for new development.

 

 

Within the  create event, you can run a glide record to set the parameter value of who will receive the notification

msedge_jU5z1Thl55.png

 

 

(function() {
	//return current.task.assigned_to + "";
	var scTaskGR = new GlideRecord('sc_task');
	scTaskGR.addQuery('request_item' , current.getUniqueValue());
	scTaskGR.addNotNullQuery('assigned_to')
	scTaskGR.addActiveQuery();
	scTaskGR.query();
	var taskAssignedTo = [];
	while(scTaskGR.next()){
		taskAssignedTo.push(scTaskGR.getValue('assigned_to'));
	}
	return taskAssignedTo;
}());

 

View solution in original post

16 REPLIES 16

SN_Learn
Kilo Patron
Kilo Patron

Hi @Annirnita Dash1 ,

 

Please check the OOB workflow named 'Default SLA workflow'

 

SN_Learn_0-1721018087039.png

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

Amit Verma
Kilo Patron
Kilo Patron

Hi @Annirnita Dash1 

 

You can refer below posts as a reference to define a SLA workflow. Alternatively, you can define a flow as well with trigger as SLA Breach with the trigger condition as required :

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0689050

https://www.servicenow.com/community/developer-forum/how-to-send-email-using-flow-designer-when-sla-...

https://www.servicenow.com/community/guided-learning-itsm/how-to-send-a-notification-based-up-on-the...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hello Amit, Many thanks for the reply.

Can you help me with "how to send the notification to asignees of all associated catalog tasks?

I have created events and a separte workflow for RITM slas. I am stuck at the "whom to send" section. 

 

Annirnita Dash1
Tera Contributor

Hey,

Actually I have created workflow , events and all, the issue here is how to send it to the catalog tasks asignees