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

        • Way to update CRM records in quik view

          I have custom module in zoho crm and that module have 500 records. I want a quick way or UI so that user can easily update the record information in quick view without going to record detail view or edit view. I tried zoho sheet option but in zoho sheet
        • Writer sing up problom

          Zoho writer sing up prolom face
        • Where to integrate Price Book and Product List Price

          Hello, We sync zoho crm all modules with all data to zoho analytics. In zoho crm, we have "Price Books" and "Products" modules, where each product is assigned to a few price books with different list prices. From zoho crm, I am able to export a dataset
        • Form / CRM Integration Not entering into workflow

          I have a simple form setup with company name, first name, last name and lead source. Each of the fields are mapped to CRM Leads module. When the form is submitted, the lead is populated properly. I also have a workflow created that when the lead source
        • Automating CRM backup storage?

          Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
        • Zoho Slowness - Workarounds

          Hi all, We've been having intermittent slowness and Zoho just asks for same stuff each time but never fix it. It usually just goes away on it's own after a couple weeks. Given that speed is a very important thing for companies to be able to keep up with
        • First day of trying FSM in the field.

          What we found. 1. with out a network connection we were unable to start a service call? 2. if you go to an appointment and then want to add an asset it does not seem possible. 3. disappointed not to be able to actually take a payment from within the app
        • Don't understand why Forms Mobile Scan and Fill not working

          I have configure enabled mobile scan and fill, I have enabled QR and Bar code on two fields name and position, I have mapped seq 1 to Name and seq 2 to position, I have created a 2d QR code with the person names and position, seperated by a comma. When
        • Recurring Supervisor Rule Reminders for Open/In-Progress Tickets

          Hello Zoho Support Team, I would like to suggest a potential improvement regarding reminders for tickets and activities in Zoho Desk. Currently, it is possible to set reminders only once. In the Supervisor Rules section, it is possible to configure reminders
        • Template usage

          Hi, We are using some templates as a response to customer questions. Is it possible to analyze the usage of these templates? We want to know if the use of our templates has increased over time
        • Round robin

          Hi, I'm trying to set up a round robin to automatically distribute tickets between agents in my team but only those tickets that are not otherwise distributed by other workflows or direct assignments. Is that possible and if so which criteria should I
        • How to mute chat notification sound by default in Zoho SalesIQ?

          We’ve recently embedded the Zoho SalesIQ chatbot on our website, and we’ve noticed that notification sounds sometimes play even when the visitor hasn’t interacted with the chat widget yet. We’re trying to understand two things: Why do these sounds occur
        • Ticket Status Colors

          Can i change the colors of Ticket Status in the admin panel? Or even change the background of the entire cell of a Critical ticket? This way its easy for my agents to see a urgent ticket when it comes in. Right now everything is black text. Here Right
        • Sync Lookup Fields from Zoho CRM

          HI Team, I have synced a lookup field from my CRM data to Campaigns. When I view the synced data the field appears to display a Zoho CRM record ID rather than the text value. Is it possible to get the sync to import the text value rather than the CRM
        • New From Address cannot verify

          I have created a new From Address, which is the support@ address for my domain, that forwards to the default support mailbox. Presumably then, the verification email that is sent, should turn up as a ticket, but it does not. How can I verify my from address so that I can use my own domain?
        • Closing Accounting Periods - Invoice/Posting dates

          Hi, I have seen in another thread but I'm unsure on how the 'transaction locking' works with regards to new and old transactions. When producing monthly accounts if I close December 24 accounts on 8th Jan 25 will transaction locking prevent me from posting
        • How to update/remove file in zoho creator widgets using javascript API

          Hi Team, I have developed a widget which allows inserting and updating records I have file upload field with multiple file upload. Now while doing insert form record, I am using uploadFile API to upload files for that record. I am using updateRecord API
        • issue with image thumbnails not showing in Image Selector

          We have been using Zoho Campaigns for over a year, maybe close to two years, and this issue just started happening in the last month. I wanted to wait to see if it would resolve on it's own, and it doesn't seem to be. The thumbnail images for all new
        • Deluge Script for adding tag

          Trying to create a custom function where a tag is added to a record - but for the life of me, I cannot figure out how. Help please! Moderation Update: Adding the help doc and sample to add Tags to records via deluge here for everyone's benefit. tag1 =
        • Automatically embed short AI-generated product videos in Zoho Mail campaigns

          Hi Zoho team, I've been experimenting with AI-generated product videos and wanted to suggest an automation idea for Zoho Mail and CRM campaigns . For example, here's a quick demo video I created automatically using AI — no filming or editing required:
        • Unlock your Zoho Vault with OneAuth, Windows Hello, TouchID, YubiKey, and many more!

          Hello everyone, We are thrilled to introduce one of the most highly requested features – the ability to unlock your Zoho Vault using various authenticators. The primary purpose of a password manager is to remember just one master password and securely
        • Blueprint or Validation Rules for Invoices in Zoho Books

          Can I implement Blueprint or Validation Rules for Invoices in Zoho Books? Example, use case could be, Agent confirms from client that payment is done, but bank only syncs transactions tomorrow. in this case, Agent can update invoice status to done, and
        • 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
        • How can I get base64 string from filecontent in widget

          Hi, I have a react js widget which has the signature pad. Now, I am saving the signature in signature field in zoho creator form. If I open the edit report record in widget then I want to display the Signature back in signature field. I am using readFile
        • Add Setting Values to the Rules

          Hi, It would be great to use the rules to set values in fields for submission, such as if a Type is X then set the Field Y to 10. Thanks Dan
        • So we ran with it for the week

          In our company i bit the bullet and ran with FSM for a whole week. Service calls, deliveries and surveys. Covering about 30-120 miles a day to domestic properties. Loved the appointment list and satnav integration. Loved the timer to measure the appointments.
        • Is there a way to set Document Owner/Sender via the API

          When sending requests for zoho sign, it would seem zoho uses the id of the person that created the zoho api cred to determine the owner_id, is there a way to set a default for this?
        • What's New - September 2025 | Zoho Backstage

          September has been a different month for Zoho Backstage. Instead of rolling out a long list of new features, we focused on something just as important: Performance, reliability, and stability The event season is in full swing, and organizers are running
        • Prevent stripping of custom CSS when creating an email template?

          Anyone have a workaround for this? Zoho really needs to hire new designers - templates are terrible. A custom template has been created, but every time we try to use it, it strips out all the CSS from the head.  IE, we'll define the styles right in the <head> (simple example below) and everything gets stripped (initially, it saves fine, but when you browse away and come back to the template, all the custom css is removed). <style type="text/css"> .footerContent a{display:block !important;} </style>
        • Stock Quotes/Spreadsheet

          It would be nice if we could download security and mutual fund prices from Yahoo Finance (or?) in order to maintain an up to date investment portfolio on Zoho. Any chance?
        • link to any Belgian bookkeeping software?

          Hello, Does anyone on this Forum can help me with the question whether the ZOHO CRM (Invoices) or ZOHO Book can be linked to software that is used for Belgian Bookkeeping/accountancy? By linking, I mean either with the help of a middleware program or either by the ability to export the custom made reports as CSV-files... If someone has an experience with online CRM-Accountancy in Belgium, with ZOHO (or other), it would be great to read it... Thank you
        • marketing automation

          wants to know about the zoho marketing automation
        • Problems with email templates (HTML - Outlook)

          Hi there, I've been trying to create a newsletter from the template "Business 4". Everything looks great in the preview, but when I send it to my Outlook inbox, the layout doesn't seems to stick. More particularly: - The line-height is way more reduced, even though I used the line-height tool from the template - Columns but they are sometimes misaligned - Font size is not always the one I've selected. Could you help? Thanks!
        • Zoho CRM IP Addresses to Whitelist

          We were told to whitelist IP addresses from Zoho CRM.  (CRM, not Zoho Mail.) What is the current list of IP Addresses to whitelist for outbound mail? Is there a website where these IP addresses are published and updated?  Everything I could find is over
        • How to create a drop down menu in Zoho Sheets

          I am trying to find out, how do I create a drop down option in Zoho sheet. I tried Data--> Data Validation --> Criteria --> Text  --> Contains. But that is not working, is there any other way to do it.  Thanks in Advance.
        • Introducing Keyboard Shortcuts for Zoho CRM

          Dear Customers, We're happy to introduce keyboard shortcuts for Zoho CRM features! Until now, you might have been navigating to modules manually using the mouse, and at times, it could be tedious, especially when you had to search for specific modules
        • Zoho CRM's custom views are now deployable from sandboxes

          This feature is now available for users in the AU, JP, and CN DCs. This feature is now available for users in CA and SA DCs. New update: This feature is now available for users in all DCs. Hello everyone, We're excited to announce that you can now deploy
        • Where are Kanban swimlanes

          So i've been playing with Zoho Projects Kanban view a bit more. It appears that task lists are being used as the Kanban columns, which makes sense from the implementation point of view but not the logical one.  Kanban columns are statuses that a task can flow through, while a task list has been a logical way to organize related tasks and relate them to a mislestone. In other words a task in a particular task can go through several stages while remaining in the same task list. After doing some research
        • Send Automated WhatsApp Messages and Leverage the Improved WhatsApp Templates

          Greetings, I hope all of you are doing well. We're excited to announce a major upgrade to Bigin's WhatsApp integration that brings more flexibility, interactivity, and automation to your customer messaging. WhatsApp message automation You can now use
        • Scheduling Calls in CommandCenter / Blueprints

          I would love it if you could add a function to schedule a call in the lead's record for a future date. I know you can add a Task by going to Instant Actions > Task and completing the form: These tasks go into the lead's record under Open Actions. But
        • Next Page