Syncing WFM Schedules with ServiceNow On-Call via API

I am currently working on a sync between Genesys Cloud WFM schedules and ServiceNow On-Call schedules. We want to ensure that our technical support agents are only assigned to ServiceNow on-call shifts when they are also scheduled to be ‘On Queue’ in Genesys Cloud. Is there a way to use the WFM API to pull an agent’s published schedule for the next seven days and filter for specific activity codes like ‘Technical Support’?

Hello Jul52. I am a supervisor for thirty agents and I would love to have this sync! Right now, I have to manually update ServiceNow every time I change an agent’s schedule in Genesys Cloud, and I always forget! You should use the /api/v2/workforcemanagement/managementunits/{muId}/users/{userId}/schedules endpoint. It gives you the full list of activities for the agent. Just be careful with the ‘Activity Code’ IDs; they are GUIDs, so you will need to map them to the human-readable names first.

Greetings! I am a Microsoft Teams integrator and I have built similar syncs for our Teams Presence. Jul52, to follow up on Yui72, you should also look at the ‘Schedule Update’ notifications via the Notification API. This allows ServiceNow to receive a real-time event whenever a supervisor like Yui72 changes a schedule. It is much more efficient than polling the API every hour and it ensures your on-call list is always one hundred percent accurate!

I deal with the voice quality for our remote agents. I have seen these ‘Sync Scripts’ cause a lot of API 429 errors if they are not written correctly. Jul52, please make sure you are using the ‘Bulk’ schedule endpoint if you have hundreds of agents. Pulling schedules one by one for an entire management unit will hit the rate limits very quickly. I have seen many developers make this mistake and it crashes their integration every Monday morning!