Plug Sample: Fetch ticket status from Zoho Desk on Codeless bot builder | Zoho SalesIQ

Plug Sample: Fetch ticket status from Zoho Desk on Codeless bot builder | Zoho SalesIQ

Hi everyone, Good to see you. 

Are you using the Codeless bot platform for building your bot? Did you know that plugs are exclusively made for performing customized actions on Codeless bot? 
Here is a simple plug for fetching the status of the ticket from Zoho Desk. This plug can get the ticket number from the visitor and update them with the status of their ticket. You can do slight customization to the script and use it. Let's know how to create and use this plug in real time. 

How to Create this Plugs?
  • In your SalesIQ Dashboard, navigate to Settings>Developers>Plugs> Click on Add .
  • Provide your Plug a name, description, select the Platform as SalesIQ Scripts , and click on Create Plug
  • Click on Parameters, provide the following. 
Input Parameters :
  • Name: ticketnumber | Data Type: String
Output Parameters :
  • Name: priority | Data Type: String
  • Name: subject | Data Type: String
  • Name: description | Data Type: String
  • Name: days | Data Type: String
  • Name: CreatedTime | Data Type: String

  • Copy, paste the below code and change your Zoho Desk Organisation ID and Connection name. 
Create a Connection with Zoho Desk with the below scopes and use the connection name in the code. 

Scope for this Plug code:
  • Desk.tickets.ALL
  • Desk.search.READ
  1. //Change your Zoho Desk organization ID
  2. orgId = "1234";
  3. //Get ticket number from the parameters
  4. if(session.containsKey("ticketnumber"))
  5. {
  6. ticket_number = session.get("ticketnumber").get("value");
  7. }
  8. searchQuery = Map();
  9. searchQuery.put("ticketNumber",ticket_number);
  10. //zohodesk - Connection name
  11. get_ticket = zoho.desk.searchRecords(orgId,"tickets",searchQuery,0,1,"zohodesk");
  12. info get_ticket;
  13. //get ticket details from "get_ticket"
  14. modified_time = get_ticket.get("data").getJSON("modifiedTime").toDate();
  15. created_time = get_ticket.get("data").getJSON("createdTime").toDate();
  16. ticket_number = get_ticket.get("data").getJSON("ticketNumber");
  17. priority = get_ticket.get("data").getJSON("priority");
  18. status = get_ticket.get("data").getJSON("statusType");
  19. raw_description = get_ticket.get("data").getJSON("description");
  20. raw_subject = get_ticket.get("data").getJSON("subject");
  21. subject = raw_subject + "- (" + status + ")";
  22. description = raw_description.replaceAll("<[^>]*>","");
  23. description = description.replaceAll("&nbsp;"," ");
  24. time_now = today;
  25. numberOfDays = daysBetween(modified_time,time_now);
  26. if(numberOfDays == 0)
  27. {
  28. time_interval = "Today";
  29. }
  30. else if(numberOfDays == 1)
  31. {
  32. time_interval = "1 day ago";
  33. }
  34. else
  35. {
  36. time_interval = numberOfDays.toString() + " days ago";
  37. }
  38. info time_interval;
  39. info description;
  40. info priority;
  41. info created_time;
  42. response = Map();
  43. response.put("CreatedTime",created_time);
  44. response.put("days",time_interval);
  45. response.put("description",description);
  46. response.put("priority",priority);
  47. response.put("subject",subject);
  48. return response;
  • Then, click Save, preview the plug and Publish it.
How to add Plugs in Codeless bot?
  • Navigate to Settings>Bot>Add and give the necessary informations and select Codeless Bot as bot platform or open an existing bot.
  • Select the Plugs card under Action Cards and select the required Plug (Only published plugs will be listed here)
  • Provide the Plug inputs (values to be obtained from the visitors) and outputs (value to be given for the visitors). 

  • In the plug input, the ticket_number is the bot context variable that stores ticket number obtained from the visitors fields card.

Note: 
  • Create a visitors fields to get ticket number from the visitor and save the values in context variable for plugs input. 

