APIs & Integrations

Not applicable

Update `hubspot_owner_id` property within Events API

Hey there Hubspotters,

HubSpot uses the HubSpot Owner contact property to determine the owner of a contact. When the sign up event fires, it assigns the newly created Contact to a default HubSpot owner (the admin user in the account).

How do I set an owner on a new contact record via the Events API? Can I append an additional line in the Identify method for hubspotOwnerId?

_register_modal.html.haml

_hsq.push(["identify",{
   email: email,
   firstName: firstName,
   lastName: lastName,
   ## Assign HubSpot Owner
   hubspot_owner_id: 22327516
}])

_hsq.push(["trackEvent", { id: 'sign up' }])
0 Upvotes
5 Replies 5
Not applicable

Update `hubspot_owner_id` property within Events API

HubSpot Support confirmed that, "Knowing the owner_id shouldn't introduce any vulnerabilities here. Even if the owner_id is publicly visible, it shouldn't allow anyone to gain access to your portal or information."

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Update `hubspot_owner_id` property within Events API

Hi @tbcooney,

Yes, that should work so long as you're passing a valid HubSpot Owner ID.

0 Upvotes
Not applicable

Update `hubspot_owner_id` property within Events API

Thanks @Derek_Gervais, is a hubspot_owner_id safe to share publically?

Also, I realized that our Contact's are mapped to Salesforce and the Contact Owner property (hubspot_owner_id) uses the most recent value (between Salesforce & HubSpot), does that mean I need to set the hubspotOwnerId with the Salesforce value? I set it with the HubSpot owner ID and it assigned the default user, which isn't the desired behaviour.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Update `hubspot_owner_id` property within Events API

Hi @tbcooney,

The internal name for the HubSpot owner property is hubspot_owner_id. You should be able to include that in your identify call.

0 Upvotes
Not applicable

Update `hubspot_owner_id` property within Events API

Thanks @Derek_Gervais for confirming...so similar to how I have it listed above should simply assign new contacts with the specified ID?

0 Upvotes