CRM

KCHAKROUN
Membre

Does the Deals/batch/upsert support associations

I have a list of deals that I want to insert into Hubspot. Each of the deals has a contact and a company associated to it. And due to the fact that over 4000 deal, the better way would be to use the /batch/upsert request. The deals are inserted correctly but not the associations. I have tried inserting them seperately to make sure of the ids  and the values and it worked perfectly.

 

So the questions is does the /deals/batch/upsert support associations or no? and if yes how should i implement it ?

3 Réponses
karstenkoehler
Au panthéon de la communauté | Partenaire solutions
Au panthéon de la communauté | Partenaire solutions

Does the Deals/batch/upsert support associations

Hi @KCHAKROUN,

 

Just to clarify, are the deals are in HubSpot and already associated to a contact and a company – and now you're trying to update them?

 

If so, then importing while mapping the record ID will update the existing records and should not create any duplicate orphans.

 

During the import process, make sure to select that you would like to update only deals. In the mapping step, make sure that the Record ID is mapped to the corresponding column in your import file.

 

Best regards!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

0 Votes
KCHAKROUN
Membre

Does the Deals/batch/upsert support associations

Helllo @karstenkoehler,

 

the deals are in a csv file and for each deal i have the hubspot id associated to the contact associated to the deal.
I would like to update/create the deals using python as this will be done daily , so i would be prefer for it to be done by code as it can be easily programmed to be done daily.

to explain it more this is my code:

deal = {
"idProperty":"id",
"id": row["proposal_id"],
"properties": {
"dealname": row["proposal_name"],
"gescom_link": row["proposal_id"],
"offre": row["service"],
"sous_offre": row["sub_service"],
 
},"associations": [
{
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 3
}
],
"to": {
"id": "18659459750"
}
}
],
}
deals.append(deal)

I have tried adding the association this way yet it doesn't work,
it insert the deals without the associations. What should i do
exactly to make sure they are inserted?
0 Votes
SAMsan
Contributeur

Does the Deals/batch/upsert support associations

Hi,

 

Did you find a way to make this happen? I use the batch upsert endpoint for custom objects (`/crm/v3/objects/2-33751379/batch/upsert`) but contact association is not working

0 Votes