Get companies property count for second level (industry => accounting)

companies
forms
contacts

#1

Hello there
we are trying to get property’s of companies => industry => accounting (count of the accounting related companies) so i can display that data
https://www.screencast.com/t/XIEziVJm so i have checked all the API but it will not full fill my requirement i need two levels data for companies and contacts with count like this https://www.screencast.com/t/y9e2OOgrDvTg


#2

Hi @suraj,

It’s not currently possible to pull specific companies based on their properties (i.e. pull all companies with industry set to accounting). You could pull all your companies, request the industry property, and do some filtering on your own end.

Or, you could try a workaround using lists: Create a list of contacts whose associate company has an industry of accounting. Then pull all the contacts from that list, and find out how many unique companyIds there are. That will give you the total number of accounting companies (assuming all accounting companies have at least one associated contact).

Other than these two workarounds, the only way to create these views is in the HubSpot tool by creating a view of company records.


#3

Thanks for the reply @Derek_Gervais