Real-time adherence data by agent

We are trying to receieve real-time adherence data by agent which gives us metrics like time out of adherence, scheduled time etc by 30 min interval. We have some event bridge/web socket APIs for call statistics by agent but not for adherence %. The real0time event stream we found doesnt give any metrics like time in adherence or adherence %. Are we missing anything?

What topic are you subscribing to? This is the real time schedule adherence topic here:

v2.users.{id}.workforcemanagement.adherence

There's also a version you can subscribe by management unit:
v2.workforcemanagement.managementunits.{id}.adherence

and by work team:
v2.workforcemanagement.teams.{id}.adherence

Each of the above has the same returned schema, the latter just allow you to subscribe to related groups of agents with a single subscription.

Note many of the fields visible in the UI are computed from the data provided on this topic.

Thanks. We are using v2.users.{id}.workforcemanagement.adherence

This is output we are getting. But the problem is it doesnt tell us the adherence % of the user. How do we calculate adherence % of each user, possibly by 30 mins interval?
{
"user": {
"id": "6axxxxxxx-dae3-4a8a-b5ae-d29b46xxxx"
},
"managementUnitId": "52xxxxca5-4270-4cd1-8b09-850e329xxxxx",
"scheduledActivityCategory": "Unscheduled",
"systemPresence": "Available",
"organizationSecondaryPresenceId": "6axxxx858-942f-xxxd-9700-5f9bcdxxxxxxx",
"routingStatus": "IDLE",
"actualActivityCategory": "OffQueueWork",
"isOutOfOffice": false,
"adherenceState": "Unscheduled",
"impact": "Neutral",
"adherenceChangeTime": "2023-11-07T16:20:03.808Z",
"presenceUpdateTime": "2023-11-07T16:20:03.760Z",

Ahh I see what you're asking. Real-time adherence is literally that - real-time. In simple terms, it tells you what a user is doing right now, as compared to what they're supposed to be doing, right now. It doesn't know anything at all about what the user is or was supposed to be doing 30 minutes ago, only what they're doing right now.

When you start looking at adherence percentage over the past 30 minutes (or whatever time period) you're getting into the realm of historical adherence, which while conceptually related is an entirely separate feature.

You'll want to work with this endpoint to query for historical adherence
POST /api/v2/workforcemanagement/adherence/historical/bulk

This page has more information on querying for historical adherence, along with examples

Querying For Historical Adherence

Thanks Brian. I am talking about this screen. As you can see here, Genesys UI is producing total realtime adherence and also listing agent's individual adherences. Is there a way to get this information on a realtime basis?

images removed, please redact PII first

Yes, that screen is showing an aggregate percentage of agents on the view that are in adherence (again, right now, not for some time into the past). Those percentages are calculated by the UI, they don't come over the notification topics (and can't - that's an aggregate percentage, each notification event that updates that view only knows about a single agent)

Brian - How you are calculating this per agent? Which event topic you are subscribing to in the UI? The one we are looking at doesnt give us any status duration or adherence duration.
Thanks. We are using v2.users.{id}.workforcemanagement.adherence

This is output we are getting. But the problem is it doesnt tell us the adherence % of the user. How do we calculate adherence % of each user, possibly by 30 mins interval?

v2.users.{id}.workforcemanagement.adherence
{
"user": {
"id": "6axxxxxxx-dae3-4a8a-b5ae-d29b46xxxx"
},
"managementUnitId": "52xxxxca5-4270-4cd1-8b09-850e329xxxxx",
"scheduledActivityCategory": "Unscheduled",
"systemPresence": "Available",
"organizationSecondaryPresenceId": "6axxxx858-942f-xxxd-9700-5f9bcdxxxxxxx",
"routingStatus": "IDLE",
"actualActivityCategory": "OffQueueWork",
"isOutOfOffice": false,
"adherenceState": "Unscheduled",
"impact": "Neutral",
"adherenceChangeTime": "2023-11-07T16:20:03.808Z",
"presenceUpdateTime": "2023-11-07T16:20:03.760Z",

There are two features here. One is Realtime Adherence, the other is Historical Adherence.

v2.users.{id}.workforcemanagement.adherence is the topic for Realtime Adherence. It has nothing to do with "adherence % over time". It's just a snapshot of right now.

Yes, our Realtime Adherence UI does display status and adherence duration. It's simply now - statusChangeTime and now - adherenceChangeTime. The numbers at the top of the UI you shared (e.g. 20 out of 50 are 'in adherence') are a simple snapshot of how many agents are in adherence. You could get this number by counting how many agents are in adherence versus how many total are returned.

If you want "adherence % by user for a time period", then you are in the realm of Historical Adherence, as Brian mentioned. It is more complicated to calculate "yourself", since you have to compare the streams of both their actual statuses and their scheduled activities in WFM. You also must consider all of the adherence settings in the management unit. Please check out our Historical Adherence API tutorial which does all of this for you.
That query accepts a time range and will return adherencePercentage for each user you ask for, see below for a sample response from Historical Adherence.

image

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