Automation#29 Retain ticket status on moved tickets

Automation#29 Retain ticket status on moved tickets



Hello Everyone,
Hear out Zylker Techfix’s Success Story on Smoother Ticket Transitions!

Zylker Techfix, a gadget servicing firm committed to quick repairs and timely deliveries, faced a challenge when ticket statuses changed automatically while moving between departments.
For instance, when the support team received a device, the ticket status changed from "Device Received" to "Servicing." However, when the ticket was transferred to the Engineering team for complex issues, it defaulted back to "Device Received," making it difficult for engineers to track the actual progress. This led to confusion and delays.
To overcome this, Zylker Techfix needed a way to retain ticket status across departments. This week’s custom function provided the perfect solution!
Now, ticket statuses remain unchanged when transferred between teams, ensuring clarity and smooth operations.

Follow these steps to configure your workflow rule and apply this solution seamlessly.
Prerequisites
1. Create a connection
  1.1 Go to Setup(S) and choose Connections under Developer Space.
  1.2 Click Create Connection.
  1.3 Select Zoho OAuth under Default Connection.
  1.4 Set the connection name as zohosupport.
  1.5 Under Scope, choose the below scope values:
Desk.tickets.READ
  1.7 Click Create and Connect.
  1.8 Click Connect and click Accept.
Connection is created successfully.

Create a Workflow Rule
1. Go to Setup, choose Workflows under Automation
2. Under Workflows, click Rules >> Create Rule.

In the Basic Information section,
3. Select Tickets from the drop-down menu under Module.
4. Enter a Rule Name and Description for the rule.
5. If you want to activate the rule right away, select the Active checkbox. Else, create the rule and activate it later.
6. Click Next.
 
In the Execute on section, follow these steps:
7. Select Create.   
8. Click Next.

9. In the Criteria section, add criteria if required. Click Next
10. In the Actions section, click the + icon and select New next to Custom Functions.
11. Enter a Name and Description for the custom function. Choose Tickets under Module
12. Under Argument Mapping, give a desired Method Name. Map the arguments as below:
      12.1 
In the Argument Name field, type ticketID and select Ticket Id under the Tickets Section.
13. In the script window, insert the Custom Function given below:
  1. //----custom inputs------//
  2. deskURL = "https://desk.zoho.com"; //replace domain based on your Data center
  3. OrgId = "";   //Enter Org Id
  4. // ----- Initial Configs -----
  5. logs = Map();
  6. logs.put("ticketId",ticketID);

  7. //---------------------------
  8. try 
  9. {
  10. getTicketHistory = invokeurl
  11. [
  12. url :deskURL+"/api/v1/tickets/" + ticketID + "/History?limit=50"
  13. type :GET
  14. connection:"zohosupport"
  15. ];
  16. ticketHistory = getTicketHistory.get("data");
  17. previousDepartmentName = "";
  18. status = "Open";
  19. i = 0;
  20. moved = "false";
  21. for each  history in ticketHistory
  22. {
  23. if(history.get("eventName").toString().equalsIgnoreCase("TicketUpdated"))
  24. {
  25. for each  event in history.get("eventInfo")
  26. {
  27. if(event.get("propertyName") == "Department")
  28. {
  29. historychanges = event.get("propertyValue");
  30. previousDepartmentName = historychanges.get("previousValue").get("id");
  31. i = i + 1;
  32. moved = "true";
  33. }
  34. if(event.get("propertyName") == "Status")
  35. {
  36. historychanges = event.get("propertyValue");
  37. status = historychanges.get("previousValue");
  38. i = i + 1;
  39. }
  40. if(i == 3)
  41. {
  42. break;
  43. }
  44. }
  45. if(moved == "true")
  46. {
  47. break;
  48. }
  49. }
  50. }
  51. info previousDepartmentName;
  52. info status;
  53. if(previousDepartmentName != "")
  54. {
  55. updateTicket = zoho.desk.update(OrgId,"tickets",ticketID,{"status":status});
  56. info updateTicket;
  57. }

  58. }
  59. catch (errorInfo)
  60. {
  61.     logs.put("errorInfo",errorInfo);
  62. }
  63. info "logs: \n" + logs;
  64. if(logs.containKey("errorInfo"))
  65. {
  66.     throws "Error happen in the CF execution";
  67. }
