What’s the best way to handle the intermittent payload structure changes in the predictive_routing:queue:status webhook when integrating with ServiceNow via the MID Server?
We are experiencing a recurring issue where the ServiceNow REST message processing job fails with a 400 Bad Request error, specifically citing a JSON parsing failure. The error log indicates that the queue_depth field is sometimes an integer and other times a string, despite the Genesys Cloud documentation suggesting a consistent integer type for this metric. This inconsistency causes the ServiceNow script include to throw a TypeError when attempting arithmetic operations on the queue depth value before updating the corresponding incident record.
The integration is designed to monitor specific digital channel queues (WhatsApp, Web Chat) and update the priority of existing ServiceNow incidents based on real-time wait times and queue depth. When the webhook payload arrives at the MID server, the transformation script expects a strict schema. The recent failures started after the Genesys Cloud platform update to version 2024.06.0. We have verified that the ServiceNow MID server is correctly forwarding the raw JSON payload, and the issue lies in the source data structure from Genesys.
Environment details:
- Genesys Cloud Version: 2024.06.0
- ServiceNow Version: Washington DC (2307)
- Integration: Genesys Webhook → ServiceNow MID Server → REST Message
- Affected Webhook:
predictive_routing:queue:status - Error Code: 400 Bad Request (JSON parsing error in ServiceNow)
Has anyone encountered similar schema drift in the predictive routing webhooks? We are considering adding a defensive type-checking script in ServiceNow, but I prefer to understand if this is a known Genesys Cloud behavior or a bug. Cross-referencing the developer portal docs, there is no mention of this polymorphic field type. Any insights on how to stabilize the payload structure or if there is a specific configuration in the webhook subscription that enforces strict typing would be appreciated.