APIs & Integrations

JKim45
Member

Search API custom properties

SOLVE

I'm trying to use the search API to search for companies by a custom property. It's an ID string value value and I've updated the property setting so that "Show in global search results" is enabled. However, the API is not returning any results when I use it in the query or in the filterGroups. Is there anything else I need to configure in order for the search to work with the custom property? Searches 

0 Upvotes
1 Accepted solution
SteveHTM
Solution
Key Advisor

Search API custom properties

SOLVE

@JKim45 - Thanks. Clearly, there is nothing obviously wrong in the approach you have taken here as far as I can see.
I have seen a few other posts that suggest issues with the use of EQ and long string matching, although I don't recall a smoking gun on issues. Since I don't know how experienced you are with the search API use, I'm going to suggest a few things I might try just to think around the problem and perhaps get a sense of what may be out of line.

- Try a 'sanity check' search on - for example - EQ on the record ID for a test case to mae sure that you get the record you expect
- Try using a different comparision operator - I suggest CONTAINS_TOKEN (also an opportunity to use a partial match)
- look carefully at the other parameters of your search API call - limit, after - to make sure they are set as you expect.

The underlying response here, based on my experience, is that you must be 99% there and a bit of lateral thinking will help solve the hidden issue.

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature

View solution in original post

0 Upvotes
3 Replies 3
SteveHTM
Solution
Key Advisor

Search API custom properties

SOLVE

@JKim45 - Thanks. Clearly, there is nothing obviously wrong in the approach you have taken here as far as I can see.
I have seen a few other posts that suggest issues with the use of EQ and long string matching, although I don't recall a smoking gun on issues. Since I don't know how experienced you are with the search API use, I'm going to suggest a few things I might try just to think around the problem and perhaps get a sense of what may be out of line.

- Try a 'sanity check' search on - for example - EQ on the record ID for a test case to mae sure that you get the record you expect
- Try using a different comparision operator - I suggest CONTAINS_TOKEN (also an opportunity to use a partial match)
- look carefully at the other parameters of your search API call - limit, after - to make sure they are set as you expect.

The underlying response here, based on my experience, is that you must be 99% there and a bit of lateral thinking will help solve the hidden issue.

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
0 Upvotes
SteveHTM
Key Advisor

Search API custom properties

SOLVE

@JKim45 - In order that we can help to understand this issue, can you offer some example of how the property is defined and the search filters that seem to be failing?

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
0 Upvotes
JKim45
Member

Search API custom properties

SOLVE

Sure thing, the property is titus_business_id and it's single-line text and it's a id string from our database. We're using the https://api.hubapi.com/crm/v3/objects/companies/search endpoint and passing the id as the query property. We also tried adding filterGroups into the payload but that still returns 0 results:

filterGroups: [
{
filters: [
{ propertyName: 'titus_business_id', operator: 'EQ', value: '7fa37444-7d6f-4033-b60d-da7abbbd76ad' },
],
},
]

0 Upvotes