lehelg | 2017-03-31 10:47:32 UTC | #1
I am querying against api/v2/analytics/conversations/details/query.
I have an interaction with the following start and end time:
"startTime": "2017-03-29T13:45:58.531Z", "endTime": "2017-03-29T14:20:17.726Z",
According to the documentation, here is the definition of "Interval":
interval (string, optional): Specifies the date and time range of data being queried. Conversations MUST have started within this time range to potentially be included within the result set. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss
However, when I run the query with the following parameters:
{ "interval": "2017-03-29T14:00:00.000Z/2017-03-29T14:30:00.000Z", "order": "asc", "orderBy": "conversationStart", "paging": { "pageSize": 100, "pageNumber": 1 } }
the conversation referenced above will be included in the results. The start time does not fall within the range, but a portion of the conversation does. Could you please clarify?
--Lehel
tim.smith | 2017-03-31 15:05:58 UTC | #2
That description is a little misleading. It does not mean to say that the start time of the conversation must fall within the range of the interval. What it's getting at is that if your conversation hasn't started before the end of the interval, the conversation won't ever be returned in that result set. A better description might be:
Specifies the date and time range of data being queried. Conversations will only be included if some part of the conversation exists within the interval
lehelg | 2017-03-31 15:24:51 UTC | #3
Thanks Tim, that answers the question.
A follow-up question. With CIC, the records were only inserted in the database once it was "settled". With PureCloud, the approach seems to be different. You are trying to provide the freshest data possible. This means that the call aggregate query is returning live calls.
Can there be a flag provided once the data is "settled" and won't change anymore? I could go based off the end Time, but this still leaves open the possibility of a wrap-up code being updated later (or some other scenario that I am not even thinking of right now). I believe you're using MongoDB for the database, could you expose the document last modified time?
--Lehel
tim.smith | 2017-03-31 16:44:43 UTC | #4
With PureCloud, the approach seems to be different. You are trying to provide the freshest data possible.
Correct. PureCloud uses a DaaS (Data as a Service) approach. Generally speaking, you know what we know as soon as we know it.
Can there be a flag provided once the data is "settled" and won't change anymore?
Short answer: No.
The data always has the potential to change. For example, if there's a bug where conversationEnd is miscalculated under a certain circumstance, all of the conversations affected by the bug will be changed when the bug is fixed. Without getting too deep into the bowels of PureCloud, there's a nightly process that recalculates data to address these kinds of issues.
As far as how to determine when a conversation can reasonably be considered "settled", that will be determined by your operations. If users may take hours to apply wrap up codes, for example, you should probably wait at least several hours after the conversation end time until you consider the conversation "probably complete". Once you determine when you should be safe from users modifying conversations, that can reasonably be your baseline for deeming a conversation complete.
system | 2017-08-28 19:33:32 UTC | #5
This post was migrated from the old Developer Forum.
ref: 1131