I run .NET 8 Azure Function to pull interaction wrap-up stats from Genesys Cloud. Using GenesysCloudPlatformSDK v3.5.2. Endpoint: GET /api/v2/analytics/details/interactions.
All work fine until filter attach for wrapup.code field. Response immediately come back with 422 Unprocessable Entity.
Request payload:
{
"dateRange": { "startDate": "2024-05-01T00:00:00-03:00", "endDate": "2024-05-07T23:59:59-03:00" },
"groupBy": ["wrapup.code"],
"filter": "wrapup.code:IN:[Resolved,Escalated,Other]",
"view": "default"
}
Documentation state: “Filters must follow the syntax: field:value or field:operator:value. Complex expressions require parentheses.”
My string match that format. Why 422?
I swap filter for queue.id:eq:12345 and data return instantly. Date range and groupBy parameters not cause block. Is specifically IN operator on wrap-up codes.
HttpClient dump show .NET SDK serialize to filter=wrapup.code%3AIN%3A%5BResolved%2CEscalated%2COther%5D. Decoding give exact original string. Still hit 422.
Platform error body:
{
"message": "Invalid filter expression: wrapup.code:IN:[Resolved,Escalated,Other]",
"errors": ["Filter operator 'IN' is not supported for field 'wrapup.code' in this view."]
}
That last line make zero sense. default view include wrap-up codes by design. We query queue metrics with same view for months. I switch view parameter to wrapup just to test. Same 422 response. I try escape brackets. I try comma separation without brackets. All fail. Nothing work.
Server clock run on America/Sao_Paulo. SDK handle UTC conversion automatically, but I force offset to -03:00 in startDate just in case. Not change outcome.
I check raw request headers. Authorization token fresh. Scope include analytics:report:read. Endpoint routing look correct. Maybe .NET SDK drop operator during Filter object construction? Or API change how parse array filters in details endpoint?
var filter = new Filter { Field = "wrapup.code", Operator = "IN", Value = "Resolved,Escalated,Other" };
I pass that directly into QueryInteractionsDetailsAsync method. SDK version 3.5.2.
Why this not work? Docs say syntax correct. Error say operator not supported. But IN is standard operator.