How to calculate SLA pause duration time for each choice value of field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2022 11:31 PM
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.
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2022 11:39 PM
Hi Lucky explore metrics you will get your solution

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2022 11:42 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2022 11:50 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2022 12:18 AM
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.