APIs & Integrations

Not applicable

Hubspot set deal hubspot_owner_id

Hello everyone !
In my company we integrated Hubspot with Salesforce. The schema is pretty simple, when a Hubspot contact is changed to meeting scheduled, a contact, an opportunity and an account are created in Salesforce. Meanwhile the Salesforce opportunity create/sync a Hubspot Deal.

We want the contact hubspot_owner_id to be sent to the deal hubspot_owner_id.

Using Salesforce we sent the contact hubspot_owner_id on the deal, but in a custom field that we have created that called hsownerid. So, with HS API, I try to take this field and take the raw value (ID) and send it to the field hubspot_owner_id on the deal.

When I launch my test here is the response :

data: { 
        status: 'error',
        message: 'Property values were not valid',
        correlationId: '4286b413-3e8f-42f2-9714-9f15290fcb9b',
        validationResults: [Object],
        requestId: 'e74c882b9a6cd0c72cc4667667a58f79' 
 } 

So I’m asking myself if it is possible to update the hubspot_owner_id field with the api ? and if it is possible, which value I have to send ?

API used

Get Deals (to take hsownerid value)
PUT Deals (to update hubspot_owner_id value)

And here is the PUT :

method: ‘put’,
url: ‘https://api.hubapi.com/deals/v1/deal/39412552?hapikey=’,
data: ‘{“properties”:[{“property”:“hubspot_owner_id”,“value”:“12252883”}]}’ },

I’m using Node js, AWS Lambda, Axios and async. don’t hesitate to ask if you need codes samples.
Thank you !

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Hubspot set deal hubspot_owner_id

Hi @AntoninMarchardDev,

In your request body, "property" should be replaced with "name", like this:

{
  “properties”: [
    {
      “name” : “hubspot_owner_id”,
      “value” : “12252883”
    }
  ] 
}
0 Upvotes