Looking for advice on a persistent validation failure when attempting to retrieve aggregated analytics data via the Genesys Cloud v2 Analytics API. Specifically, the endpoint /api/v2/analytics/routings/summary returns a 422 Unprocessable Entity error when including specific custom metric filters that rely on data populated from ServiceNow via Data Actions.
The environment is running Genesys Cloud 2024-10 (EU-West-1). We have established a robust integration where Genesys Cloud webhooks trigger ServiceNow REST API calls to update incident records. Conversely, ServiceNow pushes back context identifiers via the conversation:update event. Our goal is to report on the latency between the Genesys Cloud interaction start and the ServiceNow ticket creation timestamp. To achieve this, we created a custom metric in the Analytics dashboard that maps to the sn_ticket_created_at attribute.
When querying the analytics API with a standard date range and no custom filters, the response is successful. However, adding the custom metric filter results in the following error response:
{
"code": "invalidParameter",
"message": "Filter 'metric_name' is not supported for this query type.",
"status": 422
}
The request payload being sent is structured as follows:
{
"interval": "PT1H",
"date_from": "2024-05-20T00:00:00.000Z",
"date_to": "2024-05-20T23:59:59.999Z",
"view": {
"name": "Digital Channel Routing",
"type": "routing"
},
"filters": {
"channels": ["webchat"],
"metric_names": ["sn_ticket_created_at"]
},
"group_by": ["metric_name"]
}
Cross-referencing the official Genesys Cloud Analytics documentation, custom metrics derived from external Data Action payloads should be queryable if they are properly indexed. We have verified that the sn_ticket_created_at field is correctly populated and visible in the real-time dashboard widgets. The issue seems isolated to the REST API aggregation layer. Is there a specific indexing delay or a required parameter in the view object to enable custom metric filtering in the summary endpoint? Or is this a known limitation when bridging ServiceNow context into Genesys Cloud analytics?