APIs & Integrations

aidanh
Participant

Deleting associations between a meeting and the contacts primary company

Résolue

In some scenarios a meeting may be scheduled by an existing contact but in the context of another company that is not their primary company.

 

Firstly, because the contact is going the schedule a meeting via the meeting scheduler tool, it will control the associations automatically, I have no control over that, and as a result the default associations will be between the meetings <> contact and meeting <> company (contacts primary company).

 

The goal of this post is that if a meeting is scheduled by a contact (via the meeting scheduler tool), what is the best way (via API) I can update that meeting with the correct associations. 

 

Currently it looks like I need to:

1. GET /crm/v4/objects/meetings/{meetingId} - in order to get the assocaitions

2. PUT/crm/v4/objects/meetings/{meetingId}/associations/default/company/{companyId} - with the correct company the user is associated to

3. DELETE/crm/v4/objects/meetings/{meetingId}/associations/company/{companyId} - remove the association to the contact's primary company

 

is there a better way to do this?

1 Solution acceptée
zach_threadint
Solution
Contributeur de premier rang

Deleting associations between a meeting and the contacts primary company

Résolue

Hi @aidanh 👋

 

Thanks for describing your use case so clearly. I think you're bang on the money there. I don't see a more efficient solution, but I could be wrong 🤞

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


Voir la solution dans l'envoi d'origine

4 Réponses
zach_threadint
Solution
Contributeur de premier rang

Deleting associations between a meeting and the contacts primary company

Résolue

Hi @aidanh 👋

 

Thanks for describing your use case so clearly. I think you're bang on the money there. I don't see a more efficient solution, but I could be wrong 🤞

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


aidanh
Participant

Deleting associations between a meeting and the contacts primary company

Résolue

Thanks for the quick response.

 

You can't update associations using the PATCH /crm/v4/objects/meetings/{meetingId} endpoint can you? It would be great if you could disable the automatic association between contact.primary_company and meeting but it doesn't appear so. That would have at least meant only needing to make 2 api calls to instead of 3

0 Votes
zach_threadint
Contributeur de premier rang

Deleting associations between a meeting and the contacts primary company

Résolue

@aidanh Doesn't look like it's possible to update associations (I checked both V4 and V3 documentation). It's either create, read, delete. Unfortunately, I don't think you'll get away with fewer than 3 calls in this case.

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


aidanh
Participant

Deleting associations between a meeting and the contacts primary company

Résolue

Sorry I meant like on the PATCH meetings endpoint. I know when a meeting is created (POST) you can add associations at that time, though because this meeting is being created by the scheduler tool we don't have access. But looking at API docs associations are not possible in the PATCH Meetings endpoint