Episode I : Exploring the World of Custom Functions in Zoho Desk

Episode I : Exploring the World of Custom Functions in Zoho Desk


Hello Again!
Welcome to an Automation Adventure in the World of Zoho Desk
Join us on a journey to explore how custom functions can enhance and extend the capabilities of Zoho Desk.
Automation is everywhere. From robotic arms assembling products on factory floors to automating tasks in the software world, automation has revolutionized how we work out stuff. But what does this have to do with Zoho Desk? 
Anline, a curious resident in the Zoho Desk world, is exploring how automation can transform her workflow.

Anline’s Quest in the Zoho Desk World  

Anline is building her own world within Zoho Desk, but she’s hit a few roadblocks. She wants to perform specific operations; like updating ticket statuses, fetching data from external services, and automate repetitive tasks. She knows Zoho Desk has the tools she needs, but where does she start?
DeskAutomate Services is here as a guide to the Automation City. The citizens of Zoho Desk World operate based on their licenses. Each license unlocks different levels of automation capabilities.
Anline has the Enterprise edition, which grants her the access to the most powerful tools: Custom Functions. How can this empower Anline?

The Power of Custom Functions  

Custom Functions are like magic spells in the Zoho Desk world. They give users flexibility to tailor automation to their exact needs. While basic automation features are available to all license holders, Custom Functions are exclusive to Enterprise users. These functions let Anline go beyond the basics and create automations that meet her unique requirements. What makes them even more accessible is Deluge, Zoho’s in-house scripting language.
But there’s a catch: Anline isn’t a coding expert in Deluge. How can she harness the power of Custom Functions without getting lost in complex scripts? DeskAutomate guides Anline to the prebuilt functions and a user-friendly framework, simplifying the coding process.
Whether you’re new to coding or an experienced developer, Deluge simplifies the process of creating Custom Functions with its intuitive interface and drag-and-drop functionality.

The Deluge Script Editor: Your Coding Playground  

To access the Custom Function window, go to Setup (S) >> Developer Space >> Functions >> New Function.
When you open the Custom Function window in Zoho Desk, you’ll find a user-friendly interface designed to help you build scripts using drag-and-drop options. Here’s what you’ll discover: Each section has predefined variables which you can drag and use based on your requirements.
1. Basic Commands
The Basic section includes essential commands like setting variables, adding comments, and inserting informational text into your script. These foundational elements help you structure your Custom Function logically.
          Example: businessDaysCount = 5; //<variable> = <expression>;
2. Conditional Logic
The Condition section allows you to add conditional operators such as if, else if, and else. These operators let you program decision-making logic into your Custom Function.
Example:
  1. if (TicketStatus == "Open")
  2. {
  3.     info "This ticket is still open.";
  4. }
3. Notifications
The notifications section lets you enter values to send emails or post messages via Cliq.
Example:
  1. sendmail
  2. [
  3. from : zoho.userid
  4. to   : support@zylker.com
  5. subject : "Ticket is created"
  6. message : "Thank you for your enquiry. A ticket has been created and our experts will respond to you."
  7. ]; 
4. Integrations
Zoho Desk makes coding easy for integrations. With drag-and-drop options, you can create webhook integrations and API calls without writing complex code from scratch. The Custom Function window provides all the necessary code snippets, so you can customize them to fit your requirements.
Example: contactRecord = zoho.crm.getRecordbyId("Contacts",9876787);
5. Collections
The Collections feature lets you gather and manage strings of data or specific information within your Custom Function. This is particularly useful when you need to process or analyze multiple data points.
Example:
  1. myList = Collect();
  2. myList.insert("ID1");
  3. myList.insert("ID2");
  4. myList.insert("ID3");
  5. for each ID in myList
  6. {
  7.    info ID;
  8. }
You can also enable the Syntax Builder within your Coding playground. Enabling this option will help you choose variables from the drop-down windows having prebuilt variables/Fields.

Mapping Parameters and Testing Your Script  

