APIs & Integrations

eblanchette1
Member

Search with Custom Properties

SOLVE

Hello, I’m trying to figure out a way to find contacts with a custom property. I’m trying to implement one way sync from our internal system to hubspot. I have a property called ‘internal-account-id’. It appears search only works with name and email.

Am I missing something? Ideas / suggestions welcome.

Thanks,

Eric

1 Accepted solution
jackcoldrick
Solution
HubSpot Employee
HubSpot Employee

Search with Custom Properties

SOLVE

This has been rolled out into developer preview today. You can acess it here: https://developers.hubspot.com/docs-beta/crm/search. You can view the official update here: https://developers.hubspot.com/changelog/crm-api-v3-developer-preview-is-now-available

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn

View solution in original post

47 Replies 47
ISingh2
Participant

Search with Custom Properties

SOLVE

I would like to inform, this can still search for predefined values in doc https://developers.hubspot.com/docs/api/crm/search . So, we can give value to an available property and get it done, rather than depending on custom value. 

 

Here is a working code: 

 

require("vendor/autoload.php");

/****Read Deals****/


use HubSpot\Factory;
use HubSpot\Client\Crm\Deals\ApiException;
use HubSpot\Client\Crm\Deals\Model\Filter;
use HubSpot\Client\Crm\Deals\Model\FilterGroup;
use HubSpot\Client\Crm\Deals\Model\PublicObjectSearchRequest;

$client = Factory::createWithAccessToken('YOUR-TOKEN-FOR-PRIVATE-HUBSPOT-APP');

$filter1 = new Filter([
'property_name' => 'dealname',
'operator' => 'EQ',
'value' => '900000000001',
]);
$filterGroup1 = new FilterGroup([
'filters' => [$filter1]
]);
$publicObjectSearchRequest = new PublicObjectSearchRequest([
'filter_groups' => [$filterGroup1],
]);
echo '<pre>';
try {
$apiResponse = $client->crm()->deals()->searchApi()->doSearch($publicObjectSearchRequest);
var_dump($apiResponse);
} catch (ApiException $e) {
echo "Exception when calling search_api->do_search: ", $e->getMessage();
}
echo '</pre>';

0 Upvotes
KDesmond
Member

Search with Custom Properties

SOLVE

Filtering like this in nodejs isn't working for me. Its bringing back lots of results for a query that should bring back 1. Strange.

0 Upvotes
dwf
Contributor

Search with Custom Properties

SOLVE

I want to find a group of contacts sourced from a particular conference. I setup a custom field (Source), entered a "tag" against each, but I am unable to search on that field. Really??? Am I missing something? Seems like 101 basic must have capability of a CRM system? Especially a CRM that has sooooo many other features.

dwf
Contributor

Search with Custom Properties

SOLVE

So...it seems you can do this if you have Enterprise edition. This is EXTREMELY customer unfriendly. A CRM that costs 5-figures annually for "Professional" and I'm held hostage to paying even more? What "Professional" wants to enter information into a CRM, only to be unable to find it! Come on Hubspot. https://knowledge.hubspot.com/crm-setup/manage-your-properties

M4tr1xN30
Contributor

Search with Custom Properties

SOLVE

Agree with this completely. This should be a basic function that is not required to pay a premium for.

 

We're lucky enough to have enterprise, and while we can select custom fields to be searchable via Global Search, it still has limitations. 

 

We can only select a maximum of 3 custom fields for search indexing... a whole 3 fields. So while it's useful, we have more than that we would like to search.

 

Also, the search works fine if you have purely alphanumeric in the field, bit throw in a space or special character in to the mix, and the search fails miserably.

 

Not a great feature for a premium price. 

dwf
Contributor

Search with Custom Properties

SOLVE

Yikes! 

0 Upvotes
Dkro
Member

Search with Custom Properties

SOLVE

Hello @jackcoldrick any news on this? any update on searching based on custom properties?

jackcoldrick
HubSpot Employee
HubSpot Employee

Search with Custom Properties

SOLVE

Hi everyone,


Thank you for commenting and I understand the frustrations. I believe there may be some confusion with what functionality the Search API we released into beta actually correlates to within HubSpot. Within the tool there are a number of search boxes (global search, CRM search and filter search), each function differently and not all use the Search API we released into beta. I’ll break them down into more detail below:


1) Global search bar:
The global search box appears at the top right hand side of the main navigation bar. This is documented in more detail here. If you are a Marketing Hub Enterprise customer it would allow you to label 3 custom properties to become indexable/searchable and show results accordingly. The new search API is not the same API that powers this and as a result it’s expected to function differently. 


global-search.png

 


2) CRM search bar:

Within the various tools of the CRM namely Contacts, Companies, Deals and Tickets there is another search box in the top right hand corner just below the main navigation. This will search across a subset of pre-set default HubSpot properties and show results accordingly.

