Kaizen 264 - Using zoho-crm Skill to Write Functions

Kaizen 264 - Using zoho-crm Skill to Write Functions



Hello CRM wizards,

Welcome back to another week of Kaizen.

In our previous Kaizens, we explored how the zoho-crm skill can assist you across various Zoho CRM developer tools. This time, let us see how it can help you write Deluge Functions, from simple workflow automations to complex integrations with third-party services. 

Since Deluge is a Zoho's exclusive scripting language, let's put the skill to test with three use cases of increasing complexity. We'll start with a basic field update, move on to querying CRM data, and finally explore an integration with Zoho Books. 

If you are starting new with the skill, check out Kaizen #258 on Getting Started with zoho-crm skill for more information.

Case 1: Automating a Simple Field Update

Let's start with a straightforward use case. 

Prompt 

Quote/zoho-crm Whenver the Phone field of a lead is populated or updated, automatically copy its value to the Mobile field.

Response



The skill identifies the appropriate approach which is a function triggered by a workflow rule. It generates Deluge code and provides the steps needed to put the solution into action. This includes instructions for creating the workflow rule, configuring its trigger and mapping the function arguments to the relevant fields. 

As a result, you get more than just a code snippet. The skill also guides you through the CRM configuration needed to make the function work. 

Info
Watch all the videos till the end to see the generated code in action.

Case 2: Identifying and Updating Stale Leads Using COQL

Now that we have covered a basic automation, let's introduce a little more complexity. This time, we'll use COQL to query CRM records and update them based on specific conditions. 

Prompt

Quote/zoho-crm Identify stale leads in Zoho CRM that have had no meaningful activity for more than 30 days and update their custom Lead Health field to “Stale”.

Response



Notice how the skill asks for additional information when the initial prompt doesn't provide enough details to implement the solution. Once the requirements are clarified, it generates the function code to indentify stale leads and update their Lead Health field.

It also guides you through the setup required to run the function, including creating a connection with the appropriate OAuth scopes and configuring a schedule. Before running the function, it recommends verifying that the field names and other details in the generated code match your CRM setup. 

There's another useful detail to look out for, which is the error handling. The generated code includes a failure-handling path that sends an email to the logged-in user if it cannot update a lead's health status. This helps notify the user when something goes wrong, making troubleshooting easier. 

You can also explicitly mention error handling in your prompts, and the skill can incorporate it into the generated code.

Notes
The skill generated codes are available on our github for your reference. 

Case 3: Creating Zoho Books Invoices from Zoho CRM

Let us take things up a notch and explore a use case involving third-party APIs. 

Prompt

Quote
/zoho-crm Need to create an invoice in Zoho Books when a Deal in Zoho CRM is closed with a stage Closed Won and save the invoice ID from the API response in the Deal's Invoice custom field.

1. Fetch the Deal's Stage, Account ID
2. Make a Related Records call and find the associated Quotes ID
3. Fetch the line items from the Quotes
4. Using the account ID find the Zoho Books customer ID
5. Create an invoice with the customer ID and line items
6. Update the invoice ID in the deal's Invoice field

connection link name : books_oauth_connection
Books Org ID: 131786026

Response



In this scenario, the function integrates Zoho CRM with Zoho Books to automate invoice creation for closed-won deals. The workflow involves retrieving the relevant CRM details, identifying the corresponding customer in Zoho Books, and using the required information to create an invoice. 

Unlike the previous examples, much of the function's logic depends on the responses returned by earlier API calls. The function must process those responses extract the necessary details and pass them to subsequent API requests. 

For complex use cases, the more context you provide, the better the skill can tailor the solution to your requirements. Describing the expected code flow, the sequence of API calls and the data to be passed between them can help reduce the need for multiple iterations. 

You can also refer the skill to relevant third-party API documentation help pages when you need it to follow specific API requirements. 

Notes
Note

