I need to retrieve all calls from a given number for the past two weeks, where the participant data is a particular value. When I call the GET /api/v2/conversations/{conversationId} it returns a valid record and the data I need is in the attributes:
..."attributes": {
...
"Log.Menu Option": "Service",
...
}
So, I need to run a query where ani= and attributes.Log.Menu Option= "Service". I'm using the POST /api/v2/analytics/conversations/details/query with the following request body:
{
"interval": "2023-10-01T00:00:00.000Z/2023-10-31T00:00:00.000Z",
"segmentFilters": [
{
"type": "or",
"predicates": [
{
"propertyType": "string",
"property": "ani",
"value": "tel:+44"
}
]
}
]
}
replacing the with the actual number. The call was made on 24 October.
I've also tried
{
"interval": "2023-10-01T00:00:00.000Z/2023-10-31T00:00:00.000Z",
"segmentFilters": [
{
"type": "or",
"predicates": [
{
"propertyType": "uuid",
"property": "conversationId",
"value": "d7da3dda-eb31-466c-965c-981f69088aaa"
}
]
}
]
}
just to test it, but neither returns any data. Pretty sure I'm getting the syntax wrong, but the documentation is really sketchy around these queries. So, my questions are:
-
Can I achieve what I want with the Conversations Details Query? I'm willing to accept a solution where I get an array of conversationIDs returned from a query that matches the ani, and then call GET /api/v2/conversations/{conversationId} to get the log.Menu Option.
-
Is there any detailed documentation on the Conversation Details Query, other than this https://developer.genesys.cloud/analyticsdatamanagement/analytics/detail/conversation-query which doesn't go into enough detail?
-
Is the syntax of the queries above correct?
Many thanks!