APIs & Integrations

SBurwash
Participant

Company 'country' value not updated in API when updated manually in UI

SOLVE

Good day,

 

We're having an issue with properties wtih the "company" v3 endpoint (although we have a hunch that it could be in other spots) where the value returned by the API is not the same as the one in the hubspot frontend.

 

Ex:

1) A company was created with it's country=Japan

2) At a later date, a person in sales updates it's value to country=USA

3) Result: Several days later, even though we updated the country field, the API still returns the initial value of country=Japan

 

Has anyone ever seen this issue/know how to deal with it?

0 Upvotes
1 Accepted solution
SBurwash
Solution
Participant

Company 'country' value not updated in API when updated manually in UI

SOLVE

Here is the response from hubspot

 

Hi Stephane,

I hope you're doing well today. I wanted to let you know that I have just received a response from our product upon taking a look at the backend of the example company and properties used in the endpoint.

So, what is happening is that the "Country" field that's appearing on the front end is actually a custom property that has an internal name of country_list, which you can see in your company property settings (see screenshot attached). The value for country_list (labeled "Country") is indeed USA for that company.

However, there's also a property with the internal name "Country", which has the value "Japan" for the example company. This is the default property labeled "Country/Region". Some important context is that when a user attempts to delete a default HubSpot property, it's not fully deleted; it's just hidden from the UI. So this property is hidden, but it still has the value of "Japan" for the example company. As you're using the internal name for that property in your API call, it explains why you get Japan as the result. Using instead country_list should pull the results you expect. The same can happen for deals, make sure you use the correct internal name for the property you want to pull.



So this was an internal value error, which is aweomse to hear! No patching required 😄 closing the issue

View solution in original post

5 Replies 5
SBurwash
Participant

Company 'country' value not updated in API when updated manually in UI

SOLVE

Hi @dennisedson, thanks for the quick response! 

 

I can try to find you more examples, but we are fairly confident this is a recurring issue that also could possible span into deals:

Here is an example of a query:
{{hubspot_url}}/crm/v3/objects/companies/:id?properties=country

Where the country= Japan, 

 

But here on our page, we can see: 

SBurwash_0-1651003040852.png

 

Any ideas? I can provide more examples if necessary. 

 

(PS: sorry if you already saw this message, I had it as the wrong type of reply so reposting)

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Company 'country' value not updated in API when updated manually in UI

SOLVE

@SBurwash 

Thanks for updating!  I am looking into it.

When you say it possibly spans deals, can you elaborate?

0 Upvotes
SBurwash
Participant

Company 'country' value not updated in API when updated manually in UI

SOLVE

@dennisedson thank you so much!

For the deals, we currently have sdr date values that are being manually updated by users to fit into a certain month (ex: deal was closed on april 4th, but it was officialized in march so we manually roll back the date to march 31st) but the date is still showing up as april 4th

 

The common factor is manual updates 

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Company 'country' value not updated in API when updated manually in UI

SOLVE

@SBurwash 

I have not seen any other reports of this recently 🤔

Was it for a specific contact or many?

Is it still happening?

 

SBurwash
Solution
Participant

Company 'country' value not updated in API when updated manually in UI

SOLVE

Here is the response from hubspot

 

Hi Stephane,

I hope you're doing well today. I wanted to let you know that I have just received a response from our product upon taking a look at the backend of the example company and properties used in the endpoint.

So, what is happening is that the "Country" field that's appearing on the front end is actually a custom property that has an internal name of country_list, which you can see in your company property settings (see screenshot attached). The value for country_list (labeled "Country") is indeed USA for that company.

However, there's also a property with the internal name "Country", which has the value "Japan" for the example company. This is the default property labeled "Country/Region". Some important context is that when a user attempts to delete a default HubSpot property, it's not fully deleted; it's just hidden from the UI. So this property is hidden, but it still has the value of "Japan" for the example company. As you're using the internal name for that property in your API call, it explains why you get Japan as the result. Using instead country_list should pull the results you expect. The same can happen for deals, make sure you use the correct internal name for the property you want to pull.



So this was an internal value error, which is aweomse to hear! No patching required 😄 closing the issue