ConcordAbush | 2021-01-08 18:28:40 UTC | #1
We are currently grabbing all conversations for each campaign that we run a day. With this we are trying to limit the number of queries we run for each campaign. We have some campaigns that could potentially have 65000 calls a day on them. From what my investigation has shown the max conversations Per Page using analyticsApi.PostAnalyticsConversationsDetailsQuery(body) is 100 records. Is this correct or can it return more than that?
I am trying to make sure we are not hammering the system with calls for data and possibly getting near thresholds for usage.
tim.smith | 2021-01-08 18:40:54 UTC | #2
Your use case sounds much better suited to analytics jobs. You can read more about them, including a comparison of jobs vs queries, here: https://developer.mypurecloud.com/api/rest/v2/analytics/conversation_details_job.html
ConcordAbush | 2021-01-08 19:37:27 UTC | #3
Thank you for pointing me to this. We are currently investigating this as a possible solution. Do you know if I was correct that a query can only return 100 results per page? I just wanted to make sure I had the right data for that.
tim.smith | 2021-01-08 20:16:33 UTC | #4
Yes, the max is 100.
ConcordAbush | 2021-01-08 20:28:35 UTC | #5
After reading through the link you posted this is EXACTLY what we were looking for. Thank you for pointing us in this direction.
ConcordAbush | 2021-01-12 18:54:34 UTC | #6
I was able to get the solution up and running with jobs but had a question. Do you know how long it takes on average for a job to complete? I noticed when running 54 jobs it takes about 8 minutes to complete when 80% of those jobs have 0 records returned. Does the number of records that will be returned impact the time it takes for a report to complete?
ConcordAbush | 2021-01-22 19:00:06 UTC | #7
Tim, I have the jobs running just fine but I have noticed an issue I can not pull data from the current day. Do Jobs not allow you to pull data from a current day? Example of the issue below.
Using a single campaign I made calls yesterday and then ran a job that encompassed the 24hour period of yesterday several times throughout the afternoon to attempt to pull the data back. Nothing was returned.
This morning i made more calls on the same campaign and attempted to pull all records for today. Again nothing was returned.
I extended the search interval to include the previous day and I was able to finally see the historic data from yesterday but nothing from today.
Is there some sort of limit to jobs that state they can not return current data? We have to many conversations to be using a queury to pull the data as it would more than likely make us hit the rate limit.
tim.smith | 2021-01-22 19:04:02 UTC | #8
I can not pull data from the current day
See the section on Data Availability: https://developer.mypurecloud.com/api/rest/v2/analytics/conversation_details_job.html#data_availability
ConcordAbush | 2021-01-22 19:41:14 UTC | #9
Is there a way to pull data from the same day in bulk that is not a query that you are aware of? We have worries of hitting rate limits if we need to use a query to pull mass data each day. Are you aware of what the rate limit is for calls before getting cut off or throttled? We can not use historical data as the contacts associated with conversations are no longer available since we clear lists and reupload them nightly with new contacts.
anon50844791 | 2021-01-22 19:51:31 UTC | #10
Unfortunately, there is no way to pull data from the same day in bulk. Your best bet, for now, is to do multiple queries throughout the day with a reasonable cadence to not get throttled. The rate limits are subject to change in case we find certain access patterns abusive enough to threaten the stability of the platform.
ConcordAbush | 2021-01-22 20:00:24 UTC | #11
Would you be able to recommend a throttle pattern that you have seen to be successful. We want do not want to be throttled and have to make production changes to get all the data or lose data that is required for our business.
tim.smith | 2021-01-25 18:50:38 UTC | #12
ConcordAbush, post:11, topic:9651
Would you be able to recommend a throttle pattern that you have seen to be successful.
Rate limiting and best practices for well-behaved applications are documented here: https://developer.mypurecloud.com/api/rest/rate_limits.html. The short answer is that your app can go as fast as it desires until it's rate limited, then it needs to stop making requests for the specified amount of time. The page also documents recommended exponential backoff practices.
system | 2021-02-25 18:50:42 UTC | #13
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: 9651