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











                              Zoho Developer Community





                                                    • Desk Community Learning Series


                                                    • Digest


                                                    • Functions


                                                    • Meetups


                                                    • Kbase


                                                    • Resources


                                                    • Glossary


                                                    • Desk Marketplace


                                                    • MVP Corner


                                                    • Word of the Day


                                                    • Ask the Experts





                                                              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 Writer

                                                                                                Get Started. Write Away!

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

                                                                                                  Zoho CRM コンテンツ




                                                                                                    Nederlandse Hulpbronnen


                                                                                                        ご検討中の方




                                                                                                              • Recent Topics

                                                                                                              • Session Expired

                                                                                                                I constantly get "Session Expired" and need to relogin or close and open the application again. This gets really frustrating during the day. Is this something that can be solved? This really makes me want to leave the app as it is no go to need to reopen
                                                                                                              • Connecting two modules - phone number

                                                                                                                Hi, I’d like some guidance on setting up an automation in Zoho CRM that links records between the Leads module and a custom module called Customer_Records whenever the phone numbers match. Here’s what I’m trying to achieve: When a new Lead is created
                                                                                                              • Employee type and source translation

                                                                                                                In Zoho People, when I fill in the employee’s information, there is the option to determine the type of employment (employee type) and the hiring source. Both options ALWAYS appear in English. It is extremely inconvenient to deal with poorly translated
                                                                                                              • Sync Issue Between Zoho Notebook Web App on Firefox (PC) and Android App

                                                                                                                Hi Zoho Notebook Community, I'm facing a sync problem with Zoho Notebook. When I use the web version on Mozilla Firefox browser on my PC, I create and save new notes, and I've synced them successfully. However, these new notes aren't showing up in my
                                                                                                              • Request for Clarity on Timeline for True GPT/Zia Auto-Response Capabilities

                                                                                                                I appreciate Zoho’s steady innovation, but I’m concerned that Desk and Zia remain well behind modern AI capabilities. For years, GPT-based tools have been able to generate and send contextual responses, yet Zoho Desk only supports summarization or suggested
                                                                                                              • Notebook audio recordings disappearing

                                                                                                                I have recently been experiencing issues where some of my attached audio recordings are disappearing. I am referring specifically to ones made within a Note card in Notebook on mobile, made by pressing the "+" button and choosing "Record audio" (or similar),
                                                                                                              • In arattai received message can't be deleted

                                                                                                                The issue has been noticed in following: arattai app (Android) arattai app (Window) arattai web While the message posted by me may be deleted, the ones received from others can't be. The item <Delete> change to <Report> when the message is a received
                                                                                                              • Transitioning to API Credits in Zoho Desk

                                                                                                                At Zoho Desk, we’re always looking for ways to help keep your business operations running smoothly. This includes empowering teams that rely on APIs for essential integrations, functions and extensions. We’ve reimagined how API usage is measured to give
                                                                                                              • Has anyone built a ticket export that allows Help Center users to export the tickets shown in the My Area list they are looking at?

                                                                                                                Hi, We are moving to Zoho Desk soon. Our current support system displays an option in our help center allowing customers to export their Open, Closed, or all tickets based on which list they are looking at. We need to offer the same in Zoho Desk help
                                                                                                              • Has anyone integrated SMS well for Zoho Desk?

                                                                                                                Our company does property management and needs to be able to handle inbound sms messages which create a ticket for Zoho Desk. We then need to be able to reply back from Zoho desk which sends the user an sms message. This seems like a fairly common thing
                                                                                                              • Two factor authentication for helpdesk users

                                                                                                                The company i work for wants use the helpdesk site in Zoho desk, as a place for their distribution partners to ask question and look for information about our product. The things there is suppose to go up there is somewhat confidential between my company
                                                                                                              • Zoho Desk: Q2 2025 | What's New

                                                                                                                Hello everyone, We are excited to announce Zoho Desk's 2025 Autumn updates. This release brings new features and enhancements that improve work management and enable businesses to provide a better overall support experience. Spanning from Zia Agents to
                                                                                                              • Change text in help desk

                                                                                                                Hi, Please let me know how can i change the this text, see screenshot.
                                                                                                              • Items Below Reorder Point Report?

                                                                                                                Is there a way to run a report of Items that are below the Reorder Point? I don't see this as a specific report, nor can I figure out how to customize any of the other stock reports to give me this information. Please tell me I'm missing something s
                                                                                                              • Blog Widget: Show recent blog posts on my homepage

                                                                                                                Hey there I am using the Zoho Sites Blog feature. On my homepage, on the bottom I'd like to have a featured content section where I show some of my blog posts (selected, most recent, filtered by category and so on...). It would be nice to have a blog
                                                                                                              • Resume Harvester: New Enhancements for Faster Sourcing

                                                                                                                We’re excited to share a set of enhancements to Resume Harvester that make sourcing faster and more flexible. These updates help you cut down on repetitive steps, manage auto searches more efficiently, and review candidate profiles with ease. Why we built
                                                                                                              • Committed Stock and To Be Received Stock via API?

                                                                                                                Is it possible to retrieve Committed Stock and/or To Be Received Stock for an Item via the API? I want to use this information for calculating the amount of inventory needed to be purchased.
                                                                                                              • What if I dont see contacts on the left side list

                                                                                                                My CRM does not show the contacts tab. In order to create list this is needed and I cant find it.
                                                                                                              • Enable / show scroll bar when Mega Menu is opened

                                                                                                                Hey there I am using the mega menu add-on and experience a "flicker" whenever the mega menu opens. The reason is, that the scrollbar, which has a width of a few pixels, stops showing when the mega menu opens. As the scrollbar disappears the whole page
                                                                                                              • Open Activities view.

                                                                                                                I really like the new views for the open and closed activities inside the deals. But when you are in the tab view instead of the column view you can only complete and edit the open activity there isn't the 3 dot option to be able to delete the activ
                                                                                                              • Notes Attachments

                                                                                                                Two things it would be nice to have the attachment size the same as the attachments sections and it would be nice to be able to attach links like you can in the attachments section. Thank you
                                                                                                              • Experience effortless record management in CRM For Everyone with the all-new Grid View!

                                                                                                                Hello Everyone, Hope you are well! As part of our ongoing series of feature announcements for Zoho CRM For Everyone, we’re excited to bring you another type of module view : Grid View. In addition to Kanban view, List view, Canvas view, Chart view and
                                                                                                              • Zoho Books | Product updates | October 2025

                                                                                                                Hello users, We’ve rolled out new features and enhancements in Zoho Books. From iOS 26 updates to viewing reports as charts, explore the updates designed to enhance your bookkeeping experience. Zoho Books Updates for Apple Devices At WWDC 2025, Apple
                                                                                                              • Improved RingCentral Integration

                                                                                                                We’d like to request an enhancement to the current RingCentral integration with Zoho. RingCentral now automatically generates call transcripts and AI-based call summaries (AI Notes) for each call, which are extremely helpful for support and sales teams.
                                                                                                              • Cannot reject empty expense report

                                                                                                                Hello, We are currently having issues with two empty expense reports where if we try to reject them, either manually or through the REST API, we get error 114016, which says some of the expenses have already been billed and must be removed. I'd appreciate
                                                                                                              • Having Trouble Opening The Candidate Portal

                                                                                                                Recently am having trouble opening the Candidate Portal. It keeps loading but cannot display any widgets. Tried Safari, Chrome and Edge. Non of them work. Please solve the problem ASAP.
                                                                                                              • Checkboxes not adhering to any policy in mail merge - data from CRM

                                                                                                                I want checkboxes to appear depending on whether the checkbox in the CRM module is ticked or not. However, the tickboxes that appear are either ticked or not, but don't correlate to the actual selections in the CRM module. This is is despite updating
                                                                                                              • Items Landed Cost and Profit?

                                                                                                                Hello, we recently went live with Zoho Inventory, and I have a question about the Landed Cost feature. The FAQ reads: "Tracking the landed cost helps determine the overall cost incurred in procuring the product. This, in turn, helps you to decide the
                                                                                                              • Posibility to add Emoticons on the Email Subject of Templates

                                                                                                                Hi I´ve tried to add Emoticons on the Subject line of Email templates, the emoticon image does show up before saving the template or if I add the Emoticon while sending an Individual email and placing it manually on the subject line. Emoticons also show
                                                                                                              • Show elapsed time on the thank-you page?

                                                                                                                Is it possible to display the total time a user spent filling out a Zoho Form on the thank-you? I’d like to show the difference between the `form submission timestamp` and the `start time` (currently have a hidden Date-Time field set to autofill the date
                                                                                                              • CC and/or BCC users in email templates

                                                                                                                I would like the ability to automatically assign a CC and BCC "User (company employee)" into email templates. Specifically, I would like to be able to add the "User who owns the client" as a CC automatically on any interview scheduled or candidate submitted
                                                                                                              • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

                                                                                                                The address field will be available exclusively for IN DC users. We'll keep you updated on the DC-specific rollout soon. It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition. Managing addresses
                                                                                                              • Create Contract API Endpoint Unclear "inputfields" Requirements

                                                                                                                Hello, I'm trying to create a Deluge function that accepts inputs from a form in Zoho Creator and creates a barebones contract of a given type. See below for the current code, cleaned of authentication information. // Fetch form data // Hidden field client_name
                                                                                                              • Create custom rollup summary fields in Zoho CRM

                                                                                                                Hello everyone, In Zoho CRM, rollup summary fields have been essential tools for summarizing data across related records and enabling users to gain quick insights without having to jump across modules. Previously, only predefined summary functions were
                                                                                                              • Kaizen #46 - Handling Notes through Zoho CRM API (Part 1/2)

                                                                                                                Hello everyone! Welcome back to another week of Kaizen! This week, we will discuss Handling Notes through Zoho CRM API. What will you learn from this post? Notes in Zoho CRM Working with Notes through Notes APIs 1. Notes in Zoho CRM 1a. Why add Notes to records? Notes are a great way to summarize your observations on customer and prospect interactions and outcomes. By saving notes as CRM data, a sales rep will always be able to keep track of how a sale is progressing. To know more about notes in
                                                                                                              • Marketer's Space - Why email marketing matters in ecommerce (and how to get started with Zoho Campaigns)

                                                                                                                Hello Marketers, Welcome to this week's Marketer's space post. Today, we'll discus why email marketing matters in ecommerce businesses. Running an online store is exciting but challenging. If you're running an online store, you've probably experienced
                                                                                                              • Zoho Campaigns Event timestamps do not propagate to Zoho CRM

                                                                                                                We have integrated Zoho CRM and Zoho Campaigns. But when looking at Contact records, the Campaign event data is missing the actual timestamps: especially when a particular email was sent. They're not in the Campaigns related list, and the cannot be found
                                                                                                              • Kaizen #121 : Customize List Views using Client Script

                                                                                                                Hello everyone! Welcome back to another interesting Kaizen post. In this post, we can discuss how to customize List Views using Client Script. This post will answer the questions Ability to remove public views by the super admin in the Zoho CRM and Is
                                                                                                              • 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
                                                                                                              • In place field editing for candidates

                                                                                                                Wondering about any insight/best practices for efficiently updating candidate records while reviewing them in a Job Opening pipeline. We can do in-field editing (e.g. update job title or City) only when we have the full candidate record open, however
                                                                                                              • Next Page