APIs & Integrations

SZanni
Member | Diamond Partner
Member | Diamond Partner

Use Business Units with API

Good morning,

I need to use Business Units with API.

I've found a property 'hs_all_assigned_business_unit_ids' that I can use for contact, company, deal and custom objects. 
I see I can move objects through different business units using this property.

I didn't find documentation related to this property, can I use it in an integration or are you planning to modify something in the future?

Also, it would be possibile to create custom properties related to single business units? I see I can do it through UI but I can't do it though API with properties API. 
Please let me know, thank you

Sebastiano 

18 Replies 18
BTeam0
Member

Use Business Units with API

Hello SZanni, did you manage to get a fxi for this, I'd appreciate if you did and you can share.

 

I ran into a similar problem and noticed an error in my API call. I was trying to insert a busness unit through the API end point for business unit


"hs_all_assigned_business_unit_ids": "GL- Business"

here ==>  Property values were not valid: [{\"isValid\":false,\"message\":\"Attempted to insert non-long value

My value has a "-" in it, for example "GL-Business" as a business unit and i think that's why it's causing a failure.

Can anyone help please?

0 Upvotes
darren-kb
Member

Use Business Units with API

Good Afternoon,

 

I am currently building an integration between HubSpot and NetSuite.  We have separate product lines, and so are using the business units to separate the contacts in hubspot for each of the product lines.

 

However, I cannot seem to find any documentation as to how to set the business unit property for a contact via the API.  We are currently using the v1 API, but I am open to using the v3 API if that is what I need to do.

 

I do see that there is a property called "hs_all_assigned_business_unit_ids" in the contact API, but I am unclear how to set the business unit ID's or how I can get the business unit ID values to set.

 

Can anyone clarify this for me? 

 

Thanks so much for any guidance!

Darren Nay

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Use Business Units with API

@darren-kb ,

I am asking about this 😀

0 Upvotes
darren-kb
Member

Use Business Units with API

Thank you! Any guidance that you could provide would be appreciated very much!  I reached out to HubSpot support also and they had told me that it may not be available in the API until the Business Units feature was out of Beta, but he did not sound sure.  

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Use Business Units with API

@darren-kb ,

I am merging this post with the other related post that you are already a part of

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Use Business Units with API

Alright all,

Here is what is what I have been told.  Presently, this is not possible and there is no timeline for it.  Would any of you be willing to create an idea post and link back here.  If we can create enough buzz on this, I think we can move the needle of prioritization of it!

0 Upvotes
darren-kb
Member

Use Business Units with API

Good Afternoon, has there been any traction on this question?  I am also attempting to set the business unit for a contact via the API.  I haven't had any luck with anything I have tried thus far.  I reached out to HubSpot support and they said that it may not be available to update via the API until the Business Units product has been released from Beta.  They did not sound sure, however, so I thought I would reach out here and see if anyone else had had any luck with this.

 

Thanks for your help!

Darren

0 Upvotes
LMeert
Guide | Platinum Partner
Guide | Platinum Partner

Use Business Units with API

Hello @SZanni@TiphaineCuisset,

Any news regarding this topic ?
I have to build a custm object for a client and I was wondering how I could add the business unit field (similar to the one that's automatically added to the contacts when you create multiple business units) to the new custom object.

My use case is simple, my client manages 3 brands and each organizes conferences and events.
I am creating an "Events" custom object and would like to tie each event to its own brand.

Many thanks !

Ludwig 

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes
SZanni
Member | Diamond Partner
Member | Diamond Partner

Use Business Units with API

The property is added automatically for any object but at beginning it's hidden. You can change this with property API.

LMeert
Guide | Platinum Partner
Guide | Platinum Partner

Use Business Units with API

Thanks, I've done that and indeed I can now see the business units field in my custom object properties.
However, although I can select an option for the same field on a contact, the dropdown is empty on the custom object.

Anything I'm missing here or do you reckon it's a bug ? The feature is indeed quite recent so that may be the case. If so, do you have any idea where to report that ? (Quite new to this forum)

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Use Business Units with API

@LMeert , could you send a screengrab of what you are seeing?  Want to make sure I am clear 😀

0 Upvotes
LMeert
Guide | Platinum Partner
Guide | Platinum Partner

Use Business Units with API

Hi @dennisedson,

Sure thing, here it is: 

LMeert_0-1644847045926.png

 

This is a sample record on my "Events" custom object.
I've switched the "hidden" attribute of the property "hs_all_assigned_business_unit_ids" as Szanni suggested, so now it shows via the UI but I can't select any value for this field.
I also cannot edit the content of the dropdown since it's a Hubspot generated field.

What I've tried :
- forcing the "externalOptions" to true => API call is a success but nothing changes
- forcing the options of the dropdown to a test value => I get an error confirming this is read-only

 

Below is the same "Business unit" field for the contacts object :

LMeert_1-1644847689917.png

 

If I'm not mistaken, and the "hs_all_assigned_business_unit_ids" field is indeed automatically added to every object, then unhiding should be enough to have it work properly, i.e. display the list of the business units you have created.

 

Hope it's clearer this way !
Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

dennisedson
HubSpot Product Team
HubSpot Product Team

Use Business Units with API

Perfecto!

I will try to reproduce and report back 👍

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Use Business Units with API

FYI, I have asked the team and am waiting for some feedback 😀

LMeert
Guide | Platinum Partner
Guide | Platinum Partner

Use Business Units with API

Thanks @dennisedson much appreciated 🙏

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

LMeert
Guide | Platinum Partner
Guide | Platinum Partner

Use Business Units with API

Hello @dennisedson,

Any news re. this topic ? 🙂

 

Have a good day !
Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes
Ryan_Sessel
Member | Platinum Partner
Member | Platinum Partner

Use Business Units with API

Was this matter resolved? We have the same query. 

 

Thanks so much

0 Upvotes
TiphaineCuisset
Community Manager
Community Manager

Use Business Units with API

Hi @SZanni 

 

Thank you for reaching out.

I want to tag some of our experts on this - @Teun @DanielSanchez do you have any thoughts for @SZanni on this? 

 

Thank you!

Best

Tiphaine


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


0 Upvotes