APIs & Integrations

TestingTime
Teilnehmer/-in

Deal does not get associated with contact (API) - no error message

lösung

We have api calls in place to associate deals with contact and sometimes the contact does not get associated with the deal and we don't get any error message:
Steps:

  • we create the deal (post)
  • we upsert the contact & get the vid (based on its email address)
  • we update the deal with the contact vid
    eg. response:{"portalId":4840334,"dealId":421649386,"isDeleted":false,"associations":
    {"associatedVids":[39803]

You find the vid but the contact did not get associated via the API. https://app.hubspot.com/contacts/4840334/deal/421649386/?interaction=note
and we did not get any error message about it.
could you help us with this? we want to make sure every deal get correctly associated to a contact.

0 Upvotes
1 Akzeptierte Lösung
IsaacTakushi
Lösung
HubSpot Employee
HubSpot Employee

Deal does not get associated with contact (API) - no error message

lösung

Hey, @Cosima_Lefranc.

Per my recommendations in your other recent topic:

You can create a contact and get the vid in one call (using either this endpoint or this endpoint) and then create a deal and associate it with that contact vid in one call. You only need two calls instead of three.

This issue may be difficult to replicate.

Is it possible you may not be accounting for contacts already associated with the deal? I see that the deal you linked already has a contact associated and has gone through association changes, as shown in the num_associated_contacts field.

Similarly, the contact you linked has had multiple deal association changes as well, as shown in the num_associated_deals contact history.

I would recommend trying to implement the flow I describe above — create a contact then create the deal — as I believe you may also have encountered some timing issues by splitting up the two deal calls.

Isaac Takushi

Associate Certification Manager

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
2 Antworten
TestingTime
Teilnehmer/-in

Deal does not get associated with contact (API) - no error message

lösung

Thanks Isaac for your answer, I will look into it.

0 Upvotes
IsaacTakushi
Lösung
HubSpot Employee
HubSpot Employee

Deal does not get associated with contact (API) - no error message

lösung

Hey, @Cosima_Lefranc.

Per my recommendations in your other recent topic:

You can create a contact and get the vid in one call (using either this endpoint or this endpoint) and then create a deal and associate it with that contact vid in one call. You only need two calls instead of three.

This issue may be difficult to replicate.

Is it possible you may not be accounting for contacts already associated with the deal? I see that the deal you linked already has a contact associated and has gone through association changes, as shown in the num_associated_contacts field.

Similarly, the contact you linked has had multiple deal association changes as well, as shown in the num_associated_deals contact history.

I would recommend trying to implement the flow I describe above — create a contact then create the deal — as I believe you may also have encountered some timing issues by splitting up the two deal calls.

Isaac Takushi

Associate Certification Manager
0 Upvotes