Kaizen 176 - Optimizing the Use of Record ID Variables in Zoho CRM Queries

Kaizen 176 - Optimizing the Use of Record ID Variables in Zoho CRM Queries


Hello everyone!

Welcome to another week of Kaizen!


Today, we are back with another one on Queries.
In this post, we will discuss how you can optimize record ID as a variable in Queries.

What are variables in Queries?

Variables are placeholders in queries that take values at runtime. Variables make queries flexible and reusable, avoiding the need to hard-code data.

When you create a query, you can leverage record ID variables in two ways:
  1. Filter By field
  2. Criteria
Each method has its own benefits and considerations. Let's explore them in this post.

1. Using record ID variable in the "Filter By" field

When you use the record ID variable in the "Filter By" field of a query, you streamline the data retrieval process by directly targeting the specific records you need. This method is particularly useful when you want to narrow down your search to specific record based on their IDs. Simply put, this behaves as the Get Record by ID.

Consider an example, where Interested_Product is a lookup in Contacts. Our aim is to get the details of the product that the contact is interested in. We can create a query of type CRM - Module as shown in the following image.

  1. The base module is Contacts, and the related module is Products that is linked via the lookup field.
  2. Choose the required fields you want to retrieve through the query.
  3. In Filter by, select Record ID.
  4. Give the variable to hold the contact's ID in the Record ID field. The format is {{variable_name}}.
  5. The query assigns the ID of the contact dynamically during runtime.
  6. Click Next.
  7. A pop-up asks for the value of the variable.

  8. Input the ID of the contact and click Save.
  9. The response contains the fields that were queried for.

Benefits of having the record ID variable in "Filter by"

  • Efficiency: Directly retrieves the relevant records, reducing the need to sift through unnecessary data.
  • Simplicity: Easy to set up and understand, making it ideal for direct queries.

Considerations

  • Limited Flexibility: May not be suitable for complex queries requiring multiple conditions or criteria.
  • Specific Use Cases: Best used for scenarios where you have a clear and specific record ID to filter by.

2. Using Record ID Variable in Criteria While Fetching Related Records

Using the record ID variable in criteria while fetching related records allows for more complex and dynamic queries. This approach is useful when you need to retrieve related data based on certain conditions or criteria.
Consider an example where you want to retrieve deals of a contact. A deal can have multiple contacts, but you want to fetch only those deals that are related to a particular contact. This case warrants the need for criteria to filter based on the ID of the contact.
Construct a query as follows:
  1. Create a CRM - Module type query for the Deals module.
  2. Choose Contacts as the Related Module.
  3. Select the fields from these two modules that you want to retrieve.

  4. Select "Criteria" and create a variable for the record ID of the contact.

  5. Click Save and click Next.
  6. Give a contact ID for the variable in the pop up.

  7. Click Save and click Next.
  8. You can see the response to the query.

Benefits of using record ID variable in "criteria"

  • Flexibility: Allows for more complex queries with multiple criteria.
  • Dynamic Data Retrieval: Useful for scenarios where the criteria for related records may change based on different conditions.
  • Comprehensive Data: Fetches a broader range of related records, providing a more holistic view of the data.

Considerations

  • Complexity: More suitable for complex queries and requires deeper understanding of how modules are related in Zoho CRM.

Conclusion

Both methods offer their opportunities and challenges in Zoho CRM's data management.
Choosing the right approach depends on your specific needs and the complexity of your queries. For efficient and simple data retrieval, using the record ID variable in the "Filter By" field is ideal.
For more complex and dynamic queries, leveraging the record ID variable in criteria while fetching related records offers greater flexibility.

Experiment with both approaches to see which one fits your use case best.

Share your experiences in the comments or write to us at support@zohocrm.com, and help others optimize their data retrieval strategies in Zoho CRM!

Stay tuned for more posts in this series!

Cheers!

