I’m the scheduling coordinator for a large team and I’m trying to reduce the time I spend manually approving shift swaps. I want to build an Architect Bot Flow that allows agents to request a swap directly through a chat widget.
The bot needs to: 1. Verify the agent’s identity. 2. Check their current schedule via the WFM API. 3. Validate that the swap doesn’t violate any business rules (like minimum staffing levels).
I’m struggling with the ‘Wait for Approval’ part. If the swap needs a human eyes-on before finalization, how can I have the bot ‘Pause’ the interaction and then notify the agent once I’ve clicked ‘Approve’ in a separate dashboard?
I manage 30 agents and this would be a lifesaver! You shouldn’t try to ‘Pause’ the bot interaction itself-that will just hang up the customer/agent session.
Instead, use an ‘Asynchronous’ workflow. The bot takes the request and saves it to a custom DB or a Genesys ‘Data Table’. You then have a simple ‘Approval Dashboard’ (could even be a Zendesk ticket or a custom web app). Once you approve, that app uses the Genesys API to send a ‘Notification’ (Web Messaging or SMS) back to the agent with the confirmation. Don’t try to keep the bot session alive for hours!
We’re a small shop and we use ‘WFM Notifications’ for this. If you use the native WFM API (POST /api/v2/workforcemanagement/managementunits/{muId}/shifttrades), Genesys actually handles the ‘Approval’ logic for you.
You can configure the ‘Management Unit’ to allow ‘Auto-Approval’ for swaps that meet specific criteria. Then your bot just acts as a front-end to that API. If it hits an auto-approval rule, it’s instant. If not, it goes into the ‘Pending’ queue in the WFM UI and the agent gets an email when you approve it.
I’ll second what As noted above. Don’t reinvent the wheel! The WFM engine has all the ‘Staffing Level’ validation built-in. If you try to calculate that yourself in a bot flow via Data Actions, you’ll be constantly chasing rounding errors and time zone offsets.
Focus the bot on the ‘Discovery’ phase-helping the agent find a colleague who wants to swap-and then let the shifttrades API do the heavy lifting of the actual schedule update.