Kaizen #166 - Handling Query Variables in Zoho CRM

Kaizen #166 - Handling Query Variables in Zoho CRM


Hello, Code Enthusiasts! 

Welcome to another week of Kaizen!

This week, we'll dive into handling variables in Zoho CRM Queries and see how they can be deployed in Kiosk to dynamically retrieve data. This technique is especially useful for integrating data from third-party applications or CRM itself into your custom interface, such as Canvas and Kiosk. 

Variables

Variables are placeholders in Queries that are replaced with real values at runtime. Instead of hard coding data, you can use variables to make your Queries flexible and reusable.

Syntax: {{Variable_Name}}

Query variables in Zoho CRM function differently from conventional Zoho CRM variables. While CRM variables act as containers for dynamic values that can be stored and reused anywhere within the organization, query variables are designed to receive their values at runtime.

Query variables enhance flexibility and are specifically used in:
  • COQL: To dynamically filter and retrieve data.
  • REST API: For runtime data fetching based on specific parameters.
  • Query Criteria: To define conditions dynamically for fetching records.

How to Use a Variable?

To use variables, ensure the fields providing the variable values are available in the context where the Query is executed.

Let’s say you want to evaluate a marketing campaign's performance. For this, you need to fetch all leads with a specific lead source. Since each campaign is associated with a different lead source, you can define the lead source as a variable. When viewing a campaign's details, the lead source will be passed dynamically to the Query.

Business Scenario : Nearby Delivery Hubs

Imagine a telecommerce platform using Zoho CRM to manage sales and deliveries. When a customer provides their PIN code, the salesperson must confirm with the customer for a nearby post office for package pick-ups and drop-offs in Kiosk.

With Zoho CRM Queries, you can achieve this by dynamically fetching the nearby post offices list based on the customer's PIN code and displaying it on the Contact record’s detail page. Here's how to set it up using the Kiosk feature.

Setting Up the Query in Kiosk

1. Access Kiosk Studio

  • Log in to Zoho CRM.
  • Go to Setup > Customization > Kiosk Studio and click Create Kiosk.

2. Configure the Current Module

  • Choose the module where the Kiosk will be deployed.
    For this example, select Contacts to use the PIN code from the Contact record.

  • Configuring this Current Module is mandatory to use variables from the current record. 

3. Add a Screen

  • Click the + icon on the flowchart and select Screen.
  • Name the screen and click Add.

4. Add a Query

  • Under Display Elements, choose Get Data Via Queries.
  • Click New Query and then Add Query to create a new one.

5. Set Up the Data Source

  • Any custom source has to be enrolled either in the Trusted Domains or in the Connections. For demo, 
  • In the Add Query pop-up, click Source and create a new source.
    For this demo, we’ll add India Post to fetch post offices based on PIN codes.
  • Add default Headers and Parameters to the source if any. This will be added by default whenever the source is used in a query. 

6. Define the Query

  • In the Information section, provide the query’s Name and API Name to refer to the query wherever needed.
  • Use the endpoint URL with a variable, e.g., https://api.example.com/post_offices/{{Mailing_Zip}}.
  • You can add headers and parameters specific to the query, but let us skip that for the demo. 
  • Add a JavaScript serializer to process the Query response. For our case, we will serialize the response with return result[0].PostOffice;
  • You can test your serializer with the help of Preview. Once finished, provide a test value to the variable for generating Schema for the Query Response.
    The test value you provide is temporary and not permanent. The value of a variable will be declared using merge fields when you associate the query with a component. Check Step 7 to know how it is used in our demo. 

    You can also manipulate the response by changing data types of keys in the raw response. To keep the demo simple, let's go with the raw response. 

