API for time spent in presence/state

Hey all,

  Not sure if this is the right place for this, but I'm working on some middleware for my company that can alert supervisors when their reps are spending too much time in a certain presence (Break, Busy, etc..). I've looked into a couple of the Adherence APIs but they just show me the time stamp of when a rep's presence or adherence status changed, not how long they've been in the state. 

 Any good way to get this rolling?

You can calculate the time spent in the presence by subtracting the timestamp of the latest change from the current timestamp.

There's no current timestamp that gets dumped out in the API, but you're referring to just a function that looks at whatever time if is currently? Because that's a really good idea. Thank you!

Your app is responsible for determining what the current time is; the local time on the app's machine isn't something you can fetch via the API. If you're using JavaScript, that might be something like using Date.now().

Thank you for the idea. Very helpful!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.