Calculating Working time (login / logut)

Hi. I'm looking for a manner to calculate the % of non-working time of an agent. That would be calculated over the total amount of hours connected to the purecloud system (logout - login), MINUS, the sum of all "routingStatus". However, I would still need the time the user logged in and logged out, just to make sure I'm covering all working hours. Does that make sense?

Is there any API endpoint that will give me the time the user logged in and logged out, each day? Any suggestion?

Adding some more information...

There is a PureCloud Report that has the exact information I am looking for. The report is Agent Activity Summary Export. It shows the login/logout time of each Agent (User). This is exactly what I need to extract via API.

Is there any API endpoint that will give me the login/logout time for an User/Day?

There is no concept of "logged in" or "logged out" in PureCloud. A user can have multiple auth tokens for multiple applications, so the concept of "logged in" doesn't exist. You probably want to use the User Status Detail analytics query and consider if the user is in the OFFLINE state or something else. The state can be controlled by custom applications regardless of if the user is using the standard PureCloud UI, so keep that in mind.

1 Like

Thanks for the reply Tim.

I understand your point, but I still have a question regarding this: where does the logon/logoff information (present in the Agent Activity Summary Export) come from?

That report is using the terms "logged in" and "logged out" for reader comfort, even though those concepts don't exist. See the user status detail query I linked above for that data.

Ok, I got it. I understand your point that this concept doesn't exist. It makes sense now.

In this API view, I have all statuses within a given period. If I query for today's data, I can assume the "endTime" of the first occurrence of the "OFFLINE" status, as the "log in time". And then, the "startTime" of the last occurrence of the "OFFLINE" status should be the latest "log off time".

This looks accurate when compared to the report I mentioned.
Thanks.

Yes, that should be correct.

1 Like

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