7. Link the Query to Kiosk

  • Use Dynamic Parameters to map the variable to the Mailing Zip field from the Contact record. Enter # to merge the fields. 
  • In Choose Fields, select which data to display in the Kiosk.
  • You can further manipulate the query response in the Record Preferences section.
    Select your preference to view the response as a Single Record or Multiple Records.
    • For Single Record, choose the data that has to be displayed from the query response and click Save.
    • For Multiple Records, fill in the following details as shown in this image. 
    • The Selection Limit helps you with the maximum number of records that have to be chosen in the kiosk after publishing. 
    • Identifier field functions as the primary field to identify each record. 
    • In the fields section, choose the data that has to be displayed from the query response.

  • Customize the Kiosk button and click Done to save your configuration.
  • 8. Test and Publish

    Test the Kiosk using a sample Record ID from the Contacts module. If successful, the list of nearby post offices will display in an iframe as it would appear on the Contact detail page.


    Once satisfied, publish the Kiosk to make it live. 
    Let us check the Kiosk from the Contacts detail page. 

    Example Scenarios

    • Loan Approval: You can display a customer's CIBIL score using their Social Security Number (SSN) directly within a Canvas. The SSN serves as a runtime variable, allowing you to approve loans without manual data entry and shifting tabs.
    • Customer Support: In a Records Detail View kiosk, display all high priority tickets linked to an account. The current account's ID acts as a runtime variable, ensuring that support agents have immediate access to relevant queries and resolve issues faster.
    • Insurance Verification: In a Records Detail View kiosk, the customer's ID proof number can be used to verify their details on official government sites. The ID proof number dynamically functions as a variable, streamlining the insurance verification process.
    We hope you found this post informative and beneficial.

    If you have any queries or a topic to be discussed, reach out to us at support@zohocrm.com or drop your comments below. 

    Cheers!

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

      Access your files securely from anywhere

          All-in-one knowledge management and training platform for your employees and customers.






                                Zoho Developer Community




                                                      • Desk Community Learning Series


                                                      • Digest


                                                      • Functions


                                                      • Meetups


                                                      • Kbase


                                                      • Resources


                                                      • Glossary


                                                      • Desk Marketplace


                                                      • MVP Corner


                                                      • Word of the Day


                                                      • Ask the Experts



                                                                • 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


                                                                Manage your brands on social media



                                                                      Zoho TeamInbox Resources



                                                                          Zoho CRM Plus Resources

                                                                            Zoho Books Resources


                                                                              Zoho Subscriptions Resources

                                                                                Zoho Projects Resources


                                                                                  Zoho Sprints Resources


                                                                                    Qntrl Resources


                                                                                      Zoho Creator Resources



                                                                                          Zoho CRM Resources

                                                                                          • CRM Community Learning Series

                                                                                            CRM Community Learning Series


                                                                                          • Kaizen

                                                                                            Kaizen

                                                                                          • Functions

                                                                                            Functions

                                                                                          • Meetups

                                                                                            Meetups

                                                                                          • Kbase

                                                                                            Kbase

                                                                                          • Resources

                                                                                            Resources

                                                                                          • Digest

                                                                                            Digest

                                                                                          • CRM Marketplace

                                                                                            CRM Marketplace

                                                                                          • MVP Corner

                                                                                            MVP Corner









                                                                                              Design. Discuss. Deliver.

                                                                                              Create visually engaging stories with Zoho Show.

                                                                                              Get Started Now


                                                                                                Zoho Show Resources

                                                                                                  Zoho Writer

                                                                                                  Get Started. Write Away!

                                                                                                  Writer is a powerful online word processor, designed for collaborative work.

                                                                                                    Zoho CRM コンテンツ






                                                                                                      Nederlandse Hulpbronnen


                                                                                                          ご検討中の方




                                                                                                                  • Recent Topics

                                                                                                                  • Nome do Agente não aparece nas conversas do whatsapp para o nosso cliente

                                                                                                                    Nome do Agente não aparece nas conversas do whatsapp para o nosso cliente! Isso é ruim pois so,os em 5 agentes e o cliente fica sem saber com quem ele está falando, pois tentei procurar configurações que pudessem ter esta opção, mas até então não encontrei.
                                                                                                                  • Marketing Plus : quatre ans à réinventer la simplicité des opérations marketing

                                                                                                                    Pourquoi et comment ? Il y a exactement quatre ans, nous avons démarré simplement, avec une seule vision: unifier et simplifier les opérations marketing pour les équipes marketing de tous les secteurs. Chez Zoho, nous proposons des outils dédiés à chaque
                                                                                                                  • hide resolution from help centre

                                                                                                                    to my surprise, i just found out that the resolution text is public in the helpcenter, even if 'notify customer' is off. is there a workaround to that? how do others deal with this? How zoho support does this and I don't think its used by Zoho in the first place. the resolution is meant to be private, not public
                                                                                                                  • Zoho Desk - Event Calendar View

                                                                                                                    Hi Desk team, Are there any plans to introduce a calendar or timeline view for Events in Zoho Desk? It would be very helpful if we could see Events visually in a calendar and/or timeline. This is very helpful when desk side support activities need to
                                                                                                                  • Pasting Images in Zoho Desk ignores cursor location

                                                                                                                    My team has reported an issue which started recently where when we paste an image into a new or existing reply or comment, the pasted image seems to ignore the current cursor location instead paste itself at the last character present in the reply/comment,
                                                                                                                  • Enrich your contact and company details automatically using the Data Enrichment topping

                                                                                                                    Greetings, I hope you're all doing well. We're happy to announce the latest topping we've added to Bigin: The Data Enrichment topping, powered by WebAmigo. This topping helps you automatically enhance your contact and company records in Bigin. By leveraging
                                                                                                                  • Financial manger

                                                                                                                    why is transaction locking for zoho I Can't closing period
                                                                                                                  • API usage

                                                                                                                    My application has bad implementation and code that is resulting in very high API usage. This is my first time experiencing something like this. Does anyone know how I can troubleshoot and fix this?
                                                                                                                  • Disabled page

                                                                                                                    Hello, When I try to to run Inventory Valuation Summary and FIFO Cost Lot Tracking reports, I get This page is disabled error. I tried everything in settings, cant find the settings to enable. Help me.
                                                                                                                  • Setting defaults for "Find and Merge Duplicate for..."

                                                                                                                    To remove some of the extreme tedium from Zoho's poorly implemented merge function, I would like to set defaults.  Currently I am defaulted to match "ANY" when I would never do that, so I always have to click "ALL". Then it makes me click on several totally irrelevant drop boxes to turn off phone, mobile and other useless match criteria. Is there a way I can set: Match to default as "ALL" Firstname to default to "IS" Lastname to default to "IS" every other match field default to "-NONE-" This will
                                                                                                                  • Linux agent 2026_M05 release notes

                                                                                                                    Agent Version: 3.6.5.3 Release date: 28 April, 2026 Major Enhancement: Quick Support feature release. Security improvements and enhancement to in session features.
                                                                                                                  • Automated Sales Order Fulfillment Based on Inventory Availability (Allocation / Commitment Modes)

                                                                                                                    Hi everyone, I recently reached out to Zoho Inventory support regarding a workflow challenge and wanted to share both the issue and their response here for visibility. Zoho confirmed: “Zoho Inventory does not currently support automatic notifications
                                                                                                                  • Linux agent 2026_M04 release notes

                                                                                                                    Agent Version: 3.6.5.2 Release date: 30 April, 2026 Code refactoring and improvements to function efficiently in minimal hardware environments.
                                                                                                                  • Simple Totals on all pages?

                                                                                                                    Hi there. I'm surprised this isn't implemented yet (since most other software has this by default). Can you display a simple total at the bottom of all invoice lists? ie: I click in SALES tab, select INVOICES and on that page please show us a simple total? Yes, I realize I can go the long way around and generate reports and select my date options and select the type of invoices etc...but honestly that shouldn't be necessary when just viewing a list of unpaid invoices and how much total is outstanding.
                                                                                                                  • Linux agent 2026_M03 release notes

                                                                                                                    Agent Version: 3.6.5.1 Release date: 27 February, 2026 Bug fixes and performance improvements for optimised session experience.
                                                                                                                  • Linux agent 2026_M02 release notes

                                                                                                                    Agent Version: 3.6.5.0 Release date: 26 February, 2026 Major enhancement: File Manager feature release Issue fixing of idle session timing interfering with backend activities.
                                                                                                                  • Linux agent 2026_M01 release notes

                                                                                                                    Agent Version: 3.6.4.8 Release date: 13 February, 2026 Optimised the unattended agent uninstallation process to properly cleanup residual files and complete uninstallation process. Fixed issues with CTRL+ALT+DEL command not functioning properly in some
                                                                                                                  • Using API for multiple organizations

                                                                                                                    I am busy building an app to load data from a retailer into Zoho Books. We are planning on selling the app to multiple organizations that use this retailer. Is there a way to get a single oauth app to access multiple organizations? From what I can find
                                                                                                                  • MacOS agent 2026_M04 release notes

                                                                                                                    Agent Version: 3.120.0 Release date: 23 April, 2026 Retry mechanism for end users to enable Accessibility and Screen Share permissions to successfully join remote sessions. Agent stickiness on multiple desktops to avoid confusion. Improvements to audio
                                                                                                                  • MacOS agent 2026_M03 release notes

                                                                                                                    Agent Version: 3.117.0 Release date: 02 March, 2026 Bug fixes and performance improvements for optimised session experience.
                                                                                                                  • MacOS agent 2026_M02 release notes

                                                                                                                    Agent Version: 3.116.0 Release date: 23 February, 2026 Major enhancement: File Manager feature release Minor enhancement: Improved peer to peer connectivity across various network conditions. Minor enhancement: Improvements to Elevate to Admin mode
                                                                                                                  • MacOS agent 2026_M01 release notes

                                                                                                                    Agent Version: 3.111.0 Release date: 11 February, 2026 Major Enhancement: Quick Support feature release. Upgrades to monitoring protocols for analysing performance. Issue fixing of idle session timing interfering with backend activities.
                                                                                                                  • Account Unblock Request

                                                                                                                    Dear Sir/Madam, I hope you are doing well. I noticed that my account has been blocked for violation of the usage policy which I believe comes from it being associated with sending spam. I have since then removed the old keys which were compromised in
                                                                                                                  • Kaizen #242 Enabling In-Context Order Creation from Deals Using SlyteUI

                                                                                                                    Hello everyone! Welcome to another interesting Kaizen post. Today’s spotlight is on SlyteUI, the new UI builder designed to create powerful, intuitive user interfaces in minutes. Built for speed and simplicity, SlyteUI empowers teams to deliver high-impact
                                                                                                                  • Auto-sync field of lookup value

                                                                                                                    This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
                                                                                                                  • CRM gets location smart with the all new Map View: visualize records, locate records within any radius, and more

                                                                                                                    Hello all, We've introduced a new way to work with location data in Zoho CRM: the Map View. Instead of scrolling through endless lists, your records now appear as pins on a map. Built on top of the all-new address field and powered by Mappls (MapMyIndia),
                                                                                                                  • Can't access google from toppings menu

                                                                                                                    So... When I click the manage button in toppings, nothing happens. it won't let me access the settings.
                                                                                                                  • Best sales insights for target accounts?

                                                                                                                    Question for all the sales power-users out there: I would like to gain insights from Zoho CRM for a rotating list of target accounts. Each Outside Salesperson has 5 target accounts, and they can change these targets quarterly with management approval.
                                                                                                                  • Emails Disappearing From Inbox

                                                                                                                    I am experiencing the unnerving problem of having some of the messages in my inbox just disappear.  It seems to happen to messages that have been in there for longer than a certain amount of time (not sure how long exactly). They are usually messages that I have flagged and know I need to act on, but have not gotten around to doing so yet.  I leave them in my inbox so I will see them and be reminded that I still need to do something about them, but at least twice now I have opened my inbox and found
                                                                                                                  • Cadence not stopping on reply (in some cases) – anyone else?

                                                                                                                    Hi everyone, we’ve noticed that in a few cases, Cadences don’t stop even though the contact replied (setting “stop on reply” is active). It works fine most of the time, but occasionally the reply is visible in CRM without stopping the Cadence. Our assumption
                                                                                                                  • Issue with Resume Parsing and Storage Limit in Zoho Recruit

                                                                                                                    Hello Team, We are currently facing an issue with resume parsing in Zoho Recruit. While parsing resumes, we are receiving a message indicating that the storage is full. We would like to delete multiple old resumes from the system to free up storage space.
                                                                                                                  • BUG: Related List Buttons with Client Script action now erroring

                                                                                                                    There appears to have been a bug introduced over the last few days with Related List buttons that invoke a Client Script action. Button configuration: Configured Client Script: Results: The default loader is presented at the top of the page, and an error
                                                                                                                  • SalesIQ Email Delivery Issues to Microsoft

                                                                                                                    Is anyone else having delivery issues to Hotmail, Outlook, and Live inboxes when sending transcripts and replies via email from SalesIQ? We’ve detected that emails sent from SalesIQ to these accounts aren't arriving—they don’t even bounce back; they simply
                                                                                                                  • Introducing the revamped What's New page

                                                                                                                    Hello everyone! We're happy to announce that Zoho Campaigns' What's New page has undergone a complete revamp. We've bid the old page adieu after a long time and have introduced a new, sleeker-looking page. Without further ado, let's dive into the main
                                                                                                                  • Multiple Pipelines

                                                                                                                    Is it possible to create multiple candidate pipelines?
                                                                                                                  • Insert Template not inserting

                                                                                                                    I have been using the "Insert Template" feature for years and I use it every single working day. Yesterday it was working fine. Today, on two different browsers (Chrome and Edge), I can select "Insert Template", select the template I want to insert, but
                                                                                                                  • Default ticket template in helpcenter

                                                                                                                    Hello, I have a web form and a ticket template created. How can I make that my default ticket template? If an user clicks New ticket or create a ticket, I want that template to be the default one. Thank you for the time and info.
                                                                                                                  • Zoho Books bill pay option not available with zoho one

                                                                                                                    Why isn't Zoho Books bill pay add-on not available for Zoho one customers not even as a purchasable option. I think this is very inconvenient for companies wanting to use this feature all in one system
                                                                                                                  • Access images from form submission in power automate

                                                                                                                    Images from form submission show up as links in power automate. How do I access the image data?
                                                                                                                  • Add personal Facebook to Zoho Social

                                                                                                                    Hi. is there any way i can post to my business and personal Facebook and Instagram at the same time when I make or schedule a post?
                                                                                                                  • Next Page