Is there a way to search a Company or Contact custom fields for certain values and just return the Companies or Contacts that match the search criteria?
This would be similar to using the “Cusom Fields” tab in the Companes/Contact search feature on the web site.
I’m pretty sure I can do it with XMLRPC queries but I’m trying not to implement any more features using that technology.
@Doug_Knudsen - You are correct, XML-RPC can query Custom Fields. You have until the end of 2026 in using the XML-RPC API.
To XML-RPC developers, here are suggested workarounds to the limitation.
Loop through all the records to find a match. Not ideal especially if you have 1000s of records to query every time.
Use a Saved Search which has the Custom Field query set up. This is better as you can limit the results to the Custom Field being filled. But this requires manually setting up the Saved Search.
Create a Sync between Keep and your Database. Less ideal, as more work is involved here. You would get faster querying, but the data will not always be up to date until the next sync.
Thanks for the quick response. I can see why that might be a problem. However, it is interesting that this filtering is allowed via the UI and seems to work pretty good. Just say’in!
We’ll probably use that filtering initially to get Tags assigned and then use automation to update the Tags for Companies that we need to “filter” on (based on custom field values, assigning/unassigning a Tag etc.) to avoid using XML RPC.
As mentioned in a previous post, since Company Tags are not fully supported in REST v2 yet, we’ll need to use REST v1 to handle a lot of this and then re-visit more code once REST v2 gets Companies Tag support.
I think this highlights the importance of getting the REST v2 parity in place ASAP to help avoid developer angst having to rework code as Keap is working to consolidate it’s API’s into a more manageable product.
Thanks @Pav for the suggestions. However, for our use case, I think options #1 and #3 are non-starters based on the # of records we are dealing with (as you stated, 1000’s of records would be heavy handed) and we need the data to be up to date. That being said, we are already syncing data using REST hooks (which I think is another REST v1 only feature “REST Hooks”) so we could use that process to also check for custom field changes and sync those as necessary. I think that would work.
As for option #2, I am not familiar with Saved Search so have to look into that. If there is API support for those, that could work well. @Pav , do you know if there is API support for using Saved Searches? Or how are you suggesting a Saved Search be used programically?
In the Contacts Search you can save the Search and give it a name. Keap will assign it an ID number which you need to use in the API.
What i am thinking of is that depending on the Custom Field that has been set up, you could set the Filter to “is filled” indicating that the field has been entered. This will just report on those particular records, which will reduce on the record iteration.
No problem for us that the filter needs to be setup manually, that is OK (we are a customer, not a vendor, so that isn’t a big deal). I could imagine a # of scenarios where this could be useful for us.
I just noticed you mentioned this for Contacts and we would (also) need it for Companies. It looks like Companies has Saved Searches as well ()in the UI) so I’ll check it out!
@OmarAlmonte Looking at the “Reporting” API for REST v2, I see it says “Deprecated as of v2” in RED. What does this mean? I’ve seen this other places. Does it mean that the Reporting endpoint will be going away? Or maybe there is a replacement endpoint?
@Doug_Knudsen These provide legacy Saved Search reports in REST format, rather than a full new reporting solution. We won’t extend them beyond v2, but we’ll make sure a new reporting solution is in place before retiring them.