How to calculate SLA pause duration time for each choice value of field

lucky24
Tera Contributor

Hi Team,

on the form there is field on hold reason with 3 choice value.

1)Awaiting caller

2)Awaiting info

3)Awaiting problem

When user will select any value in one of these and SLA will be pause. SO we have to calculate SLA pause duration for each value and have to populate value in below field.

 

find_real_file.png

for example how much time SLA was paused for Awaiting caller, awaiting info, Awaiting problem.

I am stuck here please help me here how can we achieve it?

 

10 REPLIES 10

suvro
Mega Sage
Mega Sage

Hi Lucky explore metrics you will get your solution

Tom Sienkiewicz
Mega Sage

You would need to set up a metric definition based on your task_sla table, to capture the changes of SLA stage. I believe your metric would be based on two conditions:

  • SLA stage is paused
  • related Task state is one of the above 3 states

Perhaps this is possible to achieve using a scripted metric. Have not tested it but you might give it a try.

The only other way that I can think of is to use a custom table and custom business logic, to capture and add up any state changes linked to SLA being paused.

lucky24
Tera Contributor

Hi @suvro and @Tomasz Sienkiewicz 

Actually I am working on Security incident and there is three different choice so can we achieve same thing from  metrics there

Yes I would imagine so. Basically when scripting a metric, you decide in your script when to create new metric_instance records with timing values, and when to close those instance records. 

Perhaps have a look online at some examples of scripted metrics or look through some OOTB on your instance to get a feeling of how to write those scripts.