Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

PA Indicator: How to record score against 'Resolved At' date, but only after incident is 'Closed'?

Brasa
Tera Contributor

Hello, SNow friends!

 

I have a challenge that I haven't seen addressed in any other posts here.

In my account, incidents are automatically closed 5 days after they are resolved. While the SLA tasks are completed as usual upon the incident's closure, my SLA calculations rely on the resolution date of the incident, which is only valid if the incident status is marked as "closed."

Is there a way for me to collect indicators for these incident SLA metrics on a daily basis? I need to use the "resolve date" as my date field, but I want to ensure that I'm only collecting data when the incident is marked as closed.

 

I'm struggling to find a solution to retroactively record the SLA scores on the resolution date, even though I'm really gathering the data on the closure date.

 

For example: if an incident is closed today (5th October), the indicator score date must be 30th September (the resolution day). 

3 REPLIES 3

Mark Manders
Mega Patron

Since it's clearly about ServiceNow, I have no idea why you are asking your SNow friends, since SNow is a completely different platform that has nothing to do with ServiceNow.

You don't share any indicator setups, so it's not clear what you are doing, but this is how it should work:

 

Your incident resolves

  • resolved date time is set
  • task_sla record stage is paused

Your incident closes

  • task_sla record stage is completed

If you only collect your 'completed' task_sla records, you also have the benefit of not collecting cancelled/in progress ones. And your completed records are only on closed tasks, not on resolved ones, since they are supposed to be paused.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

kaushal_snow
Giga Sage

@Brasa ,

 

It requires a bit of custom logic....one approach is to create an automated indicator that collects data daily and whose indicator source filters only incidents whose state = Closed and maps the Score date to the Resolved At date (rather than the collection date). ....You’d likely need a Script Include or Business Rule that, at the moment the incident becomes Closed, writes a record into a custom fact table or override table with the incident SLA score and sets the date field to the resolution date. Then your PA indicator can pick up from that fact table. Also ensure data snapshots are enabled for that indicator so that historical scores are preserved......

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

Brasa
Tera Contributor

Thanks, Kaushal.

Apparently, the solution is far too complicated. I'll try to convince the customer to use the close date instead.