APIs & Integrations

EM9
Participant

Can't search for phone numbers (internal fields null)

As per this post, I'm trying to search by international phone number:

https://community.hubspot.com/t5/APIs-Integrations/Searching-contact-by-phone-number-different-forma...

 

I tried this, but I don't get the correct results, as it seems the international field is not correctly filled. Can you advise how I can search by international format number (ie, what's shown in the hubspot UI)

 

EM9_0-1670640831080.png

EM9_1-1670640840795.png

0 Upvotes
4 Replies 4
Jaycee_Lewis
Community Manager
Community Manager

Can't search for phone numbers (internal fields null)

Hi, @EM9 👋 Thanks for reaching out. Can you provide a sample request and response along with the full error body, please? This will help our community members better understand the root issues. 

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
EM9
Participant

Can't search for phone numbers (internal fields null)

Please see attached PHP sdk code.

https://gist.github.com/atymic/1104ae32c2bfee6604e1eb6cf68c4989

 

There is no results when searching by the international fields. The local fields work correctly, but we store number in international format so we can't use this.

 

The response is empty (no search results). There is no error code.

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Can't search for phone numbers (internal fields null)

Hi, @EM9 👋 One more question — using your above example, or a similar one, can you please show me in-app via a contact record exactly which property, hs_searchable_calculated_international_phone_number, is populated?  Outside the phone number field. I cannot locate it in-app. 

CleanShot 2022-12-15 at 16.51.28.png


I ask because these properties are not available in-app that I see, they are not part of the documentation here in HubSpot's default contact properties, and they are not returned when we query the Property API for the Contact Object.

 

Furthermore, this property, when queried using the Properties API endpoint GET/crm/v3/properties/{objectType}/{propertyName}, includes values for “hidden” and “read_only”.


My other suggestion would be to tag or DM the person who posted the suggestion you are trying to replicate. And ask them to provide a working request and response. Often with code troubleshooting and brainstorming, it's frequently a case of show not tell. 

 

If you have a link to a HubSpot developer doc mentioning this property or other examples of this property being used, I'd love to take a look. 

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
EM9
Participant

Can't search for phone numbers (internal fields null)

Hi Jaycee,

My understanding is these computed properties don't show in the UI. There is reference to this in the docs, but the problem we are having is numbers can be the same in multiple countries, so how can we pass the country?

 

EM9_0-1671496941407.png

 

0 Upvotes