The key is to start with a clear requirement, provide additional context when needed, and review and test the generated code before deploying it. The skill can help with both the implementation and the steps required to configure the function in Zoho CRM. 
We hope you find this kaizen helpful.

Have questions or suggestions? Drop them in the comments or write to us at support@zohocrm.com.

On to Better Building!

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Idea
Previous Kaizen: Using Zoho CRM Skill to Build Widgets | Kaizen Collection: Home
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    • Sticky Posts

    • Announcing the new SKILL.md for Zoho CRM and the updated OAS repository!

      We are introducing a new zoho-crm skill to make working with Zoho CRM Developer tools (like APIs, functions, widgets, client scripts, queries etc) easier and faster, with the help of AI in your preferred AI harness like Claude Code, Codex, Cursor, VSCode
    • Kaizen #261 : Using Zoho CRM Skill to generate complex COQL queries

      Hello everyone, In the previous Kaizen posts, we introduced the zoho-crm SKILL.md and discussed how it can help you when you are working with Zoho CRM APIs and Client Script. In this Kaizen, we will focus on using the Zoho CRM `SKILL.md` with GitHub Copilot
    • Kaizen #256 - Build an Arrival Readiness Web Tab in Zoho CRM

      Hi everyone! Welcome back to the Kaizen series! In the post, we discuss a use case in hospitality industry: how an Arrival Readiness web tab widget can be used to let reception staff identify and resolve issues before arrival of guests. Use case In the
    • 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
    • Recent Topics

    • Expanding sales, marketing, and support capabilities in Zoho CRM Plus 3.0

      Hey everyone, It's been more than 10 years since we launched Zoho CRM Plus back in 2014. This is quite a milestone, and we've come a long way in empowering you with everything you need to offer an exceptional customer experience. On that note, we expanded
    • Erase function in Zoho PDF editor does not truly redact

      Using the "erase" function in the Zoho PDF editor online does not redact the text underneath when opening the file in Adobe. When I used the erase function to whiteout the areas I didn't want to be seen, I opened the supposed redacted files in Adobe.
    • [ZohoDesk] Improve Status View with a new editeble kanban view

      A kanban view with more information about the ticket and the contact who created the ticket would be valueble. I would like to edit the fields with the ones i like to see at one glance. Like in CRM where you can edit the canvas view, i would like to edit
    • Error creating an XML file

      I am creating an xml as string in the function Employee.generatePartA_XML_String, and then I want to save it as a file to the field "Part_A_XML", but I get the response: {"code":3700,"message":"Unable to upload a file. Please check and try again."} How
    • Thunderbird cannot authenticate Zoho on android

      I keep getting a message from Thunderbird on Android that it could not authenticate for my account, dadashton@zoho.com., and to update my server settings. Now the settings are exactly the same for my other devices (1 Windows, 1 Mac and 2 Linux) Can anybody
    • Script to access a CBPX file from zoho crm

      Hello everyone, I'm planning to write a script in Python or Java in Zoho CRM functions, to access a CBPX file. Is it possible to write this script in the dev console of Zoho? What are the best practices to do this ? Would you have references in the Zoho
    • Mailchimp Integration

      Hello, I am needing some help. Does anybody have a recommended source for information on the Zoho-Mailchimp integration. We are working on a system to import large amounts of records into Zoho that will sync into Mailchimp for us to run a mail campaign out of. Let me explain what the process we are trying to implement - any information or advice is appreciated. Import record data base into Zoho Leads module --> use Lead source to ID records that are part of this mail campaign Zoho Leads (specific
    • [Free webinar] Zoho Creator meets AI with MCP | Creator Tech Connect (November 2026)

      Hello everyone, We are excited to invite you to another edition of the Creator Tech Connect webinar. About Creator Tech Connect The Creator Tech Connect series is a free monthly webinar consisting of purely technical sessions, where we dive deep into
    • Files in Teamspaces: keep your team's documents where the work happens

      Release Note: This feature is available for all accounts across all DCs Hello Everyone, A Teamspace is built around a specific team and a shared objective, and it holds the modules and projects that team works with every day. The document that team depends
    • Invalid Client - Client ID passed does not exist

      I tried connecting the Zoho campaign with the "Uncanny Automator". It shows an error " Invalid Client - Client ID passed does not exist". There is no option to add manual API. URL: https://accounts.zoho.eu/oauth/v2/auth?response_type=code&client_id=1000.MSFIUOA1G8YBK7IFRL9Z0NINM6DW9C&scope=ZohoCampaigns.contact.ALL&redirect_uri=https%3A%2F%2Fapi.automatorplugin.com%2Fv2%2Fzoho-campaigns&prompt=consent&access_type=offline
    • Field of Lookup - 5 Field Association Limit.

      This query relates to the post at: https://help.zoho.com/portal/en/community/topic/introducing-the-field-of-lookup-in-crm-public-early-access-2023 My simple (and common) scenario: I select an account / customer lookup and want their address pulled into
    • Task status - completed - other options

      I have a dumb question I know i can make custom statuses for the tasks - but is there anyway to make additional "completed" statuses like for instance if i have a task "call back customer" and i leave a vm for them to call back marking it "completed -
    • #20 I've Sent It and It's Wrong

      Meera spots a mistake in an invoice just four minutes after sending it. She has billed a photoshoot at the half-day rate instead of the full-day rate. Her first thought is to delete the invoice and start again. But is deleting the right thing to do? It
    • Unable to integrate Whatsapp Messaging into Zoho CRM - Business Messaging

      Hello, I want to set up Business Messaging in our Zoho CRM and am struggling to set it up. I have logged into the account and our facebook business page, our business shows in the dropdown for WhatsApp Business Account but does not for WhatsApp Business
    • Zoho Forms API

      Is there any way to get all form entry list using API? Looking forward to hear from you
    • BNZ Bank Feeds No Longer Available

      The BNZ (New Zealand) bank feeds are still failing and it's been months since they last worked! Uploading bank statements (CSV's) mean waiting to the end of the month when they become available. It is unacceptable to keep my clients waiting for payment
    • MCP is now easier to access and configure in Bigin

      Greetings! We hope you're all doing well. We've previously introduced Zoho MCP for Bigin, which lets you connect Bigin with AI tools and interact with your Bigin data using natural language. Now we're making MCP easier to access and configure directly
    • Launch agents from more custom button locations and attach files in Ask Zia

      Hello all, Your agents now meet your team where the work happens. You can add agents to custom buttons in list views, create and edit pages, and related lists, so users launch them without leaving the page they’re on. What’s new Agents in more custom
    • Phone system to integrate with Zoho CRM

      I am looking for phone software that would allow my agency to do the following within Zoho CRM: Make calls from zoho Track calls and notes Leave pre-recorded messages after reaching voicemail of lead Only 2 members, so need company who will allow just
    • Introducing PRM: Build, manage, and scale your partner ecosystem

      Growing a partner ecosystem is a good problem to have. What starts as a handful of partners can quickly turn into a maze of spreadsheets, emails, and disconnected processes. More partners mean more opportunities, greater reach, and new ways to grow
    • Zoho Projects connector with Zoho CRM (Related List module) features

      Hi community, I use Zoho Projects connected to Zoho CRM, where we associate Projects with Deals, clients, etc.. I am looking to change/edit the fields that are available in the integration. Currently it shows Project Status, Project Completion, Milestones,
    • Feature Request: Render Markdown (.md) files in Zoho Cliq

      Hi, We regularly share Markdown (.md) files in Zoho Cliq. However, when we open these files in Cliq, the content does not render as Markdown—it displays as plain text. This forces us to copy/paste the content into an external Markdown viewer to read it
    • Free webinar: Zoho Sign for Microsoft apps

      Hello, Did you know Zoho Sign works right inside the Microsoft apps you already use? A signature request shouldn't mean leaving Teams for another tab, or downloading an Outlook attachment just to sign it. Zoho Sign integrates with Microsoft 365, Teams,
    • Users can now notify the contact while adding a 'Resolution' to the ticket.

      Hello, In the latest version of the Desk iOS mobile app (v2.6.4), users can now notify the contact while adding a 'Resolution' to the ticket. Also, the 'Resolution' UI has been tweaked to support edit and delete option.   Please update the app either
    • Better Time Tracking

      We need better time tracking customization for IT MSPs. We also need reporting that is built in, rather than having to try and fumble with creating custom reports. We also need to be able to mark whether a ticket has been billed or not, I don't think
    • Introducing Custom Fonts for Career Sites

      Your Careers page is often the first place candidates interact with your organization. From exploring job opportunities to submitting applications, a consistent visual experience helps candidates recognize and connect with your brand. To give you more
    • Need help with importing expenses

      I'm using the template downloaded from the application. When I try to import my expenses, I get the message: Duplicate entry in the Expense Date column. Ensure it contains unique values. None of the rows will import. There are duplicate dates, but they
    • time tracking on zoho crm cases

      Is there a time tracking feature in zoho crm cases? I need calculate time spent in calls, tasks and events Thanks in Advance  
    • Integrate with Power BI

      Hi, How to connect Zoho CRM dashboards & reports with POWER BI ?
    • Unbundle feature for composite items

      We receive composite items from our vendors and sell them either individually or create other composite items out of them. So, there is a lot of bundling and unbundling involved with our composite items. Previously, this feature was supported in form
    • Trident Missing

      No way you guys get so close to having trident complete for over a year then just kill it off. Wow just wow
    • Zoho Recruit: Time to Step Up Your AI Game!

      I've been using Zoho Recruit for many years and I love it. But let's be honest, it's starting to feel a bit like a relic from the pre-ai era. I recently tried out new systems that have ai resume screening and ai interviewing capabilities, these systems
    • Zoho mail app throwing network error

      Zoho mail app is throwing network error and I do not know how to fix the issue.
    • Cannot unblock account

      Hi, I have recently been travelling for work and now my mail account has been locked due to suspicious activity (I guess login attempts from different countries) however when I go into my admin panel it won’t let me unblock and asks me to contact support.
    • WorkDrive Desktop Sync Is Being Deprecated: Move to WorkDrive TrueSync for a Smarter Experience

      Hi everyone, We are excited to share a better, smarter way to access and manage your files directly from your computer! We’re transitioning from our legacy Desktop Sync app to WorkDrive TrueSync, designed to give you faster performance,greater flexibility,
    • Time logging issues

      I am losing times tracked on tasks. The problem is that it is not clear when the time is logged, when the timer is stopped or when the task is closed? I've done both and neither works. Whats more when the task is closed, the tracked time disapperas (i guess bc it shouldve been logged) but when it's not logged you've just lost your tracked time.  The bigger problem is the UN-NATURAL way this time logging is set up. On every other plat form that tracks time, it is made clear to save timer or log when
    • Start/Stop Timmer in Chrome Extension

      The chrome extension is great and allows you to do allot however one of the most common things employees working on projects need to do is track their time. Having an easy start/stop timer to track time would be great.
    • Employee Logged Hours Report

      Hi Team, We are looking at having all Employees logged hours report, but different staff uses diferent modules to log their time. Is there anywhere that we can get a report that captures every time entered through all Zoho modules? Thank you.
    • Time Log Report Across Zoho Apps?

      Currently there are at least 4 different apps in Zoho where users can book time. Projects Desk Books People In our case for instance, the same user may book time against both Projects and Desk Tickets. So we have no way to see a simple timesheet for a
    • Zoho Time tracking option with automated screen shots.

      Time tracking option with automated screen shots would be an exceptionally good feature, any plans to develop something like that? Please do the needful. Thank you, Raj Rajinc
    • Next Page