vaclav.sir.kiwi | 2017-10-09 09:11:51 UTC | #1
I need to get all active conversations. I believe that is what the GET /api/v2/conversations endpoint is for. But the response contains no conversation:
{
"entities": [],
"pageSize": 0,
"pageNumber": 1,
"total": 0,
"selfUri": "/api/v2/conversations?pageSize=0&pageNumber=1",
"firstUri": "/api/v2/conversations?pageSize=0&pageNumber=1",
"lastUri": "/api/v2/conversations?pageSize=0&pageNumber=1",
"pageCount": 0
}
When I use the /api/v2/analytics/conversations/details/query endpoint, I get many active conversations (conversations without conversationEnd):
POST /api/v2/analytics/conversations/details/query
{
"interval": "2017-10-09T00:00:00/2017-10-09T23:59:59",
"segmentFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "chat"
}
]
}
],
"paging": {
"pageSize": 100,
"pageNumber": 1
},
"order": "desc",
"orderBy": "conversationStart"
}
But I think data in the analytics endpoint are not always up to date. We ran into an issue, when we were searching for a recent conversation by the participantName dimension, the conversation wasn't found and later that day when I ran the same query (with the same interval, predicates etc.), the conversation was found.
Is there a reliable way to get the most recently started conversations?
tim.smith | 2017-10-09 16:19:06 UTC | #2
vaclav.sir.kiwi, post:1, topic:1922
I believe that is what the GET /api/v2/conversations endpoint is for. But the response contains no conversation:
That resource is in the context of the authenticated user (via the auth token). If your user isn't participating in any active conversations, you won't get any results from that endpoint.
vaclav.sir.kiwi, post:1, topic:1922
When I use the /api/v2/analytics/conversations/details/query endpoint, I get many active conversations (conversations without conversationEnd):
Correct. Analytics will return all conversations that match the filter criteria.
vaclav.sir.kiwi, post:1, topic:1922
But I think data in the analytics endpoint are not always up to date. We ran into an issue, when we were searching for a recent conversation by the participantName dimension, the conversation wasn't found and later that day when I ran the same query (with the same interval, predicates etc.), the conversation was found.
Please open a ticket with PureCloud Support if you're experiencing issues with the data itself. Analytics should be up to date no more than a couple seconds behind reality, typically measured in milliseconds. Support will need the conversation ID as well as the correlation ID from all relevant analytics requests (at least showing bad data and good data).
system | 2017-11-09 16:19:26 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 1922