Kaizen 250: Introducing write-enabled Queries: Auto-populating lookup fields

Kaizen 250: Introducing write-enabled Queries: Auto-populating lookup fields


Hello Everyone,

Welcome back to an exceptional edition of the Kaizen series!
Today marks Kaizen #250, an exciting milestone in our journey of exploring, learning, and building with Zoho CRM. Over the past 249 editions, we've covered a wide range of features, APIs, best practices, and real-world use cases designed to help you get more out of Zoho CRM. A heartfelt thanks to everyone who has followed the series, shared feedback, asked thoughtful questions, and supported this journey along the way.

In today's post, let's explore the latest enhancements to Queries.


Until now, we've primarily used Queries as a read-only capability allowing us to fetch data, transform it using a Serializer, and display it in components such as Canvas and Kiosk. However, whenever we had to update a CRM record, such as setting a lookup field or modifying a value we had to rely on Custom Functions or Client Scripts. 

Info

What's new

Query Workbench's REST API source type supports GET, POST, PUT, PATCH, and DELETE, which means a Query can now perform the write itself, end-to-end.

Why this matters

The latest enhancement to the Queries feature enables you to automate dynamic lookup assignments directly within Zoho CRM. In this post, we'll use a practical example to show how this enhancement works in a Blueprint-driven Kiosk flow.
Quote

Business scenario

Zylker Field Services manages a team of Field Engineers across multiple service zones. Whenever a new Service Application is created, a dispatcher is responsible for manually identifying the most suitable engineer by matching the application's Zone and Specialization, and selecting the engineer with the lowest Active_Request_Count before assigning the request.

The Operational Problem

Traditionally, this process is manual:
  1. The dispatcher opens the Field Engineers module.
  2. Filters engineers by the required Zone and Specialization.
  3. Compares each engineer's Active_Request_Count.
  4. Assigns the engineer with the lightest workload.
This approach is both time-consuming and difficult to scale. As the number of service requests and engineers grows, manually comparing workloads becomes inefficient and can lead to uneven distribution of work.
Idea

Solution Overview

To automate engineer assignment, we'll build a Kiosk that is triggered from the Assign Engineer Blueprint transition. The Kiosk uses GetRecords state to retrieve the most suitable engineer and update the required records directly through the Queries with Zoho CRM REST API source.

The solution works as follows:
  1. The Kiosk is launched when the Service Application enters the Assign Engineer Blueprint transition.
  2. The GetRecords state fetches the Field Engineers module for engineers who match the Service Application's Zone and Specialization, filters only active engineers, and sorts the results by Active_Request_Count in ascending order.
  3. If a matching engineer is found, the Kiosk, updates the Field_Engineer lookup field on the Service Application by invoking the Query.
  1. Finally, the Kiosk displays a confirmation message and completes the Blueprint transition.

  2. If no suitable engineer is found, the Kiosk notifies the dispatcher, preventing the transition from completing until the assignment can be handled manually.

This approach ensures that every Service Application is assigned to the best-fit, least-loaded engineer while keeping the implementation entirely within native CRM components. 

Implementation

Step 1: Create a Query to Update the Field Engineer Lookup in Service Application Module

  1. Navigate to Setup -> Developer Hub -> Queries.
  2. Click Create Query, provide a name, and click Next. 
  3. In the Query Workbench, select Zoho CRM REST API as the Source. 
  4. Set the Request Method to PUT. 
  5. Specify the relative path for the Update Records API, passing the Service Application record ID as a variable. 
    /v8/Service_Applications/{{service_record_id}}

  6. Select Raw as the Body Type.
  7. Enter the following request body. The Kiosk dynamically populates the lookup field values. 
    {
     "data": [
     {
     "id": "{{service_record_id}}",
     "Field_Engineer": {
     "id": "{{engineer_id}}",
     "name":"{{engineer_name}}"
     }
     }
     ]
    }

  8. Provide the code to the Serializer to format the response according to your requirements. If the result contains data it will return "Field Engineer Assigned".
    const apiResult = result?.data?.[0] ?? {};

    return [{
     Message: "Field Engineer Assigned" ?? "Engineer Lookup Field Update Failed"
    }];

  9. Click Execute Query to verify the request and Save the Query.
      

Step 2: Create a Kiosk to Retrieve and Assign the Field Engineer

Create a Kiosk that retrieves the most suitable engineer and updates the Field_Engineer lookup field during the Blueprint transition.
  1. Navigate to Setup -> Customization -> Kiosk Studio
  2. Click Create Kiosk
  3. Provide a name and click Next
  4. Select Service Applications as the current module.


