Quick question about integrating Genesys Cloud Analytics reporting data into ServiceNow via a scheduled Data Action. We are attempting to automate the creation of ServiceNow tickets for specific digital channel performance metrics, specifically focusing on messaging conversations that exceed a certain handle time threshold in the UK East region. The environment is running ServiceNow Tokyo Release and Genesys Cloud Architect Flow v4.
The issue arises when the Data Action attempts to post the aggregated analytics data. The initial GET request to the Genesys Cloud Analytics API succeeds, returning a 200 OK with the expected JSON payload. However, the subsequent POST to the ServiceNow REST API endpoint returns a 400 Bad Request. The error message from ServiceNow indicates a schema validation failure, specifically complaining about the structure of the metrics array within the payload.
Here is the sample payload being sent to the ServiceNow API:
{
"short_description": "High Handle Time Alert - Messaging Channel",
"description": "Automated alert from Genesys Cloud Analytics",
"metrics": [
{
"metric_name": "handle_time",
"value": 450.5,
"unit": "seconds",
"conversation_id": "conv_123456789"
}
],
"source_system": "Genesys Cloud",
"timestamp": "2023-10-27T14:30:00Z"
}
The ServiceNow table definition expects metrics to be an array of objects, which this payload provides. I have cross-referenced the ServiceNow documentation for the REST API and the Genesys Cloud Analytics API docs, and the structure appears compliant. Is there a known limitation with how Data Actions serialize arrays of objects when pushing to external REST endpoints? Or is there a specific transformation step in Architect that I might be missing to ensure the JSON structure remains intact during the handoff? Any insights on debugging the exact point of failure in the serialization process would be greatly appreciated.