Running into a weird bug with IVR routing logic during schedule handoffs

Hey everyone, I’ve run into a really strange issue with our IVR routing logic that seems to trigger specifically when agents are transitioning between shifts. We are managing a high-volume contact center in Chicago, and our WFM schedules are published weekly with strict adherence to shift start/end times. The issue arises when an agent’s scheduled shift ends, but they are still on a call or in a wrap-up state.

Our Architect flow uses a Query Users action to find available agents based on specific skills and schedule availability. We noticed that during the 15-minute window before a shift change, the IVR starts routing calls to agents who are technically still ‘Available’ in the system, but their WFM status is transitioning to ‘Unavailable’ or ‘Break’. This creates a mismatch where the Architect flow sees them as active, but the WFM module is trying to enforce the schedule end time. The result is a spike in abandoned calls because the routing group appears to have capacity, but the agents are effectively being pulled out of the queue by the WFM engine.

Here is what we have tried so far:

  • Adjusted the ‘Query Users’ action in Architect to include a stricter filter on the availability status, ensuring only agents with state: AVAILABLE are returned, but this did not prevent the race condition during the shift change window.
  • Modified the WFM schedule publishing rules to add a 5-minute buffer before the official shift end time to allow for call wrap-up, but the IVR still routes calls to agents who are in the middle of their wrap-up state, causing the same abandonment issue.

We are using Genesys Cloud version 2023-12-19 and the latest Architect SDK. The error manifests as a sudden drop in answered calls during shift changes, specifically between 11:45 AM and 12:00 PM CST when our day shift ends. Has anyone else encountered this WFM-IVR synchronization issue? We need a reliable way to ensure the IVR respects the WFM schedule boundaries without causing a bottleneck during handoffs. Any insights on how to align the Architect flow with WFM schedule transitions would be greatly appreciated.

How I usually solve this is by bypassing the query users action for shift transitions. instead, use the get user state api to check if the agent is actually logged in and available, ignoring the wfm schedule status. this avoids the race condition when wfm updates lag behind actual session states.