APIs & Integrations

karien
Participant

association ticket to custom object record not automatically created via form submission

can someone please assist me to know how a can make a ticket record automatically associated with a custom object via form submission, its works for custom to custom just fine, thank you

do i simply create the association via API --> https://developers.hubspot.com/docs/api/crm/crm-custom-objects#:~:text=line%20text%20input.-,Associa...  --> under the Object TAB --> Associate an object with another object and then all records will be associated automatically via the form submission. 

OR

do i need custom code action to create an association between the records everytime the form is submitted.  that is... within ticket workflow, get a recordID where one ticket property matches a custom object property, get the ID, then associate the records. see below

https://developers.hubspot.com/docs/api/crm/tickets#endpoint?spec=PUT-/crm/v3/objects/tickets/{ticke...}

 

if i do 

PUT…/crm/v3/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}/{associationType}
 
will the results be auto association of records for these 2 objects? (for example via form submission) OR are these values referring to the record's objectID's"
am i associated records? or Objects? with this PUT request?
 

ok so to answer what i found myself, please help me if im not on the right track....

 

PUT…/crm/v3/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}/{associationType}

 

actually refers to the records, not the objects, its very confusing that the word object gets used for records also. it think its better to say "object record" when referring to an instance of an OBJECT. 

 

that is does {objectId} refer to the record details?

 

at this poin in time it looks like i need to do

PUT…/crm/v3/objects/tickets/{ticketId}/associations/{toObjectType}/{toObjectId}/{associationType}
 
would be much clearer if 'toObjectId' was named/labeled 'toObjectRecordId'
 
please if someone can just confirm im on the right track here, thx
 
 
0 Upvotes
2 Replies 2
karien
Participant

association ticket to custom object record not automatically created via form submission

 

ok so i was on the right track, its working. 

PUT…/crm/v3/objects/tickets/{ticketId}/associations/{toObjectType}/{toObjectId}/{associationType}

Jaycee_Lewis
Community Manager
Community Manager

association ticket to custom object record not automatically created via form submission

Hi, @karien 👋 Let's see if we can get the conversation going for you — @LMeert @tjoyce @FabianRichter do you have any insights or thoughts on next steps on how @karien can accomplish their goal?

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes