APIs & Integrations

RIvanov
Participant

Get contacts/companies that don't have deals

SOLVE

Hey All,

 

Is there a way to get all contacts/companies that don't have deals?

 

Thanks in advance!

0 Upvotes
1 Accepted solution
JBeatty
Solution
Guide | Diamond Partner
Guide | Diamond Partner

Get contacts/companies that don't have deals

SOLVE

Hi @RIvanov,

 

You can use the search api as follows: 

URL: 

https://api.hubapi.com/crm/v3/objects/company/search?hapikey=************************

Method: POST

Body:

{
    "filters":[
          {
            "propertyName": "num_associated_deals",
            "operator": "NOT_HAS_PROPERTY"
          }
        ]
      }
  }

This will work for both contact and companies.

✔️ Was I able to help answer your question? Help the community by marking it as a solution.

Joshua Beatty
Software Developer with Pearagon

Still have questions? Let's Talk

View solution in original post

4 Replies 4
JBeatty
Solution
Guide | Diamond Partner
Guide | Diamond Partner

Get contacts/companies that don't have deals

SOLVE

Hi @RIvanov,

 

You can use the search api as follows: 

URL: 

https://api.hubapi.com/crm/v3/objects/company/search?hapikey=************************

Method: POST

Body:

{
    "filters":[
          {
            "propertyName": "num_associated_deals",
            "operator": "NOT_HAS_PROPERTY"
          }
        ]
      }
  }

This will work for both contact and companies.

✔️ Was I able to help answer your question? Help the community by marking it as a solution.

Joshua Beatty
Software Developer with Pearagon

Still have questions? Let's Talk

RIvanov
Participant

Get contacts/companies that don't have deals

SOLVE

Hey Joshua Beatty,

 

Thanks, that's exactly what I needed.

RMones
Contributor | Platinum Partner
Contributor | Platinum Partner

Get contacts/companies that don't have deals

SOLVE

Hi @RIvanov ,

 

When i'm right you cannot filter on associated records. But maybe can the following workaround help you out:

 

Make a Workflow on a Deal that start when the Deal Name is known (or another property)

and then update a property all the contacts that are associated to this Deal.

 

Afther that you can filter on that property in the Contacts Filter Api.

 

Regards, Ronald

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Get contacts/companies that don't have deals

SOLVE

@Kevin-C , @JBeatty ,

Either of you have an idea on how to go about this?

0 Upvotes