gcesardasilva | 2023-02-28 20:28:36 UTC | #1
I am looking to get the actual ActivityCodes of the agents in the recent past.
I am using the api /api/v2/workforcemanagement/adherence/historical to create a query job and the api /api/v2/workforcemanagement/adherence/historical/jobs/{jobId} to retrieve the results.
Here is the body example: { "userIds": [ USERIDREMOVED ], "startDate": "2023-02-25", "endDate": "2023-02-27", "timeZone": "MST", "includeExceptions": true }
The return json (after downloading from aws) is almost perfectly what I am looking for, but it is missing a small part.
This is the actuals schema:
"actuals": [ { "actualActivityCategory": "", "actualSecondaryPresenceLookupId": "", "startOffsetSeconds": 0, "endOffsetSeconds": 0 }
As you can see, it does not have the actualActivityCode, which is important for reporting and performance evaluation.
Two questions:
- Is there any way to retrieve the data similar to this output (activityCode, startTime, endTime)?
- I can't find anywhere to query the secondaryPresence matching the id returned. Which API do I use to get the details of this presenceSource? The Presence apis do not return any result.
Eos_Rios | 2023-02-28 23:06:03 UTC | #2
gcesardasilva, post:1, topic:18648
As you can see, it does not have the actualActivityCode, which is important for reporting and performance evaluation.
There is no such thing. Activity codes only exist on schedules . You can have thousands of schedule codes but from an agent's perspective the only "codes" they can be in are the ones defined in Status Management at the organization level. Those are the presence codes and they have no direct 1:1 with your Activity Codes.
The only intersection between schedule codes and system presence is the category, because both sets share the same 7 root activity codes.
ActivityId | ActivityName |
0 | On Queue |
1 | Break |
2 | Meal |
3 | Meeting |
4 | Off Queue |
5 | Time Off |
6 | Training |
7 | Unavailable |
GET /api/v2/presencedefinitions will have your secondary presence definitions.
the field LookupIdToSecondaryPresenceId in your adherence result wrapper has a translation matrix of how to get from the numbers in your adherence result set (ActualSecondaryPresenceLookupId) to the real presence code.
gcesardasilva | 2023-02-28 23:06:00 UTC | #3
That is super helpful. Thanks.
system | 2023-03-31 23:06:10 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 18648