Related Links:

To know more about the features of zobot, kindly visit our Resources Section

    Access your files securely from anywhere







                        Zoho Developer Community





                                              Use cases

                                              Make the most of Zoho Desk with the use cases.

                                               
                                                

                                              eBooks

                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                               
                                                

                                              Videos

                                              Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                               
                                                

                                              Webinar

                                              Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                               
                                                
                                              • Desk Community Learning Series


                                              • Meetups


                                              • Ask the Experts


                                              • Kbase


                                              • Resources


                                              • Glossary


                                              • Desk Marketplace


                                              • MVP Corner




                                                        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

                                                                                                        • Using files from Zoho CRM in Gemini/ChatGPT/Claude

                                                                                                          Hi all, I’ve got subscriptions to Gemini and a few other AI tools which I use for tasks like data enrichment, email composition, etc. In our workflow, we often receive various documents from clients — such as process workflows, BRDs/requirement documents
                                                                                                        • Please Enable Snippets for Agents Adding Comments

                                                                                                          Snippets and templates are currently enabled for agents when they use the reply functionality. There is currently no way to add a template or snippets when an agent comments. This is really weird. Our agents don't use the reply functionality, only the
                                                                                                        • Im trying to white list domain dynamically in zoho desk extension

                                                                                                          Im trying to white list domain dynamically in zoho desk extension. But it show error Error: {errMsg: 'No entry found in plugin-manifest whiteListedDomains for requested URL'} syntax "config": [ { "displayName":"Shopify Admin API access token ", "name":
                                                                                                        • Subforms and Reports

                                                                                                          I am trying to do a report that shows various data from subforms. eg I want a report that shows what Bill Status are Approved Required. Or show the status of all bills. It doesn't look like Zoho Reports picks up information within reports. Is there another
                                                                                                        • Time Entry : Auto fill fields Hours minutes seconds

                                                                                                          Hello world, Do someone know a script (for workflow rules) which fill automatically fields hours spent, minutes spent, seconds spent when we fill Executed time and End time Formula should start from (End time - Executed time) Thx in advance
                                                                                                        • Pass variables to Zoho Desk via URL to create a fast new ticket landing page

                                                                                                          We are integrating our phone system into Zoho Desk. Currently when a helpdesk agent answers the phone, a soft client opens a new tab with zoho desk at the new case page. https://desk.zoho.com/support/companyname/ShowHomePage.do#Cases/new We would like
                                                                                                        • 【Zoho CRM】アナリティクス機能のアップデート:ウォーターフォールの導入

                                                                                                          ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 今回は「Zoho CRM アップデート情報」の中からアナリティクス機能のアップデートをご紹介します。 本記事は、以前紹介された機能に新たに追加された機能です。 以前の記事:https://support.zoho.co.jp/portal/ja/kb/articles/zoho-crm-visualize-your-data-with-a-new-set-of-charts-treemap-butterfly-sankey-and-cluster-charts
                                                                                                        • Webhook - Configuration failed: 200 response not received for POST request

                                                                                                          Hello, I am trying to set up a webhook to connect with an automation software but I receive the following error from Zoho: Configuration failed: 200 response not received for POST request I have tried testing it on webhook.site as well and receive the
                                                                                                        • Workdrive Upload Notification

                                                                                                          Is there a way to be notified when someone externally has uploaded files to a folder? The "Unread" tab is really worthless because it shows all files from every directory on the system. I just need an email (or bell at worst) that says "someone has uploaded into <foldername>".
                                                                                                        • Cannot reorder fields in Page Layout in Expenses and Purchase Requests

                                                                                                          It is very inconvenient that the custom fields in Page Layout cannot be re-ordered. The only way is to remove the fields and re-create them; however, it is impractical. This would affect the reports and dashboards we are having. Not able to re-order the
                                                                                                        • Workflow for "Expenses" module?

                                                                                                          Hi there, over the last 2 years, Zoho Expense has seen tremendous growth and we are happy with it. But, sometimes it is frustrating to see things are being implemented halfheartedly, or so it seems. For example, There is the possibility to create workflows
                                                                                                        • The Grid is here!

                                                                                                          Hey Zoho Forms Community! 👋 We’re thrilled to announce the launch of a feature that’s been on your wishlist for a while: Grids What is Grids? Grids let you place form fields side by side in multiple columns to create a more concise and organized form
                                                                                                        • Automated Shopify adjustment problem. "An inventory adjustment has been created by the system to set the initial stock from Shopify"

                                                                                                          Has anyone noticed issues since the Shopify Sync has been updated recently? If you sync with Shopify, check to see if there are automated adjustments for old products that keep recurring. We have this problem for 6 SKU's that Zoho is doubling the stock
                                                                                                        • Stock count by bin location

                                                                                                          Is there a configuration to make a stock count by bin or area and not by product. these is useful to manage count by area Regards
                                                                                                        • Introducing Assemblies and Kits in Zoho Inventory

                                                                                                          Hello customers, We’re excited to share a major revamp to Zoho Inventory that brings both clarity and flexibility to your inventory management experience! Presenting Assemblies and Kits We’re thrilled to introduce Assemblies and Kits, which replaces the
                                                                                                        • Best website platform to sync to Zoho Inventory

                                                                                                          Anyone like to suggest the best website platform for syncing to Zoho Inventory? We DO NOT want to sync stock, only orders. Shopify - not an option as we have more than one website and Shopify requires 2 accounts and Zoho will not sync with 2 different accounts. Magento and WooCommerce both sync via Kloudconnectors - does anyone have any experience with this? I have trialled it and there are flaws - eg purchase order numbers are not populated. Discussion welcome!
                                                                                                        • Convert Item to composite item

                                                                                                          When using Zoho CRM integrated with Zoho Inventory/Books, the item creation process is a little messy. After a few years of trial and error, we have settled on creating items in CRM, which are sync'ed to Zoho Inventory using Zoho's own internal integration.
                                                                                                        • Include product images in data sync between Zoho CRM and Zoho Inventory

                                                                                                          Currently the item image does not sync between Zoho CRM and Zoho Inventory when using the internal Zoho sync functionality. This requires users to manually update the item image in Zoho Inventory for products created in CRM and vice versa. Including the
                                                                                                        • Zoho Inventory Item History

                                                                                                          Hi Zoho Inventory Team, I 've been testing the History feature on Inventory Items in a demo system and I noticed that when I changed the value of a field to a new value, the history just says "updated by - user1", it doesn't say what what field was changed
                                                                                                        • Show ordered quantity on packing slips and invoices

                                                                                                          Hello Is there any way possible to show the original ordered quantity of an item (as recorded in the sales order) on subsequent package slips and sales invoices, so that these documents can show the customer the ordered qty vs the qty being currently
                                                                                                        • Search Zoho Inventory Items module via API

                                                                                                          How can I search Zoho Inventory Items by custom fields, categories, etc using the API? This is not documented. Is there an advanced search function like CRM's COQL search available via the Zoho API? If there is an undocumented way to search Items via
                                                                                                        • How can I get my images to display correctly on mobile site?

                                                                                                          I have just created a site and uploaded images, which look perfect on the desktop version. However when I view the site on my mobile device some of the images are not displaying correctly. They are all blurry. Anyone else experience this?
                                                                                                        • Email parser rule will only parse emails with an exact match? What madness is this?

                                                                                                          I finally got myhead around deluge and scripting, but wondered why my parser wasn't working. (https://help.zoho.com/portal/en/community/topic/extract-11-digit-number-in-any-position-from-enail-subject) Problem: There are *zero* characters or phrases that
                                                                                                        • Does Creator support HTMX?

                                                                                                          I love the Zoho ecosystem and Zoho Creator does a lot of things really well. However, I'm needing more real-time interactivity in my forms. Is the only option to create a JS widget? How about HTMX?
                                                                                                        • My fix for "This report is not accessible" in published pages

                                                                                                          Hi Community, after having the same issue as many others here and going through the community's posts, i found a solution on my own. Again, the quality of support from Zoho is pretty awful: if you cannot help yourself, you're lost. I really like Zoho,
                                                                                                        • Tip of the Week #59– Enhance team collaboration with multichannel shared inboxes!

                                                                                                          Struggling with scattered customer conversations and missed follow-ups across your team? When messages are everywhere, it's easy for them to fall through the cracks—leading to delays, duplicate replies, and miscommunication among team members. Zoho TeamInbox
                                                                                                        • Subforms in stateless forms

                                                                                                          I think the title says it all. We need to be able to add subforms to stateless forms. Currently the only workaround is to create a Form and delete each record upon submission of the form. I need to build an interface to update our inventory. Basically
                                                                                                        • Delete standard e-mailtemplate

                                                                                                          Hello, Is it possible to delete or hide a standard e-mailtemplate? I would only like to show my own created e-mailtemplates to my staff. I only find a 'delete' option at my custom made e-mailtemplates, but the standard e-mailtemplates do not show this
                                                                                                        • Shuffling between one note to the next

                                                                                                          I usually start all my notes per interaction with a contact with the date and then a little detail.  But when I search for it it only see a small portion of the note and can't immediately tell which contact its associated with. can we make the note content column wider to fit more information and please have a column header that says which contact its associated with.
                                                                                                        • CRM notes

                                                                                                          I want to be able to add notes to a task that do not necessarily get rolled up into an account or contact.   For example, I tasks to work on a Court Order for John Doe divorce account.  There might be lots of updates (in the form of notes) that employees
                                                                                                        • Add values to Countdown Mode

                                                                                                          Is it possible to add values to the countdown mode drop down? The longest is 2 days. I would like values for 5 days, 10 days, 15 days...
                                                                                                        • 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
                                                                                                        • Refresh token not appearing

                                                                                                          Hello, I was wondering if there is another way of obtaining a refresh token, as following the usual 60-second-code procedure generates a new access token, but not the refresh token, and so i have to repeat everything to get a new token every hour or so,
                                                                                                        • How would I collect a signature in person on Zoho sign?

                                                                                                          Suppose I have a customer show up at my office and we close a deal. I have an iPad ready to go, and I need to have the customer sign the document right there. How would I do it?
                                                                                                        • What's New in Zoho Analytics - June 2025

                                                                                                          Hello Users, We're delighted to bring you new features and enhancements designed to make your analytics experience smarter and more powerful than ever. AutoML Enhancements We’re thrilled to introduce powerful new AutoML enhancements, making machine learning
                                                                                                        • Share saved filters between others

                                                                                                          Hi, I am in charge to setup all zoho system in our company. I am preparing saved filters for everybody, but the only one can see its me. How can others see it? Thanks
                                                                                                        • Zoho Books | Product updates | June 2025

                                                                                                          Hello Users, We’ve rolled out new features and enhancements in Zoho Books, from the option to record advances for purchase orders to dynamic lookup fields, all designed to help you stay on top of your finances with ease. Introducing Change Comparators
                                                                                                        • How to handle this process need using a Blueprint?

                                                                                                          See one minute screen recording: https://workdrive.zohoexternal.com/external/eb743d2f4cde414c715224fc557aaefeb84f12268f7f3859a7de821bcc4fbe15
                                                                                                        • Creator roadmap for the rest of 2022

                                                                                                          Hi everyone, Hope you're all good! Thanks for continuing to make this community engaging and informative. Today we'd like to share with you our plans for the near future of Creator. We always strive to strike a good balance of features and enhancements
                                                                                                        • Action requested: Retain your sales journey configuration in Path Finder

                                                                                                          Dear Customers, We hope you're well! As you might know, we're completely overhauling our journey management suite, CommandCenter, and are in the last leg of it. As a means of getting ready to go live, we will be announcing a series of requests and updates
                                                                                                        • Next Page