Add a Get Records state

  1.  Add a Get Records state and name it Get Suitable Field Engineer. 
  2.  Associate the Query that retrieves Field Engineers based on:
    1.  Zone 
    2.  Specialization 
    3.  Active status 
  3. Sort the results by Active_Request_Count in ascending order so that the least-loaded engineer is returned.  

Add a Decision state

  1.  Add a Decision state after the Get Records state. 
  2.  Name the decision Engineer Found. 
  3.  Configure the condition to check whether the Query returned a matching engineer. 
  4.  Create two paths: 
    1. Assign Engineer
    2. Default


Configure the Assign Engineer path

  1.  Add a Screen to the Assign Engineer path. 
  2.  Click Add and select Get data via Queries. 
  3.  Click New Query and associate the Query created in Step 1. 
  4. Map the required variables from the Get Records response and the current record. 
  5.  Select the fields to display on the screen. 
  6.  Click Save, and then Done

Configure the Default path

  1.  Add another Screen to the Default path. 
  2. Display an appropriate message, for example: "No matching service engineer is currently available. Please assign an engineer manually to continue".
  3.  Click Publish to save the Kiosk.

Step 3: Associate the Kiosk with the Blueprint Transition

Associate the Kiosk with the Assign Engineer Blueprint transition so that it is launched automatically whenever the transition is executed.
  1. Navigate to Setup > Process Management > Blueprint.
  2. Open the Blueprint created for the Service Applications module.
  3. Select the Assign Engineer transition.
  4.  Click Add(+) in the During tab.
  5. Choose Kiosk from the list of associated items.
  6. Select the Map Service Engineer Kiosk that you created in the previous step.
  7. Save the Blueprint.



The Outcome

When a user creates a Service Application, the record is initially created in the Open state. The Assign Engineer Blueprint transition is then available for execution. When the user clicks the Assign Engineer transition, the associated Kiosk launches automatically. The Kiosk retrieves the most suitable Field Engineer based on the application's Zone and Specialization, updates the Field_Engineer lookup field on the Service Application, and completes the assignment. If no matching engineer is found, the Kiosk displays an appropriate message, preventing the transition from proceeding until the assignment is handled manually.

We hope you found this post useful. 
We would love to hear from you! Write to us at support@zohocrm.com.

