loader

For this tutorial in video form, click here

Let’s dive into Search Records in Zoho CRM using Deluge Script.

The Process

Let’s check out the documentation which can be found at REST API > Record APIs > Search Records under zoho.com/crm/developer/docs/api .

If we look under Deluge, it gives us the syntax.

We give it a module, the criteria, page (because there might be more than 200 results), the number per page, and other parameters which are used infrequently.

Let’s take a look at an example:

The module is Leads.

Search Criteria

Let’s zoom in on the search criteria.

It allows for multiple criteria. How is this done? First, it has the API name, along with the operation, which can be “equals” or “starts_with”.

If you need to have complex criteria, then you can link them together by putting each criterion inside the set of parenthesis and then using “and” or “or.”

Examples

Let’s look at it in action by loading up the CRM. Consider the following lead:

What if we wanted to find all the people who have an email address that starts with the highlighted portion?

We could use Deluge for that. Click the Setup button in the top right, then go to Developer Space > Functions.

Next, click “+Create Function” and make it standalone. Next, we’ve set up this code:

The 1 at the end of the first line represents how many we want per page. We’ll keep it at 1 for the purposes of this tutorial, but this is an awesome feature when you can potentially have thousands of leads.

Once we execute, we can see it has found us that lead:

If we put in a criterion that doesn’t work, we get nothing back:

The other one you can use is “equals” looking for full emails:

Here is what linking criteria together looks like:

There’s also “or” for finding leads that match at least one of the criteria:

Hopefully that gives you a bit of insight into using the search records function!

For this tutorial in video form, click here