APIs & Integrations

BPegenaute
Member

Association between companies contacts and deals

SOLVE
Hi,
Ee're creating a private app to exchange data from our database to HS and we're trying to create custom relations between companies and contacts.
 
I have studied the documentation on association labels, but it seems it does not serve my purpose. From our database, we're injecting data to a new property we created in HS called company_id which is the same for the company and all the employees (contacts) working there.
 
 
I can't figure out how to instruct HS to look for that data point and use it to relate contacts to companies (and later on, to deals), is that something possible?
 
Thanks 
0 Upvotes
1 Accepted solution
weiliang_lee
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Association between companies contacts and deals

SOLVE

Hi @Jaycee_Lewis thanks for the tag, definitely can chime in on this.

 

@BPegenaute could you help me understand this a little more:

I'm assuming your system has means to push data into HS whenever you catch a chang. You have already created this custom property in your Contact and Company objects (called "company_id"), and successfully update them whenever you catch a change in your database.

 

And your missing piece is, how to associate them right? Aside from what Jaycee provided (which is the association bit), I'm guessing that you want to do a search of contacts by that company_id right? If so, you can use this endpoint - https://developers.hubspot.com/docs/api/crm/search

 

From here you can do a filter of the property name, and then do a batch association to it.

 

Is this what you're looking for?

 

Cheers

WL

 

View solution in original post

3 Replies 3
weiliang_lee
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Association between companies contacts and deals

SOLVE

Hi @Jaycee_Lewis thanks for the tag, definitely can chime in on this.

 

@BPegenaute could you help me understand this a little more:

I'm assuming your system has means to push data into HS whenever you catch a chang. You have already created this custom property in your Contact and Company objects (called "company_id"), and successfully update them whenever you catch a change in your database.

 

And your missing piece is, how to associate them right? Aside from what Jaycee provided (which is the association bit), I'm guessing that you want to do a search of contacts by that company_id right? If so, you can use this endpoint - https://developers.hubspot.com/docs/api/crm/search

 

From here you can do a filter of the property name, and then do a batch association to it.

 

Is this what you're looking for?

 

Cheers

WL

 

Jaycee_Lewis
Community Manager
Community Manager

Association between companies contacts and deals

SOLVE

Hi, @BPegenaute 👋 Thanks for reaching out! To confirm, you are not missing a documented option. 

Hey, @ChrisoKlepke @weiliang_lee, do you have any thoughts on workarounds or other ways @BPegenaute might think about this project?

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

BPegenaute
Member

Association between companies contacts and deals

SOLVE

Hi there

 

Thanks for your answer

 

We found a way around by injecting HS's tracking code into our SPA, but now we're facing a different issue as all forms are reconverting data from the original contact created and associated to the record.

 

Thanks tho