# Custom object to custom object association

**URL:** <https://community.hubspot.com/t/custom-object-to-custom-object-association/53943>\
**Category:** CMS Development\
**Created:** [March 28, 2022, 4:55pm UTC](https://community.hubspot.com/t/custom-object-to-custom-object-association/53943 "2022-03-28T16:55:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ETaylor75](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/etaylor75/32/78108_2.png) [@ETaylor75](https://community.hubspot.com/u/ETaylor75)\
**Post date:** [March 28, 2022, 4:55pm UTC](https://community.hubspot.com/t/custom-object-to-custom-object-association/53943/1 "2022-03-28T16:55:12Z")

</div>

I am trying to create a custom object that associates to another custom object but keep getting the following message:

{  
“status”: “error”,  
“message”: “Invalid input JSON: Unable to infer object type from: SALES\_AGGREGATOR\_REP”,  
“correlationId”: “2110c4e5-a614-4a08-96d9-c7d1d467436d”  
}

I was able to create the object in the sandbox without an issues but now I am trying to do the same in production.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 29, 2022, 1:21pm UTC](https://community.hubspot.com/t/custom-object-to-custom-object-association/53943/2 "2022-03-29T13:21:45Z")

</div>

@ETaylor75

Mind posting the json that you are using?

Might also be worth replacing that name with the Custom Object type ID which can be found in the URL while in your portal and you are looking at the custom object

---

<div class="post-metadata">

**Author:** ![ETaylor75](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/etaylor75/32/78108_2.png) [@ETaylor75](https://community.hubspot.com/u/ETaylor75)\
**Post date:** [March 29, 2022, 2:57pm UTC](https://community.hubspot.com/t/custom-object-to-custom-object-association/53943/3 "2022-03-29T14:57:13Z")

</div>

curl --request POST \  
--url ‘[https://api.hubapi.com/crm/v3/schemas?hapikey=xxx](https://api.hubapi.com/crm/v3/schemas?hapikey=xxx)’ \  
--header ‘content-type: application/json’ \  
--data ‘{  
“labels”: {  
“singular”: “Sales Aggregator”,  
“plural”: “Sales Aggregators”  
},  
“requiredProperties”: [  
“los\_aggregator\_id”  
],  
“searchableProperties”: [  
“los\_aggregator\_id”  
],  
“secondaryDisplayProperties”: [  
“los\_aggregator\_id”  
],  
“properties”: [  
{  
“name”: “los\_aggregator\_id”,  
“label”: “LOS Aggregator ID”,  
“isPrimaryDisplayLabel”: true,  
“type”: “number”,  
“fieldType”: “number”  
},  
{  
“name”: “aggregator\_name”,  
“label”: “Aggregator Name”,  
“type”: “string”,  
“fieldType”: “text”  
}  
],  
“associatedObjects”: [  
“SalesAggregatorRep”  
],  
“name”: “Sales\_Aggregator”,  
“primaryDisplayProperty”: “los\_aggregator\_id”,  
“metaType”: “PORTAL\_SPECIFIC”  
}’

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [April 1, 2022, 8:27pm UTC](https://community.hubspot.com/t/custom-object-to-custom-object-association/53943/4 "2022-04-01T20:27:08Z")

</div>

I would try replacing **SalesAggregatorRep** with the fully qualified name or with the custom object’s id

---

<div class="post-metadata">

**Author:** ![VTorresRamos4](https://avatars.discourse-cdn.com/v4/letter/v/e99b99/32.png) [@VTorresRamos4](https://community.hubspot.com/u/VTorresRamos4)\
**Post date:** [June 2, 2023, 12:14pm UTC](https://community.hubspot.com/t/custom-object-to-custom-object-association/53943/5 "2023-06-02T12:14:36Z")

</div>

Hello, does this work for me?

My custom objects is: “Group”

I already have this associations:

Tickets --- Contacts

Contacts---Group (custom object)

I need:

Tickets --- Contacts---Group (custom object)

What happens:

In my conversation workflow, a ticket is created with the corresponding contact association. This contact has the objects “Company” and “Group” already associated on it.

The problem is that this created ticket is not associated with the custom object “Group”.

What i’d like to have:

I’m not a developer, but what i need is a code or something that associates this ticket with my custom object “Group” (the “Group” is associated in my contact).

Can you help me to solve this problem, please?

---

<div class="post-metadata">

**Author:** ![ETaylor75](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/etaylor75/32/78108_2.png) [@ETaylor75](https://community.hubspot.com/u/ETaylor75)\
**Post date:** [April 6, 2022, 3:50pm UTC](https://community.hubspot.com/t/custom-object-to-custom-object-association/53943/6 "2022-04-06T15:50:39Z")

</div>

The solution we found works is as follows:  
1. In the “Create Association” section add an association to an existing Custom Object (I.e., Company).  
2. Add the association to the Custom Object you want. There will now be two associations.  
3. Go to Custom Objects → select your object → Customize the form (bottom of the page) → you’ll see associations on the left-side. When you select them, they will appear at the bottom of the form. Unselect the association you want to hide (created in step 1 above).
