Solved

Copper API Activities vs Interaction Count

  • 29 August 2022
  • 4 replies
  • 51 views

Good evening.

 

I am doing some work with the Copper API, trying to extract data to allow us to show the interactions related to each Person and Opportunity over time. This is the data that is accessed via the Activities endpoint.

 

The main problem I am having is that when I query “all activities related to a person” the number of items returned is a lot lower than the number of interactions reported against that person in Copper.

 

Has somebody come across this before? I am wondering whether it is a permissions issue and the interactions (mainly emails) are not being reported correctly.

 

Thanks!

 

Andrew

 

 

 

icon

Best answer by AndrewU 5 September 2022, 09:30

View original

4 replies

Userlevel 5
Badge +3

Hey Andrew!

I’m pretty sure that emails are actually not counted in this query.

My guess is that emails are stored a bit differently in their database.

Could be wrong, but pretty sure I’ve seen this come up before.

Alex, thanks.

 

I will do some more digging and see what I can find. It would be a pity if the data cant be extracted since it would be good to be able to produce a dashboard showing for each client the different interactions by activity type….

 

Will report if I find anything else

 

Andrew

Quick followup.

 

When using POSTMAN, when I run the Activities Search ({{base_url}}/activities/search) without any activity search filter it returns 24994 as the X-PW-TOTAL value.

However, when I filter by a specific activity type (system, 6) it brings back 315515 records. 

So it looks like the API cannot cope with the full activities data request and we may need to download in subgroups. 

 

Andrew

Just to close out this query and hopefully help somebody else at a later stage.

 

When querying the Activities endpoint the number of records that is returned if no filter is applied must be limited in some way, since in my case it does not go beyond 24994. When a filter is applied (by activity type) it allows me to bring back all the details.

 

So I was able to bring back all email interactions (300,000+) via the API and we now have a match with the interaction count that is held against each company and opportunity.

 

Another thing to note for anybody doing the “paging” in the way suggested by Copper…. The recommended way is to request 200 records and if 200 records are returned assume their is “more to come” and request the next page.

 

However, there are times when 200 records are requested and it only returnes 199 but there are more records to come… I am not sure why this happens and it is not consistent. The better way to check is to check after each request and if the number of items returned is 0 then we can assume the final page has been reached.

Reply