Stian | 2016-12-07 11:34:58 UTC | #1
Hi, I uses https://developer.mypurecloud.com/api/rest/v2/analytics/#postAnalyticsConversationsDetailsQuery to get all calls for a day, I read all conversations, participant, sessions and segments into a local db and from this i selects all conversations. So far so good, I have selected all Paricipants with purpose Agent, segmenttype Interact and direction inbound, it only inbound calls that i want. I also joins this data with Queues and agents so i can see who and where the conversation took place. Problem is that I wants to just get conversations that was completed, so if the customer suddenly hangs up i dont wont these calls. I have looked at disconnect types but arent sure what i can use here, cant find any good documentation on these codes. I have had a look at Talktime , that i think , if I'm right, that i can calculate from segment start and end, on the interact segment for the Agent? but then i have to say that only calls over fex 30 seconds should be selected.
RogierBosch | 2016-12-07 12:40:45 UTC | #2
Are you using Wrap-ups after an inbound call?
tim.smith | 2016-12-07 22:13:07 UTC | #3
Stian, post:1, topic:704
Problem is that I wants to just get conversations that was completed, so if the customer suddenly hangs up i dont wont these calls. I have looked at disconnect types but arent sure what i can use here, cant find any good documentation on these codes.
https://developer.mypurecloud.com/forum/t/disconnecttype-of-outdatedsdkversion/469/7?u=tim.smith
Stian | 2016-12-08 07:08:34 UTC | #4
No not on all calls.
Stian | 2016-12-08 07:14:09 UTC | #5
ok , thanks, another strange thing is that when i call PostConversationsDetailsQuery(body), with a pagespec of fex 50, I sometimes, like today, get only 32 conversations in return. But this doesn't happen every time. It looks like that i get all the data, If i pools data serveral times i get the same amount of data i total.
tim.smith | 2016-12-08 15:35:23 UTC | #6
Are you saying that you execute the same query for a fixed interval in the past and get different results? Or are you saying that for different intervals, you sometimes don't get 50 results?
Stian | 2016-12-08 23:19:48 UTC | #7
I'm doing the same query, with body that should return 50 conversations, but gets only 32 for page 1, page 2 i got 50, page I got less.
Stian | 2016-12-12 09:06:47 UTC | #8
Like today I queried conversations for last friday like this: body.Interval = interval; body.Paging = new ININ.PureCloudApi.Model.PagingSpec(100, iPageIndex); AnalyticsConversationQueryResponse result = new AnalyticsConversationQueryResponse(); result = analyticlApi.PostConversationsDetailsQuery(body);
I would expect that i got 100 conv per pages that i askes for, but the first return returns 98 conversations, the second 97 and so on.
tim.smith | 2016-12-12 16:02:44 UTC | #9
Do any active conversations occur in the interval you're requesting? Or are your queries exclusively for start/end times in the past? Intervals that contain active conversations can return different data sets between requests because the data changes due to the active conversations.
Stian | 2016-12-13 11:32:28 UTC | #10
I use only start and end times in the past. For example to day I queried data from this time interval: 2016-12-12T00:00:00.000/2016-12-13T00:00:00.000 so there shouldn't be any open sessions. Today the first page returnes 100 conversations, the second 95 , the third 96 and so on, in total over 3500 conversations are selected.
tim.smith | 2016-12-13 15:19:32 UTC | #11
I've been discussing this with the Analytics team, and this behavior shouldn't be happening (not getting full page results). They have asked that you open a ticket with PureCloud Support to investigate further. Support will need to see at least the full body of your requests and correlation IDs from each of the responses to those requests.
Stian | 2016-12-16 18:18:28 UTC | #12
Ok, today i get full page results, but it suddenly fails on page 15 every time with message: "Error calling PostConversationsDetailsQuery: {\"status\":500,\"code\":\"internal.server.error\",\"message\":\"An unexpected error was encountered which prevented it from fulfilling the request.\",\"details\":[],\"errors\":[]}"
It looks like something must have happened from yesterday , because I pulled data for the 14. without problems yesterday, and today I suddenly gets errors.....
I tried in the Query builder and got error there too: Body: { "interval": "2016-12-14T23:00:00.000Z/2016-12-15T23:00:00.000Z", "order": "asc", "orderBy": "conversationStart", "paging": { "pageSize": "25", "pageNumber": "62" } } Result: { "readyState": 4, "responseText": "{\"status\":500,\"code\":\"internal.server.error\",\"message\":\"An unexpected error was encountered which prevented it from fulfilling the request.\",\"details\":[],\"errors\":[]}", "responseJSON": { "status": 500, "code": "internal.server.error", "message": "An unexpected error was encountered which prevented it from fulfilling the request.", "details": [], "errors": [] }, "status": 500, "statusText": "Internal Server Error" }
Its look like this is one of the problem: { "interval": "2016-12-14T23:00:00.000Z/2016-12-15T23:00:00.000Z", "order": "asc", "orderBy": "conversationStart", "paging": { "pageSize": "1", "pageNumber": "1535" } }
seems like you have found the problem:
https://developer.mypurecloud.com/forum/t/error-calling-postconversationsdetailsquery/723
system | 2017-08-28 19:29:19 UTC | #13
This post was migrated from the old Developer Forum.
ref: 704