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

        • Urgent Security Feature Request – Add MFA to Zoho Projects Client Portal Hello Zoho Projects Team,

          Hello Zoho Projects Team, We hope you are doing well. We would like to submit an urgent security enhancement request regarding the Zoho Projects Client Portal. At this time, as far as we are aware, there is no Multi-Factor Authentication (MFA) available
        • How to retreive the "To be received" value of an Item displayed in Zoho inventory.

          Hi everyone, We have our own Deluge code to generate a PO according to taget quantity and box quantity, pretty usefull and powerful! However, we want to reduce our quantity to order according to "To be received" variable. Seems like this might not even
        • Add Support for Authenticator App MFA in Zoho Desk Help Center

          Hello Zoho Desk Team, We hope you are doing well. We would like to request an enhancement related to security for the Zoho Desk Help Center (customer portal). Currently, the Help Center supports MFA for portal users via SAML, JWT, SMS authentication,
        • Payment on a past due balance

          Scenario: Customer is past due on their account for 4 months. We suspend their billing in Zoho books. Customer finally logs into the portal and enters a new credit card. We associate that cardwith their subscription, which will permit the card to be used
        • Instant Sync of Zoho CRM Data?

          With how valuable Zoho Analytics is to actually creating data driven dashboards/reports, we are surprised that there is no instant or near instant sync between Zoho CRM and Zoho Analytics. Waiting 3 hours is okay for most of our reports, but there are
        • Kaizen #211 - Answering your Questions | Using Canvas and Widgets to Tailor CRM for Mobile

          Howdy, tech wizards! We are back with the final post in addressing the queries you shared for our 200th milestone. This week, we are focusing on a couple of queries on Zoho CRM mobile configurations and custom payment gateway integration. 1. Mobile SDK
        • Remove "Invalid entries found. Rectify and submit again" modal

          Following up on a post from a few years back, but can the Zoho team consider either removing the 'Invalid entries found. Rectify and submit again' modal that displays for empty mandatory fields OR allow an admin to change it? I've built a custom error
        • Validation function not preventing candidates under 18 or over 30 from submitting the web form

          Hello everyone, I’m trying to create a validation rule for the Candidate Webform in Zoho Recruit. I added a custom field called “Date of Birth”, and I want to make sure that candidates cannot submit the form unless their age is between 18 and 30 years.
        • Remember all the ways we've posted?

          The world celebrates World Postal Day in 2025 with the theme “#PostForPeople: Local Service. Global Reach". The story of the “post” is a story of human connection itself, evolving from simple handwritten notes carried over long distances to instant digital
        • Custom domain issue

          I recently changed records for my support area custom domain for a few months, I then wanted to come back to Zoho, but now I can't connect it and I can't login as it's having an SSL issue. I cannot get a good response from support, as I've been notified
        • Cadence reports as front-end reports

          Hello everyone, We have built a cadence which is connected to the Leads module. There are 11 steps in total, 7 are automatic emails and 4 are tasks for the Lead owners. As admins, we have access to this (very nicely made) 'View Reports' tab where we can
        • Zoho Commerce in multiple languages

          When will you be able to offer Zoho Commerce in more languages? We sell in multiple markets and want to be able to offer a local version of our webshop. What does the roadmap look like?
        • 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
        • The present is a "present"

          The conversation around mental health has been gaining attention in recent years. Even with this awareness, we often feel stuck; the relentless pace of modern life makes us too busy to pause, reflect, and recharge. In the world of customer support, this
        • Cliq iOS can't see shared screen

          Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
        • Kaizen# 209 - Answering Your Questions | All About Client Script

          Hello everyone! Welcome back to another exciting Kaizen post! Thanks for all your feedback and questions. In this post, let's see the answers to your questions related to Client Script. We took the time to discuss with our development team, carefully
        • Email Integration - Zoho CRM - OAuth and IMAP

          Hello, We are attempting to integrate our Microsoft 365 email with Zoho CRM. We are using the documentation at Email Configuration for IMAP and POP3 (zoho.com) We use Microsoft 365 and per their recommendations (and requirements) for secure email we have
        • Search in Zoho Community Not Working

          I realize this is a bit of a meta topic, but the search for the various Zoho Communities appears to not be working. I'm under the impression that they run on some version of the Zoho Desk platform, so I'm posting this here.
        • I need to do crud with snippet html

          I need to implement a form with an improved user interface. I would like to use snippets to build a CRUD that allows me to create and update records. How could I achieve this using snippets?
        • Allow Stripe Credit Card and Stripe ACH payment methods to be enabled separately on an invoice.

          I need to be able to pick at the invoice level whether Stripe Credit Card and/or Stripe ACH payment methods are available. Currently, I'm not able to select from the two Stripe payment methods individually on an invoice. However, there are some larger
        • Enhancements to finance suite integrations

          Update: Based on your feedback, we’ve updated the capabilities for integration users. In addition to the Estimates module, they can now create, view, and edit records in all the finance modules including Sales Order, Invoices, Purchase Order. We're also
        • Meeting impossible to use when sharing screen

          he Meeting tool in Brazil is practically unusable when sharing anything, whether it’s a presentation or simple navigation. When accessed via Cliq, the situation gets even worse: even basic calls fail to work properly, constantly freezing. And as you are
        • 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
        • 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
        • Incorrect “correct” password on email client apple mail

          I have troubleshot this account several times. I have deleted and re added account. It keeps saying incorrect password. Can you check that it is not locked on your end?
        • Is it possible to lock editing subform rows?

          Ideally editing would only be locked after the form has been updated but I still want them to be able to add new subform records at any time and they should be able to delete rows from the subform. It is a named subform if that's relevant however the
        • "Spreadsheet Mode" for Fast Bulk Edits

          One of the challenges with using Zoho Inventory is when bulk edits need to be done via the UI, and each value that needs to be changed is different. A very common use case here is price changes. Often, a price increase will need to be implemented, and
        • What is the maximum file size of a video upload in Zoho chat?

          Can I upload a 20 mb video file and share it with my colleagues? 
        • The Social Wall: September 2025

          Hello everyone, As we step into the fall season, some major updates are on the horizon. Meanwhile, here are the exciting updates we rolled out this September. Approvals in iOS Managing approvals just got more seamless on mobile. With this update, the
        • Update a field in ALL all calls under a contact

          HI guys! I have written some deluge code to update a field in my calls after i have comepleted the call, i need this field to update in all my scheduled calls as well that are comeing up. I just cant seem to get it to work, i have put teh code below,
        • MS Teams Meeting to Zoho CRM

          Has anyone figured out a good way to push MS Teams meeting info on a trigger of "meeting end" to Zoho CRM? We're looking for a way to take attendees of a meeting and meeting duration and push it into Zoho CRM after the meeting has ended. If I can just
        • 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
        • Automatic Matching from Bank Statements / Feeds

          Is it possible to have transactions from a feed or bank statement automatically match when certain criteria are met? My use case, which is pretty broadly applicable, is e-commerce transactions for merchant services accounts (clearing accounts). In these
        • Verifying Zoho Mail Functionality After Switching DNS from Cloudflare to Hosting Provider

          I initially configured my domain's (https://roblaxmod.com/) email with Zoho Mail while using Cloudflare to manage my DNS records (MX, SPF, etc.). All services were working correctly. Recently, I have removed my site from Cloudflare and switched my domain's
        • Fat Download of Ulaa Browser

          I just observed that Ulaa Browser is offering an one-capsule big download. These days it is a custom to offer a small bootstrap downloader and based on user customization options an appropriate download completes. And this is particularly common with
        • Zoho Creator customer portal limitation | Zoho One

          I'm asking you all for any feedback as to the logic or reasoning behind drastically limiting portal users when Zoho already meters based on number of records. I'm a single-seat, Zoho One Enterprise license holder. If my portal users are going to add records, wouldn't that increase revenue for Zoho as that is how Creator is monetized? Why limit my customer portal to only THREE external users when more users would equate to more records being entered into the database?!? (See help ticket reply below.)
        • Changing the Default Search Criteria for Finding Duplicates

          Hey everyone, is it possible to adjust the default search criteria for finding and merging duplicate records? Right now, CRM uses some (in my opinion nonsensical) fields as search criteria for duplicate records which do nothing except dilute the results.
        • Billing Management: #8 Usage Billing in Logistics & Delivery Services

          The logistics and delivery industry thrives on movement and precision. Every delivery completed, every kilometre driven, and every ton transported is a measurable activity. However, billing often lags behind. Many logistics companies still rely on fixed-rate
        • 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
        • Zoho sheet for desktop

          Hi is zoho sheets available for desktop version for windows
        • Next Page