The query field of a search request corresponds to the CRM search bar in the UI. Custom properties are not currently searchable in either the CRM Search bar or the query string in a search API call.

 

crm-search.png


3) Filter search bar:
On the left hand side of the Contacts, Companies, Deals and Tickets tools you will see a search box with a title “Add filter”. This allows you to search across any custom or default Hubspot properties and create your filters accordingly. This is the part of the tool that our new Search API is powering. When you call the Search API you are effectively creating a filter and supplying it with a value.

 

filter-search.png

 


Whilst I appreciate this makes for a confusing UI at times we are aware of this and working to align the search features in the longer term. For now however I do want to clarify that our new Search API does not make something possible that was otherwise only reserved for Marketing Hub Enterprise. It is something that everyone has the ability to do within Hubspot right now. It simply allows you to do it externally if you are looking to leverage that functionality within your integration.

 

- Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
brainharrington
Participant

Search with Custom Properties

SOLVE

Hey Jack,

 

Thanks for the reply, I don't need any API integration. I just want to learn how to search the custom fields that I've created. For example I have Address as a field I created and when I try searching an address I know is in there nothing comes up. Thanks for letting me know about all three search boxes. I tried all three and got nothing when trying to search by address.

 

Can you let me know if that's possible to add a field and be able to search by it?

 

Brian

plmcraig
Member

Search with Custom Properties

SOLVE

You can't Brian, thats the probelm! Retarded I know. I left and went to Zoho. While Zoho is not as intuitive in the beginning, once you get the hang of it , it's epic , its very customisable , you get over 50 APPS features etc for much less and the price comparison is second to none.  Try it. You may switch too. 

sasteffl
Participant

Search with Custom Properties

SOLVE

How about just searching through you default properties, like Physical Street Address?

sanjaydojo
Contributor

Search with Custom Properties

SOLVE

Hi @jackcoldrick , is "label 3 custom properties" feature for Hubspot API? Can I use it to search for a contact using Hubspot API in my script?  

0 Upvotes
jackcoldrick
HubSpot Employee
HubSpot Employee

Search with Custom Properties

SOLVE

Hi @sanjaydojo,

 

No - as outlined the Search API is linked to the Filter search functionality within the HubSpot CRM and is in no way linked to our Global Search functionality which would facilitate looking up custom properties. There is no external API that would support leveraging this specific global search bar.

 

Regards,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
0 Upvotes
eblanchette
Participant

Search with Custom Properties

SOLVE

I'm still baffled that this post is still active and nothing has been done to implement this feature. This clearly has been implemented on the api.hubspot.com entrypoint and not the api.hubapi.com entry point.  I understand that these are two different services but I request ed this feature back in 2017.  The hubspot UI allows us to apply filters on the contacts view.  Why can't we have the same access? We have almost 200,000 contacts in our account and the current api limits us to 100 (although 250 seems to work). 

Console Network Request:

Screen Shot 2019-10-29 at 10.03.01 PM.png

111project
Participant

Search with Custom Properties

SOLVE

Is there any update on this.  Seems like this has been a wanted feature for a long time now.  It would be great to be able to filter contacts/companies by a custom field or selected field option.  I remember BaseCamp/Highrise had this in their CRM and it was really nice.

0 Upvotes
jackcoldrick
HubSpot Employee
HubSpot Employee

Search with Custom Properties

SOLVE

Hi @111project,

 

Yes we are releasing a new CRM Search endpoint into "Developer preview" this week that will allow you to search across all CRM objects (Contacts, Companies, Deals, Products and Tickets) using values stored in default and/or custom properties.

 

We will update this thread as soon as it's live.

 

Regards,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
bluesix
Participant

Search with Custom Properties

SOLVE

Hi Jack,

 

Just cheking if this new search functionality has been released yet?

jackcoldrick
Solution
HubSpot Employee
HubSpot Employee

Search with Custom Properties

SOLVE

This has been rolled out into developer preview today. You can acess it here: https://developers.hubspot.com/docs-beta/crm/search. You can view the official update here: https://developers.hubspot.com/changelog/crm-api-v3-developer-preview-is-now-available

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
upFlowMe
Member

Search with Custom Properties

SOLVE

Why can't I search for contacts that have a property different than empty string? Like this:

 

{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "template_whatsapp",
            "operator": "NEQ",
            "value": ""
          }
        ]
      }
    ]
  }
 
The response is "value must be non-empty and non-blank, if specified", useless for me.
0 Upvotes
upFlowMe
Member

Search with Custom Properties

SOLVE

Why can't I search for contacts that have a property different than empty string? Like this:

 

{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "template_whatsapp",
            "operator": "NEQ",
            "value": ""
          }
        ]
      }
    ]
  }
0 Upvotes