NOTE
a. In Line 2, Replace ".com" with the domain extension based on your Data Center.
b. In Line 3, Enter your Org ID within "". 
14. Click Save to save the custom function.
15. Click Save again to save the workflow.
Important Note
This custom function will not apply if the destination department has blueprint enabled for all records.
Ensure that the workflow rule is set in all departments where you want the tickets to be moved.
The ticket status will be retained only if the same status is available in both the departments.
ZylkerTechfix found this solution helpful in ensuring smooth operations while keeping customers a priority. 
Share your experience on how this custom function has helped you! 
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

        • Formula fields not refreshing until page is reloaded

          I need help/advice about the formula fields and how I can refresh the information in real-time. We have two formula fields on our deals page which show calculated prices: One formula is in a subform which calculates the subform total + 1 other field amount
        • How can I setup Zoho MCP with Chat GPT

          I can set up custom connections with Chat GPT but I cat an error when I try to set it up. The error is: "This MCP server can't be used by ChatGPT to search information because it doesn't implement our specification: search action not found" Thoughts?
        • Export Invoices to XML file

          Namaste! ZOHO suite of Apps is awesome and we as Partner, would like to use and implement the app´s from the Financial suite like ZOHO Invoice, but, in Portugal, we can only use certified Invoice Software and for this reason, we need to develop/customize on top of ZOHO Invoice to create an XML file with specific information and after this, go to the government and certified the software. As soon as we have for example, ZOHO CRM integrated with ZOHO Invoice up and running, our business opportunities
        • API ZOHO CRM Picket list with wrong values

          I am using Zoho API v.8. with python to create records in a custom module named "Veranstaltung" in this custom module I've got a picket list called "Email_Template" with 28 Values. I've added 8 new values yesterday, but if I try to use on of those values
        • Group Emails

          I have synced Zoho CRM to Campaigns but there are certain email not synced. showing it is Group Emails, but this email ids belongs to different individuals. please provide a solution as i nedd to sync the same.
        • Enable Password Import option in ulaa browser

          Dear Ulaa Team, I noticed that the Ulaa Password Manager currently offers an option to export passwords, but not to import them. This limitation poses a challenge for users like me who have stored numerous credentials in browsers like Chrome. Manually
        • "Is Zoho CRM customer" vs "Is linked with Zoho CRM"

          Recently while building a Flow, I was setting up a Decision action following a Zoho Invoice Fetch record action. There were 2 choices that I had not seen as something I could manually action in Zoho Invoice: "Is Zoho CRM customer" and "Is linked with
        • Client Script | Update #13 - Introducing ZRC: Simplified HTTP request library

          Hello Developers! Are you tired of juggling different methods to make API calls? Are you confused with multiple syntaxes and version restrictions? Have you ever wished for one simple way to make all API calls in CRM? We heard you :) Here comes ZRC (Zoho
        • Selection Filed for Data Export section

          Hi FSM Team, I hope you are all doing well. I would like to share an idea for future development based on my experience. Currently, in FSM, we can only download up to 5,000 records at a time. If the development team could add a selection option to choose
        • Text wrap column headers in reports?

          Is it possible to auto wrap column headers so that a longer multi-word header displays as two lines when the column is narrower than the width of the header title?
        • 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.
        • Comments Vs. Replies

          I'm curious as to the difference between a "Reply" and a "Comment" on a ticket. It appears that "Replies" are what's used to determine response time SLA's and there are also used to automatically re-open tickets. I'm just trying to understand the key differences so I can educate both our clientele and our back-end users on which function/feature to use to better improve the ticket lifecycle. If anyone has any insight it would be appreciated. Thanks!
        • 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
        • Add Custom Reports To Dashboard or Home Tab

          Hi there, I think it would be great to be able to add our custom reports to the Home Tab or Dashboards. Thanks! Chad
        • Resetting auto-number on new year

          Hi everyone! We have an auto-number with prefix "D{YYYY}-", it generates numbers like D2025-1, D2025-2, etc... How can we have it auto-reset at the beginning of the next year, so that it goes to D2026-1? Thanks!
        • Microsoft Phone Link

          Does anyone know if you can use Microsoft Phone Link to make calls through Zoho?
        • Voip Phone system that integrates with Zoho

          Just checking to see if anyone could tell me what phone system they are using with Zoho that is on the list of systems that integrate with Zoho.  I use Vonage and have been with them for quite a few years but their service has really gone down hill and
        • Removing Related Modules Lookup Fields Assignment / Relationship

          Issue: When creating a related list, I accidently selected module itself creating a circle reference. See attached. Situation: I wish to relating a custom module called "Phone Calls" to Leads and Contacts. Outcome: 1) I either want to remove the this
        • [Product Update] TimeSheets module is now renamed as Time Logs in Zoho Projects.

          Dear Zoho Analytics customers, As part of the ongoing enhancements in Zoho Projects, the Timesheets module has been renamed to Time Logs. However, the module name will continue to be displayed as Timesheets in Zoho Analytics until the relevant APIs are
        • Kaizen #210 - Answering your Questions | Event Management System using ZDK CLI

          Hello Everyone, Welcome back to yet another post in the Kaizen Series! As you already may know, for the Kaizen #200 milestone, we asked for your feedback and many of you suggested topics for us to discuss. We have been writing on these topics over the
        • Can you prevent closing Ulaa window when the last tab is closed (inadvertently)?

          Most browsers have started to bring this feature in to prevent closing their windows when the last tab is closed (inadvertently). I hope Ulaa should get this in too.
        • Seriously - Create multiple contacts for leads, (With Company as lead) Zoho CRM

          In Zoho CRM, considering a comapny as a lead, you need us to allow addition of more than one contact. Currently the Lead Section is missing "Add contact" feature which is available in "Accounts". When you know that a particular lead can have multiple
        • can I link a contacts to multiple accounts

          can I link a contacts to multiple accounts
        • Rotate an Image in Workdrive Image Editor

          I don't know if I'm just missing something, but my team needs a way to rotate images in Workdrive and save them at that new orientation. For example one of our ground crew members will take photos of job sites vertically (9:16) on his phone and upload
        • Free webinar! Digitize recruitment and onboarding with Zoho Sign and Zoho Recruit

          Hello, Tired of being buried in onboarding paperwork? With the integration between Zoho Sign and Zoho Recruit, a powerful applicant tracking system, you can digitize and streamline the entire recruitment and onboarding process, all from one platform.
        • is it possible to add more than one Whatsapp Phone Number to be integrated to Zoho CRM?

          so I have successfully added one Whatsapp number like this from this User Interface it seems I can't add a new Whatsapp Number. I need to add a new Whatsapp Number so I can control the lead assignment if a chat sent to Whatsapp Phone Number 1 then assign
        • 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
        • Potentially Outdated and Vulnerable Chromium Engine Installed by Ulaa Browser Installer

          I just installed Ulaa Browser a few minutes ago. Whats My Browser page shows I am using an outdated Chromium engine meaning I might be vulnerable for security exploits that might have got fixed in the new version.
        • Potentially hardcoded list of Browsers to import from (after Ulaa Setup)

          I have just installed Ulaa Browser and found that the list of browser to import data is potentially hardcoded ones rather than looking at the system. I do not have FF, IE and Edge is not my default itself. I would appreciated if Ulaa detected my browsers
        • From Layout to Code: Finding Custom Field IDs in Zoho Projects.

          Hello everyone! Ever found yourself wondering how to get the API names and IDs of custom fields in Zoho Projects while working on custom functions? Here’s a simple and effective way to do it! This method makes it super easy to locate the right field details
        • How to notify all members on any updates to zoho crm?

          Hi, I am using the free version of zoho CRM and currently seeing this will work for our company. We are a small company and wanted to be more informed about all the changes in zoho.   1. How do I set notifications that go to the team for any and all changes made in Zoho. At this point, we'd rather be over-informed than under-informed. 2. Create a custom field (or rename an unused field) to be able to capture any "Product Feature Requests" from customers or prospects we're talking to. I have anyone
        • Zoho Mail Desktop App Not Loading + Can’t Manage Multiple Accounts

          Hi everyone, I’ve been having ongoing issues with the Zoho Mail desktop app for the past few weeks. The app starts to load but gives up midway and never actually opens — there’s no error message, it just stops loading. The main reason I use the desktop
        • How can I transfer data from Production to Development environment?

          Hi, I am using Creator V6 and would like to bring all the data in production to the Development and Testing environments? Is there an easy way of doing that or I have to export and import each table?
        • Billing frequency is not displayed correctly.

          Hello There is an issue while displaying the billing frequency on a subscription quote. I am able to activate the subscription details and get this lovely overview: If I am adding a Plan which I charge quarterly, first of all it should be possible to
        • Calling Function via REST API with API Key gives 401 using Zoho Developer

          Hi, I created a couple of functions using the one month trial of Enterprise edition, which I was able to call using the API Key method from Postman and from an external site. Now that my trial has expired, I have created the same functions in the Developer
        • 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
        • 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),
        • Next Page