APIs & Integrations

linkfuse
Contributor

Is there a way to search for objects that are *missing* an association?

We've tried searching associations.contact "NOT_HAS_PROPERTY", but it returns an error.

 

Are there any other ways to do this?

0 Upvotes
12 Replies 12
VPer
Participant

Is there a way to search for objects that are *missing* an association?

Hey,

I have a similar problem, Could you resolve it?

 

Thanks

0 Upvotes
linkfuse
Contributor

Is there a way to search for objects that are *missing* an association?

This is for tickets to contacts, specifically. Could that be the issue?

0 Upvotes
RMones
Contributor | Platinum Partner
Contributor | Platinum Partner

Is there a way to search for objects that are *missing* an association?

Hi @linkfuse and @dennisedson ,

 

with the current payload:

{
    "filters": [
        {
            "propertyName": "associations.contact",
            "operator": "NOT_HAS_PROPERTY"
        }
    ]
}

 

I've got also a 400 error.

{
"status": "error",
"message": "There was a problem with the request.",
"correlationId": "be038525-2741-4d36-8bef-ae151c4c820c"
}

 

You do also a POST request @dennisedson ?

Regards Ronald

dennisedson
Community Manager
Community Manager

Is there a way to search for objects that are *missing* an association?

@RMones 👀

This is a screenshot of my postman request (collapsed the results array)

Postman.png

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
RMones
Contributor | Platinum Partner
Contributor | Platinum Partner

Is there a way to search for objects that are *missing* an association?

Hi @dennisedson ,

 

Yes your example is working. But when change deals to tickets or a custom object ID, I've got a 400 http error..

 

Regards,

 

Ronald

dennisedson
Community Manager
Community Manager

Is there a way to search for objects that are *missing* an association?

Wow. So I somehow found the only one that works!  What are the odds....

I do not have a good answer for this.  I will do some research to see if this is working as designed.

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
linkfuse
Contributor

Is there a way to search for objects that are *missing* an association?

Hi! Were you able to determine if this is working as designed?

 

Thanks for your help!

0 Upvotes
dennisedson
Community Manager
Community Manager

Is there a way to search for objects that are *missing* an association?

Working on it!  Promise to drop the answer here when I find out!

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
linkfuse
Contributor

Is there a way to search for objects that are *missing* an association?

It does seem to make sense as trying to get to contacts or tickets through workflows / the UI doesn't work either (we tried to set a property if the association was missing).

 

Contacts have associated deals as criterion, and tickets have associated companies, but not contacts as criterion.

0 Upvotes
RMones
Contributor | Platinum Partner
Contributor | Platinum Partner

Is there a way to search for objects that are *missing* an association?

Awesome! Thx 🙂

linkfuse
Contributor

Is there a way to search for objects that are *missing* an association?

Hmm... ours was part of a filterGroup. That must be the difference - we were searching for another known property as well, but we probably don't need to get that granular.

 

We'll try it again without the group.

 

Thanks!

0 Upvotes
dennisedson
Community Manager
Community Manager

Is there a way to search for objects that are *missing* an association?

@linkfuse 

How are you structuring your body?

I sent this request and it seems to work:

{
    "filters": [
        {
            "propertyName": "associations.contact",
            "operator": "NOT_HAS_PROPERTY"
        }
    ]
}
Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes