vijayakumar.appasani | 2017-02-23 15:34:59 UTC | #1
Platform api: api/v2/conversations/{conversationId} returned two different endtimes for single conversation.
First time when the api was called we got below response:
<<truncated>> [DEBUG] 2017-02-07 20:44:13,984 org.apache.http.wire Wire.java wire - http-outgoing-0 << "{"id":"50c7b144-9429-43ad-b0de-c828aec4432b","startTime":"2017-02-07T11:42:27.093Z","endTime":"2017-02-07T11:44:05.104Z","participants":[{"id":"07e714e7-4f31-4297-833c-7859e4044518"… <<truncated>>
Second time:
<<truncated>> [DEBUG] 2017-02-07 20:49:14,480 org.apache.http.wire Wire.java wire - http-outgoing-0 << "{"id":"50c7b144-9429-43ad-b0de-c828aec4432b","startTime":"2017-02-07T11:42:27.093Z","endTime":"2017-02-07T11:44:59.292Z","participants":[{"id":"07e714e7-4f31-4297-833c-7859e4044518".. <<truncated>>
notice: image removed for having auth tokens
Please find attached logs for more details.
Note: Above responses are obtained from logs of java platform apis sdk.(version- 0.47.3.121)
tim.smith | 2017-02-23 16:02:21 UTC | #2
The endTime field is a calculated value based on the conversation data. In this case, it appears that a wrapup code was set on the conversation between the two requests. Because new activity occurred, the endTime value was updated to reflect the end of the last activity on the conversation.
vijayakumar.appasani | 2017-02-24 06:37:46 UTC | #3
vijayakumar.appasani, post:1, topic:964
2017-02-07T11:44:05.104Z
As per the response, wrapup code was set on 2017-02-07T11:44:59.292Z Please find below portion of response. <<truncated>> "wrapupRequired": true, "wrapupPrompt": "optional", "wrapup": { "code": "b1cb2fe3-3939-43b5-9b40-cff3269d1596", "name": "Applications (應用程式)", "notes": "", "tags": [], "durationSeconds": 116, "endTime": "2017-02-07T11:44:59.292Z" } <<truncated>> And the time (2017-02-07T11:44:05.104Z) which was returned as endTime for first request is the IVR disconnected time. <<truncated>> { "startTime": "2017-02-07T11:43:03.068Z", "endTime": "2017-02-07T11:44:05.104Z", "type": "IVR", "howEnded": "Disconnect" } <<truncated>> As per our understanding, conversation endTime should be returned only when all the activites in the conversation are completed. Even if the IVR was disconnected at 11:44:05, wrapup code was no set for the conversation so endTime should have not been returned as 11:44:05. Please correct us if we have mistaken anything.
tim.smith | 2017-02-24 15:10:37 UTC | #4
vijayakumar.appasani, post:3, topic:964
As per our understanding, conversation endTime should be returned only when all the activites in the conversation are completed. Even if the IVR was disconnected at 11:44:05, wrapup code was no set for the conversation so endTime should have not been returned as 11:44:05.
As far as PureCloud could tell, the conversation was completed. There were no connected participants remaining. Because PureCloud can't know if the agent is going to set a wrapup code or not, it assumes the conversation has ended when all participants have disconnected. If any activity happens in the future, the end time will be updated to reflect the new post-disconnect activity.
If this is an issue, you can inspect the participant data on the conversation to determine if you expect an agent to provide a wrapup code or not. If you believe they will, you could ignore the end time on the conversation and wait for a wrapup code to be set. Just be aware that the wrapup code may never come because the agent may not provide it.
system | 2017-08-28 19:32:21 UTC | #5
This post was migrated from the old Developer Forum.
ref: 964