WEM Adherence Incorrectly Showing Breaks as Non-Paid Time - Shift Bids

Hi all,

We’re having a really strange issue with WEM adherence, and it’s impacting our service level reporting pretty severely. Agents who successfully bid on shifts with scheduled, paid 15-minute breaks are having those break periods flagged as non-paid time within the WEM adherence view. It’s not consistently happening to everyone, which makes it harder to pinpoint - we’ve seen it across multiple management units.

The shifts are created normally through the shift bidding process, and the schedule publishes without any errors. When looking at the individual agent schedule in Genesys Cloud, the breaks are correctly identified as paid time. However, when the adherence data is calculated, those same 15-minute blocks are showing as “Non-Paid Time” in the WEM dashboard. The discrepancy only seems to be on shifts originating from bid functionality; manually scheduled breaks seem to be behaving as expected.

We’ve checked the break activity codes - they’re set to “Paid” and are consistent across all management units. The schedule rules aren’t causing any conflicts, as far as we can tell. We’ve also validated the agent profiles to make sure there aren’t any custom settings overriding the standard break rules. It’s really odd that the published schedule displays correctly, but the adherence calculation is pulling incorrect data.

Is anyone else encountering this? Do you need me to elaborate on how the shift bids are structured? I can grab a screen recording if that helps illustrate what we’re seeing. It’s impacting our ability to accurately track adherence and we really need to get this sorted. The team is getting frustrated as they’re being penalized for breaks they’re actually getting paid for.

The WEM version is current as of last week’s release, and we’re on the latest Genesys Cloud spring release. The issue has been present for roughly two days.

yeah so the bid logic’s kinda wonky - it’s not actually writing the break as paid time, it’s just assuming. the WEM engine then sees a gap and marks it as unpaid. you’ll need a post-bid script to patch this, basically looping through awarded shifts, finding breaks, then updating the WEM schedule API. pseudo-code looks like this:

FOR each shift in awarded_bids
 FOR each break in shift.breaks
 WEM_API.update_schedule(shift_id, break.start_time, break.end_time, paid_flag = TRUE)
 END FOR
END FOR

it’s a pain, honestly. we’re on NICE CXone and spent a week chasing this down - turns out the bid engine assumes everything’s perfect, which is… not a safe assumption. the API docs on the WEM side are surprisingly sparse about this particular edge case. hope this helps someone

Hey everyone!

That suggestion above is a really good start- a post-bid script is definitely the way to go!

But! It’s a little more involved than just updating the WEM schedule API directly, and I’ve found a few things that can trip you up. We’ve got about 800 agents, and we ran into this last quarter- it was…a learning experience!

First, the WEM API doesn’t love partial updates. You really want to fetch the entire schedule for that agent and shift, make your break adjustment, then replace the whole thing. It’s slower, yes, but it avoids a ton of weird edge cases.

Second, authentication. The WEM API is super sensitive about permissions. Make sure your script is running as a user with full schedule management rights- otherwise, it’ll silently fail, and you’ll be scratching your head for days.

Here’s a bit of a more complete snippet, leaning into Python, just to give a clearer idea. It’s pseudo-ish, but pretty close to what we’re using.

import requests
import json

def update_wem_break(shift_id, break_start, break_duration_minutes):
 # Fetch the full schedule for the agent and shift
 url = f"https://genesyscloud.com/api/v3/workforcemanagement/schedules/{shift_id}"
 headers = {
 "Authorization": "Bearer YOUR_API_TOKEN",
 "Content-Type": "application/json"
 }
 response = requests.get(url, headers=headers)

 if response.status_code != 200:
 print(f"Error fetching schedule: {response.status_code} - {response.text}")
 return

 schedule_data = response.json()

 # Locate the break and mark as paid time
 for segment in schedule_data['segments']:
 if segment['startDateTime'] == break_start:
 segment['paid'] = True #<-- This is the key part!
 break

 # Replace the entire schedule
 url = f"https://genesyscloud.com/api/v3/workforcemanagement/schedules/{shift_id}"
 response = requests.put(url, headers=headers, data=json.dumps(schedule_data))

 if response.status_code != 200:
 print(f"Error updating schedule: {response.status_code} - {response.text}")


# Example Usage
shift_id = "some_shift_id"
break_start = "2024-10-27T12:00:00Z"
break_duration_minutes = 15

update_wem_break(shift_id, break_start, break_duration_minutes)

Don’t forget to replace YOUR_API_TOKEN with a valid one!

Also, seriously, test this on a small group of agents first. You do not want to accidentally mess up the schedules for everyone! It’s happened…

Finally, be aware that this might need to run periodically. The bid logic can still sometimes re-introduce the issue. We have a scheduled task that runs every night to catch any discrepancies. It’s a little extra effort, but it keeps things running smoothly! :sparkles: