matthew | 2017-07-10 23:57:24 UTC | #1
Hi I'm trying to use
/api/v2/conversations
but getting zero results. can you confirm the permission requirements for this call? The documentation in https://developer.mypurecloud.com/api/rest/v2/conversations/index.html doesn't seem to list any permissions for this request, so i suspect i'm missing something.
can you clarify?
thanks!
matthew
anon39326996 | 2017-07-11 00:27:44 UTC | #2
I'd try conversation:communication:view, without looking at the code itself. We can fix the documentation, if not up to date.
anon28066628 | 2017-07-11 16:21:50 UTC | #3
If you're not getting a 403 error then you should have the proper permission. Please note that /v2/conversations only returns active conversations for the current user and requires a user context. Zero results is often (even usually for some users) a valid response.
matthew | 2017-07-11 22:45:30 UTC | #4
OK thanks for the update - This is where we are going wrong. I thought it would display all active conversations for all users, not just the current one.
The reason I tried to use /api/v2/conversations was because we require the attributes for the participants, which doesn't seem available on the /api/v2/analytics/conversations/details/query
Any idea on how I can proceed? I need the attributes for the participants in current calls so we can report on it.
Thanks!
Jeroen | 2017-07-12 10:38:22 UTC | #5
I had the same issue, unfortunately you need to request the attribute data for each conversation with /api/v2/conversations. Participant Attributes Analytics.
Smith_Rj, gave another option to add data:
anon28066628, post:3, topic:1306
one approach you can use is adding analytics data to conversation segments with this endpoint:
POST /api/v2/analytics/conversations/{conversationId}/details/properties
These segment properties are contained in analytics and can be used for filtering. There aren't any features in PureCloud (as far as I know) that will add these from Architect or Scripter though. An example approach to using these is downloading records from the Conversations API at the end of each day and re-tagging the data as these segment properties. You'd still need to download each conversation at least once to re-tag the data.
anon28066628 | 2017-07-12 12:47:58 UTC | #6
Thanks Jeroen!
@matthew, the general approach is using the Conversation Details Query to get a list of the conversations you need, and download each from /conversations/{conversationId} (please check actual endpoint) one-at-a-time since participant data isn't included in the analytics store. There is a POC project in Python on this page - see "PureCloud Conversation Participant Data CSV Exporter".
Limitations of this approach are capacity - you can only download 300 conversations per minute max from /conversations service; in practice, fewer. They're also only retained there for ~90 days.
If you need permanent and more performant data, the approach to nightly download conversations and re-tag the participant data as segment properties (see Jeroen's comment) is more robust. You could also have a Bridge action that fires a re-tag request from a call flow or script, so it happens more real-time than nightly batch if your call volume is high.
The the data as segment properties you can also filter and use the Aggregate query, which opens up a lot of possibilities.
matthew | 2017-07-12 13:33:17 UTC | #7
Thanks for the info guys, I will give this a go. Do you know are there any plans to automatically include the attributes within the analytics module in future?
tim.smith | 2017-07-12 13:36:07 UTC | #8
I believe an enhancement has been submitted for that, but I don't believe it's been prioritized.
system | 2017-08-12 13:36:36 UTC | #9
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: 1526