BAPTISTE_DERRE | 2017-10-24 14:12:31 UTC | #1
Hello everyone,
It seems that the following endpoints do not retrieve the same information, such as the same segments :
- /api/v2/conversations/{conv_id}
- /api/v2/analytics/conversations/{conversationId}/details
Could you explain me how those 2 endpoints are working and if there are differences between them, what are the behavior of them ?
If we are using /api/v2/analytics/conversations/{conversationId}/details for extracting data into a reporting tool, what do we need to consider in order to get all the conversations details ? Is there specific constraints that we need to take into account (such as batch scheduling...)
Thanks a lot for your help. Baptiste.
anon28066628 | 2017-10-24 14:39:33 UTC | #2
Hi Baptiste,
Those endpoints return different objects - one is Conversation, the other is AnalyticsConversation. They're different views of the same basic data. The AnalyticsConversation does not include Participant Data and some other details.
Details about return types are in the documentation. You should also look at the SDK documentation, even if you aren't using any of the SDKs. The SDK documentation gives the object return types explicitly:
https://developer.mypurecloud.com/api/rest/client-libraries/java/
BAPTISTE_DERRE | 2017-10-25 09:37:18 UTC | #3
Thanks Smith for your answer.
However I do not think it is our problem. Calling AnalyticsConversation we are retrieving participant data. I am attaching 2 XML in order to show you.
First call (made on 03/10) :
<entity> <conversations> <conversationId>dda7ea4b-6852-411d-8629-d2166bdcb80c</conversationId> <participants> <sessions> <dnis>sip:BVLKQ52.internal.lan_1@10.98.0.251</dnis> <segments> <segmentEnd>2017-10-02T07:10:05.783Z</segmentEnd> <queueId>52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9</queueId> <segmentType>alert</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:05.721Z</segmentStart> </segments> <segments> <disconnectType>peer</disconnectType> <segmentEnd>2017-10-02T07:10:39.008Z</segmentEnd> <queueId>52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9</queueId> <segmentType>interact</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:05.783Z</segmentStart> </segments> <segments> <disconnectType>peer</disconnectType> <segmentEnd>2017-10-02T07:10:50.864Z</segmentEnd> <wrapUpCode>73e9280c-a816-4ebc-b63e-0bfeab3c6d51</wrapUpCode> <queueId>52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9</queueId> <wrapUpNote/> <segmentType>wrapup</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:39.864Z</segmentStart> </segments> <edgeId>441ccf03-1c88-429f-b1bf-43053963567d</edgeId> <ani>sip:+33623007586@10.98.0.250;user=phone</ani> <outboundContactId>f438fd5daa986d13c7bd9acb6669dd9f</outboundContactId> <sessionId>1e703706-a413-4616-8b08-eeaf9898ccec</sessionId> <direction>outbound</direction> <outboundContactListId>2e9d8e57-525b-40ec-8120-5f828a933ef4</outboundContactListId> <outboundCampaignId>98a26818-9e03-4953-8d66-83b10eb303cc</outboundCampaignId> <mediaType>voice</mediaType> </sessions> <userId>e0a32559-a024-4c3b-bd84-f7f17164616d</userId> <participantId>73fbb432-1fa5-4349-8090-55b1614d2523</participantId> <purpose>agent</purpose> </participants> <conversationStart>2017-10-02T07:09:51.345Z</conversationStart> </conversations> </entity>
Second call (made on 19/10) :
<entity> <conversations> <conversationEnd>2017-10-02T07:10:50.864Z</conversationEnd> <conversationId>dda7ea4b-6852-411d-8629-d2166bdcb80c</conversationId> <participants> <sessions> <dnis>tel:+33623007586</dnis> <segments> <segmentEnd>2017-10-02T07:10:03.220Z</segmentEnd> <segmentType>dialing</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:09:51.345Z</segmentStart> </segments> <segments> <segmentEnd>2017-10-02T07:10:39.017Z</segmentEnd> <segmentType>interact</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:03.220Z</segmentStart> </segments> <edgeId>4f0300ba-4304-4793-b4a9-1ce42573d6f4</edgeId> <ani>sip:+33179350630@10.98.0.251;user=phone</ani> <outboundContactId>f438fd5daa986d13c7bd9acb6669dd9f</outboundContactId> <sessionId>8cee83bc-ea88-43bd-b545-b86a96c9ecc8</sessionId> <direction>outbound</direction> <outboundContactListId>2e9d8e57-525b-40ec-8120-5f828a933ef4</outboundContactListId> <outboundCampaignId>98a26818-9e03-4953-8d66-83b10eb303cc</outboundCampaignId> <mediaType>voice</mediaType> </sessions> <participantName>France</participantName> <participantId>0269467a-c9e4-45a2-8451-075c863b9828</participantId> <purpose>customer</purpose> </participants> <participants> <sessions> <dnis>tel:+33623007586;tgrp=b40625fc-9a4e-4596-a7ee-2100e1230738;trunk-context=euifrance</dnis> <segments> <segmentEnd>2017-10-02T07:10:05.432Z</segmentEnd> <segmentType>system</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:05.432Z</segmentStart> </segments> <segments> <segmentEnd>2017-10-02T07:10:06.049Z</segmentEnd> <wrapUpCode>ININ-OUTBOUND-TRANSFERRED-TO-QUEUE</wrapUpCode> <segmentType>wrapup</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:06.049Z</segmentStart> </segments> <edgeId>441ccf03-1c88-429f-b1bf-43053963567d</edgeId> <ani>tel:+33179350630</ani> <outboundContactId>f438fd5daa986d13c7bd9acb6669dd9f</outboundContactId> <sessionId>6f0cd1ed-0e42-4408-8d0b-cb02eb91eec6</sessionId> <direction>outbound</direction> <outboundContactListId>2e9d8e57-525b-40ec-8120-5f828a933ef4</outboundContactListId> <dispositionName>disposition.classification.callable.person</dispositionName> <dispositionAnalyzer>speech.person</dispositionAnalyzer> <outboundCampaignId>98a26818-9e03-4953-8d66-83b10eb303cc</outboundCampaignId> <mediaType>voice</mediaType> </sessions> <participantName>L'olivier</participantName> <participantId>d76a9712-3032-43ae-b52d-5b52b38e6bac</participantId> <purpose>outbound</purpose> </participants> <participants> <sessions> <segments> <segmentEnd>2017-10-02T07:10:05.504Z</segmentEnd> <queueId>52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9</queueId> <segmentType>delay</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:05.500Z</segmentStart> </segments> <segments> <disconnectType>transfer</disconnectType> <segmentEnd>2017-10-02T07:10:05.800Z</segmentEnd> <queueId>52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9</queueId> <sipResponseCodes>410</sipResponseCodes> <segmentType>interact</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:05.504Z</segmentStart> </segments> <edgeId>4f0300ba-4304-4793-b4a9-1ce42573d6f4</edgeId> <ani>tel:+33623007586</ani> <outboundContactId>f438fd5daa986d13c7bd9acb6669dd9f</outboundContactId> <sessionId>69c498a4-4646-4c77-b9bb-b473719fcd70</sessionId> <direction>outbound</direction> <outboundContactListId>2e9d8e57-525b-40ec-8120-5f828a933ef4</outboundContactListId> <outboundCampaignId>98a26818-9e03-4953-8d66-83b10eb303cc</outboundCampaignId> <mediaType>voice</mediaType> </sessions> <participantName>QUEUE-SALES-OUTBOUND</participantName> <participantId>cd9f18f7-0276-4b73-aa8a-6d2a0a3bd475</participantId> <purpose>acd</purpose> </participants> <participants> <sessions> <dnis>sip:BVLKQ52.internal.lan_1@10.98.0.251</dnis> <segments> <segmentEnd>2017-10-02T07:10:05.783Z</segmentEnd> <queueId>52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9</queueId> <segmentType>alert</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:05.721Z</segmentStart> </segments> <segments> <disconnectType>peer</disconnectType> <segmentEnd>2017-10-02T07:10:39.008Z</segmentEnd> <queueId>52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9</queueId> <segmentType>interact</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:05.783Z</segmentStart> </segments> <segments> <disconnectType>peer</disconnectType> <segmentEnd>2017-10-02T07:10:50.864Z</segmentEnd> <wrapUpCode>73e9280c-a816-4ebc-b63e-0bfeab3c6d51</wrapUpCode> <queueId>52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9</queueId> <wrapUpNote/> <segmentType>wrapup</segmentType> <conference>false</conference> <segmentStart>2017-10-02T07:10:39.864Z</segmentStart> </segments> <edgeId>441ccf03-1c88-429f-b1bf-43053963567d</edgeId> <ani>sip:+33623007586@10.98.0.250;user=phone</ani> <outboundContactId>f438fd5daa986d13c7bd9acb6669dd9f</outboundContactId> <sessionId>1e703706-a413-4616-8b08-eeaf9898ccec</sessionId> <direction>outbound</direction> <outboundContactListId>2e9d8e57-525b-40ec-8120-5f828a933ef4</outboundContactListId> <outboundCampaignId>98a26818-9e03-4953-8d66-83b10eb303cc</outboundCampaignId> <mediaType>voice</mediaType> </sessions> <userId>e0a32559-a024-4c3b-bd84-f7f17164616d</userId> <participantId>73fbb432-1fa5-4349-8090-55b1614d2523</participantId> <purpose>agent</purpose> </participants> <conversationStart>2017-10-02T07:09:51.345Z</conversationStart> </conversations> </entity>
It seems that calling the same endpoint with a couple of days interval, we do not get the same answer.
Could you please explain me why we do not manage to get the same number of participant nodes?
Thanks for your help! Baptiste.
anon28066628 | 2017-10-25 14:40:58 UTC | #4
Hi Baptiste, you should get the same result for the same conversation any time you retrieve it from the Analytics API. If you are seeing different conversation details on different days for the same conversation, please do contact support.
I would suggest though referencing the original JSON response you're getting from the Analytics service. Since PureCloud doesn't return XML, is there a chance an error is being introduced with your conversion?
tim.smith | 2017-10-25 15:45:13 UTC | #5
Keep in mind that PureCloud provides data in a Data As A Service (DaaS) manner. This means that when you want data about something in PureCloud, the correct approach is to make a request to the API to get that data; caching data outside of PureCloud is undesirable because you run the risk of using out of date data. The data returned from the API will always be the most correct and most up to date version of the data. For example, if there is a bug in how a part of the data is calculated, when this bug is fixed, all data affected by it will be recalculated and will be different than your cached version.
Also, as RJ mentioned, your JSON to XML conversion process needs to be removed from the mix to identify if the data is missing because the API didn't send it to you or if your conversion process is truncating it somehow. Once you do that, if you determine that the API is in fact not returning data you know must be there, please open a ticket with PureCloud Support; we cannot troubleshoot missing data via the forum.
BAPTISTE_DERRE | 2017-10-26 08:37:38 UTC | #6
Thanks both for your answers.
I attach the JSON but we have the same problem, so the issue does not come from the way the XML is built.
I understand what Tim said regarding the fact that PureCloud is DaaS oriented, and the point regarding data recalculation.
But what I am struggling to understand is why a call to the same endpoint, at 2 different times, but based on the same past datetime interval, gives us 2 different results. Is there a reason for this ?
Below the JSON flow :
First call to the API :
{ "entity": { "conversations": { "conversationId": "dda7ea4b-6852-411d-8629-d2166bdcb80c", "participants": { "sessions": { "dnis": "sip:BVLKQ52.internal.lan_1@10.98.0.251", "segments": [ { "segmentEnd": "2017-10-02T07:10:05.783Z", "queueId": "52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9", "segmentType": "alert", "conference": "false", "segmentStart": "2017-10-02T07:10:05.721Z" }, { "disconnectType": "peer", "segmentEnd": "2017-10-02T07:10:39.008Z", "queueId": "52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9", "segmentType": "interact", "conference": "false", "segmentStart": "2017-10-02T07:10:05.783Z" }, { "disconnectType": "peer", "segmentEnd": "2017-10-02T07:10:50.864Z", "wrapUpCode": "73e9280c-a816-4ebc-b63e-0bfeab3c6d51", "queueId": "52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9", "wrapUpNote": "", "segmentType": "wrapup", "conference": "false", "segmentStart": "2017-10-02T07:10:39.864Z" } ], "edgeId": "441ccf03-1c88-429f-b1bf-43053963567d", "ani": "sip:+33623007586@10.98.0.250;user=phone", "outboundContactId": "f438fd5daa986d13c7bd9acb6669dd9f", "sessionId": "1e703706-a413-4616-8b08-eeaf9898ccec", "direction": "outbound", "outboundContactListId": "2e9d8e57-525b-40ec-8120-5f828a933ef4", "outboundCampaignId": "98a26818-9e03-4953-8d66-83b10eb303cc", "mediaType": "voice" }, "userId": "e0a32559-a024-4c3b-bd84-f7f17164616d", "participantId": "73fbb432-1fa5-4349-8090-55b1614d2523", "purpose": "agent" }, "conversationStart": "2017-10-02T07:09:51.345Z" } } }
Second call to the API :
{ "conversations": { "conversationEnd": "2017-10-02T07:10:50.864Z", "conversationId": "dda7ea4b-6852-411d-8629-d2166bdcb80c", "participants": [ { "sessions": { "dnis": "tel:+33623007586", "segments": [ { "segmentEnd": "2017-10-02T07:10:03.220Z", "segmentType": "dialing", "conference": "false", "segmentStart": "2017-10-02T07:09:51.345Z" }, { "segmentEnd": "2017-10-02T07:10:39.017Z", "segmentType": "interact", "conference": "false", "segmentStart": "2017-10-02T07:10:03.220Z" } ], "edgeId": "4f0300ba-4304-4793-b4a9-1ce42573d6f4", "ani": "sip:+33179350630@10.98.0.251;user=phone", "outboundContactId": "f438fd5daa986d13c7bd9acb6669dd9f", "sessionId": "8cee83bc-ea88-43bd-b545-b86a96c9ecc8", "direction": "outbound", "outboundContactListId": "2e9d8e57-525b-40ec-8120-5f828a933ef4", "outboundCampaignId": "98a26818-9e03-4953-8d66-83b10eb303cc", "mediaType": "voice" }, "participantName": "France", "participantId": "0269467a-c9e4-45a2-8451-075c863b9828", "purpose": "customer" }, { "sessions": { "dnis": "tel:+33623007586;tgrp=b40625fc-9a4e-4596-a7ee-2100e1230738;trunk-context=euifrance", "segments": [ { "segmentEnd": "2017-10-02T07:10:05.432Z", "segmentType": "system", "conference": "false", "segmentStart": "2017-10-02T07:10:05.432Z" }, { "segmentEnd": "2017-10-02T07:10:06.049Z", "wrapUpCode": "ININ-OUTBOUND-TRANSFERRED-TO-QUEUE", "segmentType": "wrapup", "conference": "false", "segmentStart": "2017-10-02T07:10:06.049Z" } ], "edgeId": "441ccf03-1c88-429f-b1bf-43053963567d", "ani": "tel:+33179350630", "outboundContactId": "f438fd5daa986d13c7bd9acb6669dd9f", "sessionId": "6f0cd1ed-0e42-4408-8d0b-cb02eb91eec6", "direction": "outbound", "outboundContactListId": "2e9d8e57-525b-40ec-8120-5f828a933ef4", "dispositionName": "disposition.classification.callable.person", "dispositionAnalyzer": "speech.person", "outboundCampaignId": "98a26818-9e03-4953-8d66-83b10eb303cc", "mediaType": "voice" }, "participantName": "L'olivier", "participantId": "d76a9712-3032-43ae-b52d-5b52b38e6bac", "purpose": "outbound" }, { "sessions": { "segments": [ { "segmentEnd": "2017-10-02T07:10:05.504Z", "queueId": "52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9", "segmentType": "delay", "conference": "false", "segmentStart": "2017-10-02T07:10:05.500Z" }, { "disconnectType": "transfer", "segmentEnd": "2017-10-02T07:10:05.800Z", "queueId": "52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9", "sipResponseCodes": "410", "segmentType": "interact", "conference": "false", "segmentStart": "2017-10-02T07:10:05.504Z" } ], "edgeId": "4f0300ba-4304-4793-b4a9-1ce42573d6f4", "ani": "tel:+33623007586", "outboundContactId": "f438fd5daa986d13c7bd9acb6669dd9f", "sessionId": "69c498a4-4646-4c77-b9bb-b473719fcd70", "direction": "outbound", "outboundContactListId": "2e9d8e57-525b-40ec-8120-5f828a933ef4", "outboundCampaignId": "98a26818-9e03-4953-8d66-83b10eb303cc", "mediaType": "voice" }, "participantName": "QUEUE-SALES-OUTBOUND", "participantId": "cd9f18f7-0276-4b73-aa8a-6d2a0a3bd475", "purpose": "acd" }, { "sessions": { "dnis": "sip:BVLKQ52.internal.lan_1@10.98.0.251", "segments": [ { "segmentEnd": "2017-10-02T07:10:05.783Z", "queueId": "52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9", "segmentType": "alert", "conference": "false", "segmentStart": "2017-10-02T07:10:05.721Z" }, { "disconnectType": "peer", "segmentEnd": "2017-10-02T07:10:39.008Z", "queueId": "52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9", "segmentType": "interact", "conference": "false", "segmentStart": "2017-10-02T07:10:05.783Z" }, { "disconnectType": "peer", "segmentEnd": "2017-10-02T07:10:50.864Z", "wrapUpCode": "73e9280c-a816-4ebc-b63e-0bfeab3c6d51", "queueId": "52ea3c19-f501-4c0b-a218-ed8dcc3bc8e9", "wrapUpNote": "", "segmentType": "wrapup", "conference": "false", "segmentStart": "2017-10-02T07:10:39.864Z" } ], "edgeId": "441ccf03-1c88-429f-b1bf-43053963567d", "ani": "sip:+33623007586@10.98.0.250;user=phone", "outboundContactId": "f438fd5daa986d13c7bd9acb6669dd9f", "sessionId": "1e703706-a413-4616-8b08-eeaf9898ccec", "direction": "outbound", "outboundContactListId": "2e9d8e57-525b-40ec-8120-5f828a933ef4", "outboundCampaignId": "98a26818-9e03-4953-8d66-83b10eb303cc", "mediaType": "voice" }, "userId": "e0a32559-a024-4c3b-bd84-f7f17164616d", "participantId": "73fbb432-1fa5-4349-8090-55b1614d2523", "purpose": "agent" } ], "conversationStart": "2017-10-02T07:09:51.345Z" } }
Thanks a lot for your help.
Baptiste
BAPTISTE_DERRE | 2017-10-30 08:59:21 UTC | #7
Hello everyone,
Any idea on this topic ?
Thanks for your help.
Baptiste.
tim.smith | 2017-10-31 14:58:33 UTC | #8
It sounds like you've confirmed that the API isn't returning data you know should be there. Please open a ticket for this with PureCloud Support as we cannot troubleshoot missing data via the forum.
BAPTISTE_DERRE | 2017-10-31 15:35:57 UTC | #9
Thanks for your answer Tim. I am going to relaunch the Customer Care support. You can close this topic.
Best regards, Baptiste.
system | 2017-12-01 15:36:10 UTC | #10
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: 1998