How to add a new SLA to an task when existing SLA is breached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 03:35 AM
We have created a two new SLA for RFQ tasks. In which one is 4hours and other is 48 hours. We need to attach the 48 hours SLA to the task when the 4 hours SLA is breached. Instead the two SLA is getting attached to the tasks at the same time.
Could you please let us know the way to achieve this
Please refer the attachment for the SLA details and conditions.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 09:57 PM
When 4hr SLA is a kind of first response and if it breaches we need to insert the 48hr SLA as the second response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 04:15 AM
You can't. TASKS drive SLAs, not other SLAs.
The condition builder only looks at the task table the SLA Definition is defined for.
You can't mine related tables for conditions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 10:39 PM
Hi @Tamilvanan T ,
You can do something like below.
Create one after business rule on task_sla table with condition. select your 4 hours sla definition.
In script use below code.
var newSLA = new GlideRecord('task_sla');
newSLA.initialize();
newSLA.task = current.task;
newSLA.sla = '48 Hour SLA'; // Set to your 48-hour SLA name
newSLA.due_date = gs.nowDateTime();
newSLA.insert();
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------