Once you’ve built your Custom Function, the next step is to map it to your Zoho Desk environment:
1. Edit Arguments
The Edit Arguments option lets you map params within your Custom Function to fields in your tickets. For example, you can link the Ticket ID, Ticket Owner, or Case ID to the corresponding fields in your Zoho Desk setup. This ensures that your Custom Function interacts seamlessly with your data.
2. Authentication and Connections
Zoho Desk uses OAuth tokens to establish secure connections for Custom Functions. Commonly, this involves using Zoho OAuth to make API calls within Zoho's scope. You can choose the appropriate scopes during authorization to ensure your Custom Function has access to the necessary data and functionalities.
Note: If you choose third-party applications, please create a connection using the required default or custom services.
3. Save and Test
After saving your script, use Save & Execute Script to test it with sample inputs. This lets you test the function, ensuring functionality, debug, and refine your code before deployment.
In the upcoming episodes, we'll dive into how Custom Functions work and contribute to expanding the capabilities within Zoho Desk.
See you in the next episode,
Regards,
Lydia | Zoho Desk. 
    • Sticky Posts

    • Register for Zoho Desk Beta Community

      With the start of the year, we have decided to take a small step in making the life of our customers a little easier. We now have easy access to all our upcoming features and a faster way to request for beta access. We open betas for some of our features
    • Share your Zoho Desk story with us!

      Tell us how you use Zoho Desk for your business and inspire others with your story. Be it a simple workflow rule that helps you navigate complex processes or a macro that saves your team a lot of time; share it here and help the community learn and grow with shared knowledge. 
    • Tip #1: Learn to pick the right channels

      Mail, live chat, telephony, social media, web forms—there are so many support channels out there. Trying to pick the right channels to offer your customers can get pretty confusing. Emails are most useful when the customer wants to put things on record. However, escalated or complicated issues should not be resolved over email because it's slow and impersonal.  When you need immediate responses, live chat is more suitable. It's also quick and convenient, so it's the go-to channel for small issues. 
    • Welcome to Zoho Desk Community - Say hello here!

      Hello everyone! Though we have been here for a while, it’s time to formally establish the Zoho Desk Community; we’re really happy to have you all here! This can be the place where you take a moment to introduce yourself to the rest of the community. We’d love to hear all about you, what you do, what company or industry you work for, how you use Zoho Desk and anything else that you will like to share! Here’s a little about me. I am Chinmayee. I have been associated with Zoho since 2014. I joined here
    • Webinar 1: Blueprint for Customer Service

      With the launch of a host of new features in Zoho Desk, we thought it’ll be great to have a few webinars to help our customers make the most of them. We’re starting off with our most talked about feature, Blueprint in Zoho Desk. You can register for the Blueprint webinar here: The webinar will be delivered by our in-house product experts. This is a good opportunity to ask questions to our experts and understand how Blueprint can help you automate your service processes. We look forward to seeing
      • Recent Topics

      • SMTP Authentication Fails with App Password – “535 Authentication Failed” Error

        Hello, I'm trying to send transactional emails from my WordPress website using the WP Mail SMTP plugin with Zoho Mail (smtp.zoho.com on port 465 with SSL). I've created and used a Zoho Mail app-specific password for SMTP, and verified that: The email
      • How to work with getFieldNames formdata functions ,Any Examples

        I don't find any example showing usage of getFieldNames. Where do i find .is there any Help documents available
      • Deluge script issue : Mismatch of data type expression. Expected BIGINT but found STRING

        I'm building a Zoho Creator form to take inputs for Email, Bootcamp Name, and Tag. If a record with the same Email + Bootcamp exists in a custom module (bootcampattendence), I want to update it by adding a new tag. If it doesn’t exist, I want to create
      • how to integrate zoho bigin to wordpress website ?

        hello , i want to integrate zoho bigin to wordpress webiste , can anyone help me with the tutorial ?
      • Survey end date extension

        Hi, Is there any way to extend the end date of my survey? I needed more time in finding respondents that is why I need to extend the end date of my survey. Help. Thanks
      • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

        Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
      • AutoScan Not Working Since April -Support says it with engineering

        Hi there, Autoscan has not been working on my account since April. Without this feature, completing expenses reports is laborious and error-prone. I keep asking for updates seeing as this is a critical feature, but told that it's being looked into and
      • Problem with signature in a forwarded mail

        Dear All, In my email account I created a signature and I unchecked the 'Place signature above the quoted text for relies and forwards' My question is, when I am trying to forward an email, sometimes I need to insert my signature so I select it from the
      • Out of Office not working

        I have set up out of office on zoho mail, however, it does not reply to every mail sent to it. I have tested it by sending several test messages from multiple different email accounts, I will get a response to some of them, but not all of them this is
      • Error message that says only images and no text

        I filled out a template for a weekly newsletter with text and images throughout but when I click save and next an error message comes up that says "Campaign content has only images and no text" which is not true at all. I have no idea how to fix this issue and don't know where the problem is. 
      • Link project invoices to sales orders

        As a business owner and project manager I create estimates with my clients which then become sales orders. When billing for project work I want to invoice against the agreed sales order. I see that I can create invoices and link them to sales orders in
      • Contacts Don't Always Populate

        I've noticed that some contacts can easily be added to an email when I type their name. Other times, a contact doesn't appear even though I KNOW it is in my contact list. It is possible the ones I loaded from a spreadsheet are not an issue and the ones
      • Cannot add zoho email to gmail acc

        I'm trying to set up my zoho mail to connect to my gmail acc but no matter what I try I always get this problem. What should I do now? Password is up-to-date. Authentication failed. Please check your username/password. [Server response: 535 Authentication
      • 553 Relaying disallowed - Invalid Domain

        I have this error "553 Relaying disallowed. Invalid Domain" when sending an email to any email address. But I still receiving email from other emails. I checked MX, DKIM, SPF and it's ok. Could you check and help? Thanks
      • Function #25: Automatically generate purchase orders from a sales order

        We kicked off the "Function Fridays" series with the goal of helping you automate your everyday accounting tasks. As we delve into today's post, I'm delighted to announce that we're here to present the 25th custom function in this series. While it is
      • Turn off Organization Contact List

        We need to be able to turn off the Organization Contact list for some of our staff. Once the Organization Contact list is turned off for a user, we would then like to be able to create a list of contacts on per user basis that would not be editable by
      • In the Blue Print Transition requirement received it will show 8 check field in pop up if they any one of this field then only move to next stage Ist quote

        In the Blue Print Transition requirement received it will show 8 check field in pop up if they any one of this field then only move to next stage Ist quote Pls help how i fix this
      • Unable to send massage Reason 553/ Relaying Disallowed. Invalid Domain

        Cant sed massages from my email. All massages from my domain received the same issue Unable to send massage Reason 553/ Relaying Disallowed. Invalid Domain
      • Kaizen #194 : Trigger Client Script via Custom buttons

        Hello everyone! Welcome back to another interesting and useful Kaizen post. We know that Client Scripts can be triggered with Canvas buttons and we discussed this with a use case in Kaizen#180. Today, let us discuss how to trigger Client Script when a
      • Issue with POST request creating Calls in CRM

        Hello, I am in the middle of integrating some 3rd party Call center API with Zoho CRM and going through our logs I see some discrepencies. We sometimes get an error: {"data":[{"code":"INVALID_DATA","details":{"api_name":"Call_Duration","json_path":"$.data[0].Call_Duration"},"message":"Please
      • Make record entry more organized with the Sections component in Wizards

        Hello everyone! Wizards in Zoho CRM have always helped you break long record-detail pages or large sets of fields into multiple screens, making data entry smoother and more user-friendly. Now, we’re taking a major step forward with a new Sections component—giving
      • Allowing subqueries in FROM clause

        When building a Query table in Zoho Reports, I encountered an error when attempting to put a subquery in the "FROM" clause of my statement.  Why isn't this currently supported?  Is there a plan to implement this functionality in the future?
      • GSTIN Public Search API

        Does zohobooks have an api using which i can search GST numbers and get their details?
      • External @zoho.com mail stopped working today, yesterday no issues

        Hello, Over a sudden mail stopped being delivered to inbox. Domain is standard zoho.com worked no problem yesterday, today nothing in inbox. Sent several test emails from corporate account & from gmail.com, logs show acceptance by zoho mail server, but
      • I wan to schedule a meeting report From previous Thursday to this thursday of this week on Every 6 pm want to recive this report in zoho CRM

        I wan to schedule a meeting report From previous Thursday to this thursday of this week on Every 6 pm want to recive this report in zoho CRM. How I Can achive this in Zoho CRM.
      • Quotes

        Has anyone figured out how to automatically upload a quote that was signed via Zoho Sign and insert it directly to that leads file and push it through the pipeline to proposal signed status?
      • Suggestion: Smart Purchasing Module for Zoho Inventory and Zoho Books

        Suggestion: Smart Purchasing Module for Zoho Inventory and Zoho Books As an active user of Zoho Inventory and Zoho Books, I’ve noticed that the suite already provides valuable tools for managing inventory, analyzing trends, and processing purchase orders.
      • TDS Filing

        Is there any option for automatic 26Q and 24Q filing in Zoho books. Even Tally has this option. Why don't Zoho has this ? Is there any customisation available for this ?
      • Adding bank details to the contact through API

        How to add bank-related information to the contact while creating it using API? The account number needs to be encrypted before sending it through API but not sure how to encrypt and get those values. Please guide me in this.
      • average cost display

        Hello there, I'm using the average cost valuation method, and the cost price shown in the Items menu should reflect the latest WAC (Weighted Average Cost). However, it doesn't update automatically. Is there a way to display the current average cost without
      • Apple Mail issues

        Dear Sir or Madam, I am trying to configure my Zoho mail account to Apple Mail. It is not working. It seems to need more information (perhaps a path prefix?) than is shown in your tutorial (<www.zoho.com/mail/help/apple-mac-imap.html>). After plugging
      • Assistance Required for Migrating Data from Odoo Inventory to Zoho Inventory

        Hi Team, I previously used Odoo Inventory to manage my stock and transactions, and I’ve now moved to Zoho Inventory. I’d like to migrate my data from Odoo—including product details, stock, purchase, and vendor information- into Zoho Inventory for continuity
      • I need my entire Zoho Account (mail/organization) deleted!

        Hey! I used zoho for my email aaron@aaronglass.me with domain forwarding/mx all that. I got rid of the mx info on my godaddy account and still Google won't let me sign up with my aaron@aaronglass.me email. (I'm moving to Google for business) SO! I was
      • Error: "Invalid Element warehouse_id" when sending order to Zoho

        i'm getting the error "Invalid Element warehouse_id" when trying to send an order to Zoho via API. Has anyone faced this issue before? How can I fix it?
      • No way to sell individual and case units smoothly in Zoho

        Currently, Zoho Inventory handles inventory primarily at the case level, which can be challenging for businesses that frequently need to break down cases into individual units for retail sales or smaller shipments. Although Zoho Inventory currently supports
      • How to handle multiple languages (Resume parser, Job opening, job board, career site) ?

        We are looking to bring Zoho Recruit to a market that needs to support 2 languages. The first thing we need to make sure is that the Candidate be flag with the language they speak. This is easy enough make a custom field that as the desire languages.
      • Multi-Card Selection and Cross-Zobot Copy-Paste Functionality

        Dear Zoho SalesIQ Team, We’d like to suggest a productivity-enhancing feature for the Zobot builder in Zoho SalesIQ: the ability to select multiple cards (modules) at once using a selection area, and then copy-paste them either within the same canvas
      • Shipping Labels

        Hi, Can we generate Packing Labels for manual shipping same as the format as Airway Bill in zoho books or inventory?
      • Add a Way to Duplicate Cards in the Same Canvas (Retain All Settings)

        Dear Zoho SalesIQ Team, We would like to request a new feature in Zoho SalesIQ: the ability to duplicate an existing card within the same canvas while retaining all of its information and settings, including conditions, configurations, and display preferences.
      • Session "Ask Me Anything" Zoho France - Le 26 Juin 2025 14h à 17h (en Français

        Chers Utilisateurs, Vous cherchez à mieux comprendre Zoho CRM ou Zoho Desk ? Nos experts seront disponibles pour répondre à toutes vos questions lors de notre session Ask Me Anything. Rejoignez-nous ici pour en discuter en ligne. Pendant trois heures,
      • Next Page