How is the Elapsed time on the SLA updated in SN? Scheduled jobs, BRs, Script Includes?

packy
Tera Contributor

Hello,

I'm looking to better understand how the SLA's elapsed time is so continuously and effeciently updated in the system. Our customer wants to have another field on the SLA update and so I would like to leverage similar functionality.

Customer ask: While an SLA is paused, I want the breach time to continue to update because the time will be later as the SLA continues to be paused. This will better represent the actual, projected breach time when managing and working these tickets.

Any insight and information is greatly appreciated. Thanks - Patrick

1 ACCEPTED SOLUTION

packy
Tera Contributor

Hello Matthew,



I found the wiki that explains them and you are correct about the scheduled jobs. I was accidentally filtering them out when I filtered out the other jobs.



http://wiki.servicenow.com/index.php?title=Service_Level_Agreements#SLA_Automation



2.4 SLA Automation

SLAs are calculated and assessed by a business rule and a scheduled job which run in the background.


Note that the mechanisms that control SLA Workflow and SLA Automation are completely independent of each other. Many customers have a requirement to send out email notification from the SLA Worklfow showing the current elapsed percentage of the SLA. However, this does not work because using percentage in a notification only displays the most recently calculated value of the task_sla. The results are inaccurate values sent out in email when using SLA calculated values in a task_sla email notification.  


One solution is to specify elapsed percentage in SLA notifications by using notifications for each percentage level. For example, an email notification for "75 percent SLA Warning" is created and a special event is used to trigger that notification. The event can be called "sla.warning.75". Another solution would be to hard-code these email notifications to fire off at a specified duration percentage, and configure the workflow linked to that SLA definition to send an email notification after waiting an elapsed percentage.


2.4.1 Business Rule

In the 2010 engine, the asynchronous business rule Process SLAs runs after every task is inserted or modified and evaluates the Start, Pause, and Stop conditions for the SLA.


In the 2011 engine, the Process SLAs business rule has been replaced by the Run SLAs business rule. The Run SLAs business rule is not asynchronous. To make the 2011 SLA engine asynchronous, navigate to Service Level Management > Administration > SLA Properties and set the Run the 2011 SLA engine asynchronously after task insert or update operations (com.snc.sla.engine.async) property to Yes.


For more information about the 2010 and 2011 engines, see Moving from the 2010 Engine to the 2011 Engine.


2.4.2 Scheduled Jobs

ServiceNow recalculates SLAs based on when they are breached, using these scheduled jobs on the Schedule Item [sys_trigger] table.  


  • SLA update (already breached): repeats every day
  • SLA update (breach after 30 days): repeats every 5 days
  • SLA update (breach within 1 day): repeats every hour
  • SLA update (breach within 1 hour): repeats every 10 minutes
  • SLA update (breach within 10 min): repeats every 1 minute
  • SLA update (breach within 30 days): repeats every day

Note


Note: After 365 days, ServiceNow does not recalculate breached SLAs.

View solution in original post

5 REPLIES 5

Matthew Swarts
Tera Guru

Hi Patrick,



There are a series of Scheduled jobs that call a script include called SLACalculatorNG in order to update the SLA times.   They can be seen under System Scheduler>Scheduled Job>Scheduled Jobs by filtering where name contains SLA.   Certain jobs run more frequently than others especially ones close to breach.   The script include and these Scheduled Jobs would be a good starting point and hopefully steer you in the right direction.


Hi, here is the link to the doc site that explains SLA calculation: SLA calculation


packy
Tera Contributor

Hello Ian,



Thank you for the response but what you've given is the product doc. A high level customer document. I'm looking for a technical answer describing what jobs, scripts, BRs etc are used in what order to make the Elapsed time operate so smoothly and accurately. Any more information will be greatly appreciated.


Hello Matthew,



In my Helsinki instance the System Scheduler>Scheduled Job>Scheduled Jobs are only the triggered jobs prepped for the tasksla script include to call the breached function. Nothing else SLA related.


Also, in the System Definition>Scheduled Jobs is only the PA job. Nothing else SLA related.



Am I missing something?