Happy Querying!




    • Sticky Posts

    • Kaizen #198: Using Client Script for Custom Validation in Blueprint

      Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Kaizen #226: Using ZRC in Client Script

      Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
    • Kaizen #222 - Client Script Support for Notes Related List

      Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
    • Kaizen #217 - Actions APIs : Tasks

      Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
    • Kaizen #216 - Actions APIs : Email Notifications

      Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are
    • Recent Topics

    • LinkedIn RSC is now live in Zoho Recruit

      LinkedIn Recruiter System Connect (RSC) is here. Your Zoho Recruit data (candidates, jobs, notes, stage updates, resume attachments, and more) now syncs with LinkedIn in real time. Note: LinkedIn RSC is included with your LinkedIn Recruiter Corporate
    • Is there a way to show contact emails in the Account?

      I know I can see the emails I have sent and received on a Contact detail view, but I want to be able to see all the emails that have been sent and received between all an Accounts Contacts on the Account Detail view. That way when I see the Account detail
    • Managing Shopify Payout Balances in Zoho Books

      I am recording my Shopify orders as Invoices and once Shopify credits my bank account I reconcile the payout to the specific invoices and create a new transaction to account for the Shopify Merchant Fee. That is fairly straightforward to me. How should
    • Charging for WhatsApp replies starting in October 2026

      Meta has announced that it will charge for reply messages on WhatsApp starting October 1, 2026, and the free 24-hour window will no longer exist. How will Zoho SalesIQ handle this billing? https://developers.facebook.com/documentation/business-messa
    • Upcoming Change: Increased character limits for module and field labels

      To provide greater flexibility in customizing your CRM, we are increasing the maximum character limits for module labels and field labels in Zoho CRM. What's changing? Label Current Limit New Limit Module Label 25 characters 50 characters Subform Module
    • Creating Email template that attaches file uploaded in specific field.

      If there's a way to do this using Zoho CRM's built-in features, then this has eluded me! I'm looking to create a workflow that automatically sends an email upon execution, and that email includes an attachment uploaded in a specific field. Email templates
    • SPAM (and some other) folders missing on three of my Zoho Mail accounts

      I have four email accounts with Zoho Mail. Three days ago, the Spam folder on three of these accounts vanished. It is gone on the Windows and Linux desktops as well as the web-based and Android versions, and I have tried it on multiple machines. The only
    • Cliq iOS can't see shared screen

      Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
    • Error 1011 saving website personalisation — blocking all changes (corrupted "home_page.content" field)

      When trying to save changes under Settings → Brands → MY COMPANY → Website → Personalisation → Messenger, I receive the following error: "Either the request parameters are invalid or absent" upon checking on the developer console of the browser I get
    • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

      Availability Update: 29 September 2025: It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition exclusively for IN DC users. 2 March 2026: Available to users in all DCs except US and EU DC. 24
    • Zoho CRM - Email/Message icon for Deal List View

      Hi Team, My idea is to include a message icon at the start of the row of Deals when an unread message has been received. This would really help highlight the Deals where urgent action is required. Thanks for considering this request. Regards, Ashley
    • CRM x WorkDrive: We're rolling out the WorkDrive-powered file storage experience for existing users

      Release plan: Gradual rollout to customers without file storage add-ons, in this order: 1. Standalone CRM 2. CRM Plus and Zoho One DCs: All | Editions: All Available now for: - Standalone CRM accounts in Free and Standard editions without file storage
    • HR Helpdesk Cases

      We have Zoho One Enterprise. I'm trying to find HR Helpdesk Cases, but my UI does not match the documentation. I'm not sure how to move forward.
    • Tip #7 - Siri shortcuts in Zoho CRM

      Hello Everyone, Here is a tip about the 'Siri Shortcuts' feature and how it works in the iOS version of the Zoho CRM mobile app. What are Siri shortcuts? Siri Shortcuts are quick actions across your apps on iOS. They can perform an action automatically
    • Automatic Department and Employee Sync Between Zoho One and Zoho People

      Dear Zoho Support, I'm writing to propose a valuable feature request that would streamline data management and improve user experience within the Zoho ecosystem: automatic synchronization between departments and employees in Zoho One and Zoho People.
    • Nothing triggers a Journey

      I have been on the phone with Zoho support and they claim their development team needs to investigate more. However, I've found this is a pretty standard answer after a call takes any amount of time. After that, it's days and even weeks before it actually
    • Manually Backorder Sales Order and/or Change Sales Order Status

      Is there an option to manually 'backorder' a sales order, or otherwise change it's status?  In some cases, we receive orders for products that are out of stock, but we already have issued POs to our suppliers for replenishment.   Ex- we created a PO on
    • Backorder process review - Automating Removal of Sales Order from "On Hold" When PO is Received

      Hello Zoho Inventory Team, Currently, sales orders in On Hold status are released only when the bill for the purchase order is created. In our workflow, it would be much more efficient if the sales order could automatically move out of On Hold as soon
    • Kaizen #254 - Building a Temporal Lead Score Decay System in Zoho CRM

      Hello, CRM Wizards! Welcome to a fresh week of Kaizen. In this post, we will build a temporal lead score decay system that works alongside your existing scoring rules by introducing percentage-based score decay driven solely by customer inactivity. By
    • Metadata API Access to Functions

      I think it would be incredibly helpful to have api access to every function's code. Our team primarily uses deluge functions to update fields across modules according to business logic. I would like to create a visual dependancy model for our CRM, but
    • API actions/approvals endpoint returns UNAPPROVABLE despite user having full permissions and being the assigned approver

      Hi Team, We are trying to programmatically approve a record via the CRM API but consistently receive an UNAPPROVABLE error, even though the same user can approve the record without issue from the UI. Endpoint called: POST https://www.zohoapis.com/crm/v6/{module}/{record_id}/actions/approvals
    • Get a realistic picture of your revenue with Forecast Adjustments in Zoho CRM

      #crm25q1 Dear Customers, We hope you're doing well! Today, we're here with an important enhancement for business decision makers: forecast adjustments. Let's get straight to it! With technology on the rise and CX at its core, businesses are constantly
    • I am not able to check in and checkout in zoho people even location access allowed

      This issue i am facing in mackbook air m1, I allowed location in chrome browser and i also tried in safari but getting similar issue. Please have a look ASAP.
    • WhatsApp Vendors Module

      Hello, so WhatsApp works with the below, mainly with the customer side modules. Can we get functionality on the vendor side modules, i.e., PO, Bills, Vendor Credits, Payments Made, Purchase Received? WhatsApp is often the preferred method of communication
    • Upload ticket attachments via Drag-&-Drop

      Hello, if you want to upload a file to the ticket attachment you need to click the button and use the file browser to select and upload the desired file. In many cases, it would be much more efficient if you could simply drag the file to the browser window...
    • Introducing parent-child ticketing in Zoho Desk [Early access]

      Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
    • Elevate your Radar experience: Best practices part 3

      In the Spotlight: Zoho Desk's Radar app Customer support requires human intelligence combined with emotional intelligence. How about these coupled with contextual intelligence? These elevate the customer support experience. When providing support through
    • Migrating my email from GMAIL to ZOHO MAIL..........

      I am a long time GMAIL user and I really only understand how they operate, but after reviewing your tutorials and forums online, it is quite unbelievable how much more and how much more streamlined ZOHO mail is, not to mention ZOHO's wonderful, more advanced capabilities. I do have several questions about transitioning over to ZOHO.  Primarily, where is the best place to start, what do I do first? And how hard is it actually to move all my business and personal accounts over here?  When I sign up
    • Unable to send message;Reason:553 Relaying disallowed. Invalid Domain

      Hi, Now when I try to reply to an email, I see the Unable to send message;Reason:553 Relaying disallowed. Invalid Domain voicemessagedownloader.com error. I tested sending an email when I set it up in the past and it worked. I have checked the Zoho Organization
    • RFID Scanner/Adapter Solution for barcode scanning

      Hello, We will be trialing using barcode scanning for item verification during our picking process. Using a phone or a tablet is awkward and uncomfortable. Are there any Zoho compatible RFID scanners, or an RFID device/adapter that will connect with a
    • Approval Process not retriggering after rejection when stage is manually changed back

      We have an Approval Process on the Opportunities module that triggers when Stage is changed to Negotiation (Execute on: Edit Only). On rejection, a field update action reverts Stage back to Proposal. The issue: after rejection, AE can manually changes
    • Free Webinar Alert! Workdrive + Office Suite in Zoho Workplace: Create, co-edit and collaborate

      Hello Zoho Community! Looking for a better way to create, manage, and collaborate on your business documents? Join our upcoming webinar to discover how Zoho WorkDrive and the Zoho Office Suite (Writer, Sheet, and Show) help teams to work together from
    • Updating Sales orders on hold

      Surely updating irrelevant fields such as shipping date should be allowed when sales orders are awaiting back orders? Maybe the PO is going to be late arriving so we have to change the shipment date of the Sales order ! Not even allowed through the api - {"code":36014,"message":"Sales orders that have been shipped or on hold cannot be updated."}
    • Two-Factor Authentication in Zoho Mail: Add an extra layer of security to your organization

      Account security is a critical aspect of managing any organization's email. With increasing risks of unauthorized access, a single password may not always be sufficient to keep accounts protected. Zoho Mail's Two-Factor Authentication (TFA) addresses
    • Dark Mode - Font Colors Don't Work

      When editing a document in Dark Mode and selecting font colors, they don't show up on screen.  Viewing/editing the same document in Light Mode shows them just fine.
    • API to post drafts for social media

      I we want to post draft posts to our zoho social account and then approve and schedule them within Zoho social. is this possible with for example: https://apis.zoho.com/social/v2/post TIA Jon
    • How to show product cards in your chatbot

      Hey everyone, If you are using Guided Conversations to help customers find products, you have probably run into this problem: the bot gives customers a list of options, but they still have no idea which one to pick. There will be no images, no specs,
    • Changing settings for auto logoff

      I've noticed that when I haven't used Cliq for a while, I have to re-enter my password. That is really clumsy, especially if you have a complicated password. Because it won't be filled in automatically. Is there a way to change that behaviour? We are
    • How do you create invoices before sending them through Zoho Invoice?

      Hi everyone, I'm curious how other businesses handle their invoicing workflow before sending invoices through Zoho Invoice. Do you: Create invoices directly inside Zoho? Prepare them first in another invoice tool or template? Use Excel or Word before
    • ZML Error/Bug

      Hi, I would like to request for your help regarding this kind of behavior. Requested_Start_Time & End_Time - date-time fields https://......#Page:PH_Calendar_Page?reqDate=08-04-2026 https://......#Page:PH_Calendar_Page?reqDate=07-31-2026 https://....#Page:PH_Calendar_Page?reqDate=08-03-2026
    • Next Page