# custom object association with deal

**URL:** <https://community.hubspot.com/t/custom-object-association-with-deal/80379>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [May 2, 2023, 11:31am UTC](https://community.hubspot.com/t/custom-object-association-with-deal/80379 "2023-05-02T11:31:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![msharma125](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@msharma125](https://community.hubspot.com/u/msharma125)\
**Post date:** [May 2, 2023, 11:31am UTC](https://community.hubspot.com/t/custom-object-association-with-deal/80379/1 "2023-05-02T11:31:58Z")

</div>

let associated = {

“fromObjectId”: response.data.id,

“toObjectId”: dealId,

“category”: “HUBSPOT\_DEFINED”,

“definitionId”: 12

}  
I am trying to associate the custom object with a deal using a custom object id and deal id. can someone please me in this

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 3, 2023, 8:38pm UTC](https://community.hubspot.com/t/custom-object-association-with-deal/80379/2 "2023-05-03T20:38:30Z")

</div>

Hi, @msharma125 👋 Did you get this worked out? If not, a great first step is to use this endpoint GET /crm/v4/associations/{fromObjectType}/{toObjectType}/labels to get the correct typeId for that specific association. Make sure you use the same “order” as you are using in your request, meaning Custom Object \> Deal is a different typeId than Deal \> Custom object.

Once we know that info, we can use the endpoint example here to Create an Association — [Associations v4](https://developers.hubspot.com/docs/api/crm/associations).

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![DStaat](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dstaat/32/3537_2.png) [@DStaat](https://community.hubspot.com/u/DStaat)\
**Post date:** [June 12, 2023, 2:50pm UTC](https://community.hubspot.com/t/custom-object-association-with-deal/80379/3 "2023-06-12T14:50:08Z")

</div>

Hey msharma125! We have an app called Associ8 that would run this process for you. No code required! It allows you to associate objects together based on like properties (deal id and custom object id in your case). Check it out [here](https://ecosystem.hubspot.com/marketplace/apps/productivity/workflow-automation/associations-app-272901).  
If you need help installing or getting set up, let me know! I’d be happy to hop on a call with you.  
Best,  
-David Staat