----------------------------------------------------------------------------------------------------------------------------------


        • Recent Topics

        • Zoho Books (UK) needs to be able to submit a CT600 CTSA return

          As well as a VAT Return, most (if not all) small businesses have to submit a CT600 Corporation Tax Self-Assessment. There are many providers who do this (like Xero) bujt not Zoho. Can you add this to the request list please? Many thanks Steve
        • No image image comes out in the recipient when I sent an email

          Hello to the entire forum, when I send an email from Zoho, my profile picture does not come out. On the other hand, if you do, using Gmail accounts. How is it configured to leave ??? Thank you Greetings !!
        • Zoho Desk & Tasks

          Hi, I'd like to be able to create a set of tasks each time a customer request comes in, as I understand it, currently each would need to be create manually. Project is too much of an overhead for what we want to use. Effectively in various use cases we
        • zet pack not working

          We are using the zet pack command to package our Zoho extension. However, after running the command, the extension gets packed, but the resulting package is empty. We've attached a screenshot for reference. Could you please assist us with resolving this
        • While retrieving the Balance Sheet Report, there is always this "COST OF GOODS SOLD", This is not editable.

          Hi Zoho & Readers, While retrieving the Balance Sheet Report, there is always this "COST OF GOODS SOLD", which is reduced from the Sales to arrive at the gross profit. The issue I face here is that Service Oriented Companies don't incur any COGS, hence
        • Changing salesorder_number via zoho flow

          For some reason updating salesorder_number via zoho flow does not stick. Flow is triggered by new sales order filtered by sales channel update sales order: PO#: CX${trigger.reference_number} Salesorder_number: CX${trigger.reference_number} PO# successfully
        • Working with Products that are non-tangible

          How does one create a 'service' in products? Is there a way to disable inventory functions for things like Sofware as a service? The services module doesn't look to be much help either. Not sure how to do this in CRM
        • Loop in Blueprint but it works. Why? How should this be set?

          see picture
        • Zoho Error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details

          Hello There, l tried to verify my domain (florindagoreti.com.br) and its shows this error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details. Screenshot Given Below -  please check what went wrong. Thanks
        • Bulk Delete Images

          How do I bulk Delete Images from Zoho Campaigns. We have been using the Zoho since 2019 and can still only see the option to delete images one by one and we have a lot of old Campaign imagery we don't need anymore. Thanks!
        • Tip #5: Setting access rights at the subfolder level

          Hello everyone, We hope you're finding our WorkDrive Tips and Tricks series useful. For today's tip, we'll teach you how to assign higher subfolder permissions to Team Folder members. Team Folders helps you avoid the drawbacks of traditional file sharing.
        • I want to update the photo from the mobile app to the product tab product.

          I want to update the photo from the mobile app to the product tab product. Because I want to use the CRM product tab for inventory management Contact registration can save photos from the mobile app. Attached screenshot.
        • Setting default From address when replying to request

          At the moment, if I want to reply to a request, the From field has three options, company@zohosupport.com, support@company.zohosupport.com, and support@company.com.  The first two are really internal address that should never be seen by the customer and
        • Enable Image and Hyperlink Sync in Zoho Desk - Jira Integration

          Hi, We are using the Zoho Desk - Jira integration, which allows comments to sync automatically between a Zoho Desk ticket and its linked Jira issue. However, we have noticed a limitation: When adding a hyperlink or image in a Zoho Desk comment, it is
        • Deluge Function to Update Custom Field

          I'm trying to get a Deluge function (which will run as part of a Schedule in Desk) that retrieves all tickets with the status "Recurring" and updates the custom field checkbox "cf_recurring" to "true". Here's what I have, which doesn't work: searchValue
        • Implement Date-Time-Based Triggers in Zoho Desk

          Dear Zoho Desk Support Team, We are writing to request a new feature that would allow for the creation of workflows triggered by specific date-time conditions. Currently, Zoho Desk does not provide native support for date-time-based triggers, limiting
        • How many ZOHO-Sites does the ZOHO-One Suite allow for?

          The free version of ZOHO-Sites allows for two sites, but it seems that the professional version (which is included in the ZOHO-One Suite) only allows for two websites. Is that correct? How many sites can I have within one ZOHO-One account?
        • Zoho desk Spam Folder

          Dear Zoho Support Team, We are experiencing an issue with Zoho Desk, where all emails sent to our customers are being marked as spam. As a result, they are not receiving notifications for new ticket replies. Please assist us in resolving this issue.
        • Is Zoho Tables part of Zoho One

          Cant seem to add the app as part of my Zoho One Subscription?
        • Canva Integration

          Hello! As many marketing departments are streamlining their teams, many have begun utilizing Canva for all design mockups and approvals prior to its integration into Marketing automation software. While Zoho Social has this integration already accomplished,
        • Possible to filter out contacts that hasn't opened emails in Cadence?

          We use Cadences in various outreach - is it possible in analytics or reports to filter out the contacts that have not opened their emails?
        • On Duty Requests using API

          Currently we can only do attendance entries using API, we need to make on Duty Requests using API Use Case We are using different on premise devices to track meetings, we want to sync this data with Zoho People Currently we are manually making on duty
        • Dialing Microsoft Teams Phone Service via Zoho CRM

          I am using the VOIP option in Microsoft teams for my office phone system. I was hoping to have a way to dial numbers directly from Zoho CRM, but don't see anything in the Teams Integration or in the Telephony integration that will enable this. Does anyone
        • Zoho Books API down

          We've been using the zoho books api for the last few weeks to pull open invoices, and the code has stopped working suddenly. When making the same API call as always, we're getting a 400 error.
        • Issue with ticket replies via Slack: '+' symbols replacing spaces in emails

          Hello, support team! We're experiencing an issue when replying to tickets directly through Slack. When the reply is sent to the email, spaces are being replaced by '+' symbols. This makes the message harder to read and understand. Is there any solution
        • Phonebridge is not visible for one user

          Hello Community, i setup phonebridge. It is working for all users in the organisation. Except for one. I uninstalled phonebridge for the user and reinstalled. But the Call button is not appearing in CRM. What could I am missing. ? Many thanks and best
        • Connecting Portals from different Zoho apps

          Hi, I note that Zoho has functionality for customer portals for several of the Zoho apps, like CRM, Projects, Desk etc. Is there any way to connect these portals?  It would be great if we could give our customers access to a portal in which they could
        • Introducing Keyboard Shortcuts for Zoho CRM

          Dear Customers, We're happy to introduce keyboard shortcuts for Zoho CRM features! Until now, you might have been navigating to modules manually using the mouse, and at times, it could be tedious, especially when you had to search for specific modules
        • Fields are missed from lead generation

          Based on the following article, there should be options like "Push leads from all leads forms to Zoho CRM" or "Like my ad" or "Comment on my ad" in the Lead generation menu in my Zoho social, but they are not. Other options are available though. htt
        • How Can Zoho Help Me Track My Driving Distance and Improve My Routes?

          I’ve been using Zoho for a while now, and it’s been great for managing my business tasks. However, I’ve been looking for a way to track my driving habits within Zoho. I’m a regular commuter, and managing my time and routes efficiently is really important
        • Important: Zoho Campaigns updates on features and functions

          Note: Based on our users' and partners' feedback for the below post, we have reverted all the changes mentioned here. We sincerely apologize for any inconvenience caused. Please read this post to understand our goal behind these changes and what's our
        • Limits on workflow never disclosed, not documents and now being applied. I feel scammed and there is no reply for support.

          Hello everyone, I’m facing a critical issue with Zoho Recruit and would appreciate any insights from fellow users or someone from Zoho. For months, I’ve been receiving daily emails stating that I have reached the maximum workflow custom functions limit.
        • Automatically Open an On-hold Ticket at Prescribed/Scheduled/Delayed Time/Date

          We have tickets that require followup depending on the situation. Is there a way to change an open ticket status to an on-hold status and assign a date/time that the ticket will set its status back to open? My use case is scheduling. We schedule work,
        • Problem with currency field in Zoho CRM

          Hi Guys Zoho Books has a feature in currency fields that automatically converts decimal numbers with commas ( , ) to period format ( . ) when pasting them. For example: R$ 2,50 --> R$ 2.50 Is this behavior available in Zoho CRM? I couldn't find any configuration
        • Zoho CRM Roles to Zoho Desk

          I have created my role hierarchy in Zoho CRM, Can i import/sync those roles from CRM to Desk or should i create role hierarchy again in Desk?
        • Allow the usage of Multi-Select fields as the primary field on "Layout Rules"

          We want to force our users to enter some explanation strings when a multi-select field has been utilized. I can't understand the reason for the usage restriction of Multi-Select fields as a primary field. This is a simple "Display hidden mandatory field
        • Calculating HMAC-SHA256 Hash Value for Webhook

          I cannot figure out how to accurately calculate the HMAC-SHA256 hash for a webhook. Here's the documentation I'm attempting to follow. https://www.zoho.com/in/expense/help/automation/webhooks/#validate-webhook I created a VERY simple "Raw JSON" payload
        • How send a ticket attachment using the Sendreply API in Zoho Desk

          API document references : you make use of the Upload file API and gather the attachment ID. This ID is be passed with the Send email Reply API to deliver responses with the attachment intact. Code template is as below: // ORGID ORGID = "XXXXXXX"; // Masked
        • How to make the Reprots field default to be empty when entering a new expense or remove it completely

          Currently the Reports field is defaulting to a specific report when entering a new expense. I would like that field to default to empty or remove it completely. That way the user can select the expenses to move to the report later.
        • Why is my deluge code not executing properly? (New and learning deluge)

          I'm trying to update a sales order number through deluge for an automation I'm trying to build. What is wrong with it? /* replacing SO with SOR for sales order pre-fix */ SO = salesorder.get("salesorder_number"); replace = SO.replaceFirst("SO","SOR");
        • Next Page