Chase_Hamby | 2021-02-24 16:16:45 UTC | #1
Hey Team,
Is there a way to access the "attributes" data from our conversations when using the api/v2/analytics/conversations/{id}/details endpoint? For example, the data in the api/v2/conversation/chats/{id} endpoint returns all of custom field data collected through the web chat component and it would be really helpful if we could also access this same data in the analytics endpoint as well. Is there a way to do that? Let me know if I need to provide any data examples.
Thanks!
anon11147534 | 2021-02-18 13:37:23 UTC | #2
Hi,
As far as I'm aware, there's no way to get conversation attributes from the Analytics API. To get conversation attributes you can use GET /api/v2/conversations/{conversationId}
Jerome.Saint-Marc | 2022-05-01 08:31:46 UTC | #3
Hello,
If you want to retrieve/access the participant attributes (attributes data) from a conversation, you have 2 options.
You can get them via Conversations API with a GET /api/v2/conversations/{conversationId} (or other Conversations API related endpoints). The conversations via the Conversation API (requests starting with /api/v2/conversations) remain available for up to 60 days after the conversation happened. EDIT: to reflect current limit (60 days) in Request a conversation as this old answer is still found in search After 60 days, the data is only available via the Analytics API.
You can also retrieve them using Analytics API with an asynchronous query for conversations details (job). See here for some details on this analytics conversation details job. This is the only analytics API endpoint which allows to retrieve conversation details with the participant attributes/data. As it is explained in the article, the data will not be available immediately through that endpoint (there is a nightly batch that processes these conversations). See here for some info on data availability with this job.
Regards,
Chase_Hamby | 2021-02-23 19:30:31 UTC | #4
Thanks Jerome! We tried with the Analytics API, using the conversations details (job), but it is not returning any of the custom attributes. See a snippet of the response below:
{ "conversationId": "fa74f56e-27de-4f5e-be63-549422f2e08f", "conversationStart": "2021-02-18T05:16:02.475Z", "conversationEnd": "2021-02-18T05:59:01.089Z", "originatingDirection": "inbound", "divisionIds": [ "f985995c-dbb9-44a6-8729-f15f421e7e15" ], "participants": [ { "participantId": "83f81bd0-f1fa-442c-8d00-1cb090dd757c", "participantName": "xxxx xxxxxx", "purpose": "customer", "sessions": [ { "mediaType": "chat", "sessionId": "d2b4d3fc-b2a4-463c-8848-118bb6c26c8b", "direction": "inbound", "segments": [ { "segmentStart": "2021-02-18T05:16:02.475Z", "segmentEnd": "2021-02-18T05:57:01.514Z", "queueId": "57d0489a-dd0c-4dcf-b4ec-a44fc948b907", "disconnectType": "peer", "segmentType": "interact", "conference": false }
Is that expected or should we be able to also see some of our custom fields that we get in the Conversations API?
Jerome.Saint-Marc | 2021-02-24 08:14:11 UTC | #5
Hello,
As you have not copied the full participant structure, I can't say.
The participant data/attributes will appear inside the "attributes" element - which is at the participant structure level. Not within the participant's session or segment. You can see the Response Schema (for 200 - successful operation) in the "Fetch a page of results for an async query" API endpoint. I mean:
{ "cursor": "", "dataAvailabilityDate": "", "conversations": [ { "conversationId": "", "conversationStart": "", "conversationEnd": "", "mediaStatsMinConversationMos": 0, "mediaStatsMinConversationRFactor": 0, "originatingDirection": "", ... "participants": [ { "participantId": "", "participantName": "", "userId": "", "purpose": "", "externalContactId": "", "externalOrganizationId": "", "flaggedReason": "", "teamId": "", "sessions": [ { ... } ], "attributes": { "": "" } } ] } ] }
Regards,
Chase_Hamby | 2021-02-24 14:14:17 UTC | #6
Hey Jerome,
Thanks for the reply! I've shared the entire participant structure below and I'm not seeing an attributes section.
{ "conversationId": "fa74f56e-27de-4f5e-be63-549422f2e08f", "conversationStart": "2021-02-18T05:16:02.475Z", "conversationEnd": "2021-02-18T05:59:01.089Z", "originatingDirection": "inbound", "divisionIds": [ "f985995c-dbb9-44a6-8729-f15f421e7e15" ], "participants": [ { "participantId": "83f81bd0-f1fa-442c-8d00-1cb090dd757c", "participantName": "xxxx xxxx", "purpose": "customer", "sessions": [ { "mediaType": "chat", "sessionId": "d2b4d3fc-b2a4-463c-8848-118bb6c26c8b", "direction": "inbound", "segments": [ { "segmentStart": "2021-02-18T05:16:02.475Z", "segmentEnd": "2021-02-18T05:57:01.514Z", "queueId": "57d0489a-dd0c-4dcf-b4ec-a44fc948b907", "disconnectType": "peer", "segmentType": "interact", "conference": false } ], "metrics": [ { "name": "nConnected", "value": 1, "emitDate": "2021-02-18T05:16:02.475Z" } ], "provider": "PureCloud Webchat v2", "requestedRoutings": [ "Standard" ], "usedRouting": "Standard", "selectedAgentId": "8b65f4f0-bd26-4ff6-8eec-ffb93ea8931a" } ] }, { "participantId": "0a43fe19-78f4-4e55-8d5b-69ba02e21c26", "purpose": "workflow", "sessions": [ { "mediaType": "chat", "sessionId": "3cfde44e-2cca-4980-b791-c24256f97bec", "direction": "inbound", "peerId": "d2b4d3fc-b2a4-463c-8848-118bb6c26c8b", "segments": [ { "segmentStart": "2021-02-18T05:16:02.477Z", "segmentEnd": "2021-02-18T05:16:04.553Z", "disconnectType": "transfer", "segmentType": "interact", "conference": false } ], "metrics": [ { "name": "nFlow", "value": 1, "emitDate": "2021-02-18T05:16:02.477Z" }, { "name": "tFlow", "value": 2076, "emitDate": "2021-02-18T05:16:04.553Z" }, { "name": "tFlowExit", "value": 2076, "emitDate": "2021-02-18T05:16:04.553Z" } ], "flow": { "flowId": "84ebcf49-b594-4104-8f7f-ede77d37dd5a", "flowName": "Chat", "flowVersion": "69.0", "flowType": "INBOUNDCHAT", "exitReason": "TRANSFER", "entryReason": "PureCloud Webchat v2", "entryType": "direct", "transferType": "ACD", "transferTargetName": "Chat", "transferTargetAddress": "57d0489a-dd0c-4dcf-b4ec-a44fc948b907", "issuedCallback": false, "startingLanguage": "en-us", "endingLanguage": "en-us" }, "provider": "PureCloud Webchat v2", "remote": "xxxx xxxx" } ] }, { "participantId": "e179f13b-c5bb-49b9-a0de-895a539840b5", "participantName": "Chat", "purpose": "acd", "sessions": [ { "mediaType": "chat", "sessionId": "75c19cac-a277-4643-8ec3-ad7ab362aabc", "direction": "inbound", "peerId": "d2b4d3fc-b2a4-463c-8848-118bb6c26c8b", "segments": [ { "segmentStart": "2021-02-18T05:16:04.555Z", "segmentEnd": "2021-02-18T05:16:12.014Z", "queueId": "57d0489a-dd0c-4dcf-b4ec-a44fc948b907", "disconnectType": "transfer", "segmentType": "interact", "conference": false } ], "metrics": [ { "name": "nOffered", "value": 1, "emitDate": "2021-02-18T05:16:04.555Z" }, { "name": "tAcd", "value": 7459, "emitDate": "2021-02-18T05:16:12.014Z" } ], "provider": "PureCloud Webchat v2", "remote": "xxxx xxxx", "requestedRoutings": [ "Standard" ], "selectedAgentId": "8b65f4f0-bd26-4ff6-8eec-ffb93ea8931a" } ] }, { "participantId": "5d2624af-39c8-4fa9-b035-8a36e5cc2107", "participantName": "xxxx", "userId": "8b65f4f0-bd26-4ff6-8eec-ffb93ea8931a", "purpose": "agent", "sessions": [ { "mediaType": "chat", "sessionId": "19a0f78b-c346-4f71-b1c6-93b523ff76a9", "direction": "inbound", "peerId": "d2b4d3fc-b2a4-463c-8848-118bb6c26c8b", "segments": [ { "segmentStart": "2021-02-18T05:16:04.659Z", "segmentEnd": "2021-02-18T05:16:12.016Z", "queueId": "57d0489a-dd0c-4dcf-b4ec-a44fc948b907", "segmentType": "alert", "conference": false }, { "segmentStart": "2021-02-18T05:16:12.016Z", "segmentEnd": "2021-02-18T05:57:01.512Z", "queueId": "57d0489a-dd0c-4dcf-b4ec-a44fc948b907", "disconnectType": "client", "segmentType": "interact", "conference": false }, { "segmentStart": "2021-02-18T05:57:02.089Z", "segmentEnd": "2021-02-18T05:59:01.089Z", "queueId": "57d0489a-dd0c-4dcf-b4ec-a44fc948b907", "wrapUpCode": "7fb334b0-0e9e-11e4-9191-0800200c9a66", "disconnectType": "client", "segmentType": "wrapup", "conference": false } ], "metrics": [ { "name": "tAlert", "value": 7357, "emitDate": "2021-02-18T05:16:12.016Z" }, { "name": "tAnswered", "value": 7459, "emitDate": "2021-02-18T05:16:12.016Z" }, { "name": "tTalk", "value": 2449496, "emitDate": "2021-02-18T05:57:01.512Z" }, { "name": "tTalkComplete", "value": 2449496, "emitDate": "2021-02-18T05:57:01.512Z" }, { "name": "tAcw", "value": 119000, "emitDate": "2021-02-18T05:59:01.089Z" }, { "name": "tHandle", "value": 2568496, "emitDate": "2021-02-18T05:59:01.089Z" } ], "provider": "PureCloud Webchat v2", "remote": "xxxx xxxxx", "requestedRoutings": [ "Standard" ], "usedRouting": "Standard", "selectedAgentId": "8b65f4f0-bd26-4ff6-8eec-ffb93ea8931a" } ] } ] }
Jerome.Saint-Marc | 2021-02-24 16:47:21 UTC | #7
Hello,
I just did a test on my environment using the asynchronous query for conversation details, and it is working for me - retrieving participant attributes. To be clear, I am using the POST /api/v2/analytics/conversations/details/jobs to create the asynchronous job, And then GET /api/v2/analytics/conversations/details/jobs/{jobId} to get the status of the job. And finally, using GET /api/v2/analytics/conversations/details/jobs/{jobId}/results to fetch pages of results of the asynchronous query.
If this is already what you were using in your test, I would suggest to open a ticket/case with Genesys Care so they can investigate. We cannot investigate customer data & environment from the forum (we don't have access to customer environments).
Regards,
system | 2021-03-27 16:47:22 UTC | #8
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: 10019