Forum Discussion
SLA equation
Hi Marcel_Licko ,
Sorry, I still confused about your SLA output based on your sample data.
| DateTimeReceived | DateTime.LocalNow() | Working hours | SLA |
| 3/1/19 7:00 AM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 2h |
| 2/28/19 7:00 AM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 10h |
| 2/28/19 4:00 PM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 3h |
| 2/27/19 4:00 PM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 11h |
Why is the SLA of the second record is 10 h? Could you explain the logic in details.
Best Regards,
Cherry
Hi Guys,
I would also like to know a solution to this problem.
As Marcel indicated in his table
| DateTimeReceived | DateTime.LocalNow() | Working hours | SLA |
| 3/1/19 7:00 AM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 2h |
| 2/28/19 7:00 AM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 10h |
| 2/28/19 4:00 PM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 3h |
| 2/27/19 4:00 PM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 11h |
The SLA for row 1:
- Age is 4h difference between TimeNow and TimeReceived
- Working time starts at 9AM
- Therefore SLA is 4h - (11-9) = 2h
The SLA for row 2:
- Age is 28h
- Working time ends at 5PM and starts at 9AM
- Therefore SLA for February 28 is 8h (the whole day maximum) + (11-9) = 10h
And the same logic continues. Here is the version when email comes in after 5PM
| DateTimeReceived | DateTime.LocalNow() | Working hours | SLA |
| 2/28/19 6:00 PM | 3/1/19 11:00 AM | from 9:00 till 17:00 | 2h |
Still only 2 hours, because only working time is taken under consideration in this SLA calculation