htruong | 2019-08-28 14:42:19 UTC | #1
Has anyone been able to user the conversation details query to get a list of conversations based on segment end time? Note that this is different than interval which my understanding is a 7 day window that restricts the conversation start time. I'm looking for an equivalent based on segment end times.
anon28066628 | 2019-08-28 21:51:42 UTC | #2
which my understanding is a 7 day window that restricts the conversation start time.
The query interval will get all conversations that have any segment start or end time within the interval. For example, you might find:
- 100 conversations from 1:00 - 2:00
- 100 conversations from 2:00 - 3:00
- 180 conversations from 1:00 - 3:00 (combined interval)
There are conversations that will overlap and be present in both contiguous intervals. You need client-side logic to filter by start or end time exclusively.
htruong | 2019-08-29 00:14:15 UTC | #3
Hmm. In the API Explorer it says that conversations that started before the earliest interval are not searched.
ConversationQuery
interval ( string, optional ): Specifies the date and time range of data being queried. Results will include conversations that both started on a day touched by the interval AND either started, ended, or any activity during the interval. Conversations that started before the earliest day of the interval will not be searched. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss
anon28066628 | 2019-08-29 13:26:55 UTC | #4
Thanks, I wasn't aware of that. For intervals shorter than a day, you will still see the potential "overlap"1 as described for adjacent intervals ("Results will include conversations that both started on a day touched by the interval AND either started, ended, or any activity during the interval.").
Regardless, any filtering behavior you need that is different from the API's behavior needs to be done client-side.
htruong | 2019-08-29 15:34:21 UTC | #5
Gotcha. So does this mean if I search for conversations with the details query, that it would exclude conversations started outside of the interval?
Is there a way to search based on segmentEnd time within a specific range?
The specific use case is that I want to make sure searching for conversations (primarily emails) worked over the past hour, that it doesn't exclude emails that came in 3 weeks ago and for whatever reason wasn't worked till now.
anon28066628 | 2019-08-29 15:57:39 UTC | #6
Gotcha. So does this mean if I search for conversations with the details query, that it would exclude conversations started outside of the interval?
Based on reading above, they're only excluded if they started before the earliest day that the interval is present in. That could be rare depending on your interval, or common if your intervals always start at 00:00:00:000 and are 1-day in length (for example).
Is there a way to search based on segmentEnd time within a specific range?
No.
The specific use case is that I want to make sure searching for conversations (primarily emails) worked over the past hour, that it doesn't exclude emails that came in 3 weeks ago and for whatever reason wasn't worked till now.
For emails, you may want to use a longer interval based on the "earliest day" exclusion rule above. Email conversations can persist for 30 days, so the full 32 day interval limit may be used.
system | 2019-09-29 15:57:40 UTC | #7
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: 5895