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

        • 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
        • Tags for New Tickets

          Hi there, When creating a new ticket, there is currently no way to choose a tag you would like to associate with the new ticket. Being able to associate a tag while creating a new ticket will be very beneficial as it will save time and flow well with
        • Default Sorting on Related Lists

          Is it possible to set the default sorting options on the related lists. For example on the Contact Details view I have related lists for activities, emails, products cases, notes etc... currently: Activities 'created date' newest first Emails - 'created
        • 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
        • Zoho Desk: No Incoming email

          Is Zoho Desk services down? No incoming email reflect to desk tickets.
        • Mapping a new Ticket in Zoho Desk to an Account or Deal in Zoho CRM manually

          Is there any way for me to map an existing ticket in Zoho desk to an account or Deal within Zoho CRM? Sometimes people use different email to put in a ticket than the one that we have in the CRM, but it's still the same person. We would like to be able
        • Zoho CRM - Widgets | Update #3 : Introducing SDK V1.5 along with new ZDK Methods and ZRC Support

          Hello everyone! Widgets in Zoho CRM just got a big upgrade! With the release of SDK v1.5, developers can now create more immersive widget experiences. This update elevates Widget development with new ZDK methods for easier interactivity and ZRC support
        • How to update "Lead Status" to more than 100 records

          Hello Zoho CRM, How do I update "Lead Status" to more than 100 records at once? To give you a background, these leads were uploaded or Imported at once but the lead status record was incorrectly chosen. So since there was a way to quickly add records in the system no matter how many they are, we are also wondering if there is a quicker way to update these records to the correct "Lead Status". I hope our concern makes sense and that there will be a fix for it. All the best, Jonathan
        • Unusual activity detected, account blocked

          I am unable to send emails and am getting the error "Outgoing blocked: Unusual activity detected. To unblock your account, please and submit a request. Learn more.". I am unsure as to why this is happening since all my activity is legitimate, mainly confirmation
        • Unlock agreement intelligence with Zoho Sign's latest AI updates

          Hello! If you've been struggling with long, complex agreements and spending way too much time on them, here's exactly what you'll want to hear: Zoho Sign now integrates with OpenAI's ChatGPT to make agreement management smarter and simpler. Acting like
        • Unable to Send Emails – Outgoing Mail Blocked (Error 554 5.1.8)

          Description: Hello Zoho Support Team, I am facing an issue with my Zoho Mail account ( admin@osamarahmani.tech ). Whenever I try to send an email, I get the following error: 554 5.1.8 Email Outgoing Blocked I would like to clarify that I have not done
        • Issue connecting Zoho Mail to Thunderbird (IMAP/SMTP authentication error)

          Dear Zoho Support, I am trying to configure my Zoho Mail account on Thunderbird, but I keep getting authentication errors. Account: info@baktradingtn.com Domain: baktradingtn.com Settings used: IMAP: imap.zoho.com, Port 993, SSL/TLS, Normal Password SMTP:
        • Payment issue with Mail Lite plan – personal NIF not accepted as payment info

          Hello, I have already contacted Zoho Support by email regarding this, but since I haven’t received any reply yet, I’m sharing it here as well to see if the community can help. I’m facing a payment issue for my Mail Lite plan. I have a personal account
        • Customer payment alerts in Zoho Cliq

          For businesses that depend on cash flow, payment updates are essential for operational decision-making and go beyond simple accounting entries. The sales team needs to be notified when invoices are cleared so that upcoming orders can be released. In contrast,
        • {"code":1038,"message":"JSON is not well formed"}

          Today this began failing: sales_order_data = zoho.books.createRecord("salesorders",books_organization_ID,order_data); with this error message. {"code":1038,"message":"JSON is not well formed"} This code has been running for two years. Here is the input
        • In arattai received message can't be deleted

          The issue has been noticed in following: arattai app (Android) arattai app (Window) arattai web While the message posted by me may be deleted, the ones received from others can't be. The item <Delete> change to <Report> when the message is a received
        • Zoho Editor

          Zoho PDf Editor is not working I am clicking on EDIT PDf then it again bringing me back to the same page. again and again.
        • Figma in Zoho Creator

          Hi Team, I’m creating a form using Figma and would like to know how to add workflows like scheduling, custom validation, and other logic to it. Can anyone help me understand how to set this up for a Figma-based Creator UI form?
        • How to Delete Personal Account Linked with My Mobile Number in past or by someone else

          How to Delete Account Created with My Mobile Number in past or by someone else This is creating issues in making or sync with my credentials mobile and email address..
        • Enable / show scroll bar when Mega Menu is opened

          Hey there I am using the mega menu add-on and experience a "flicker" whenever the mega menu opens. The reason is, that the scrollbar, which has a width of a few pixels, stops showing when the mega menu opens. As the scrollbar disappears the whole page
        • Restore lost Invoice!

          Some time ago I tried to Upgrade from Invoice to Books. I not upgraded and staid n Invoice. Now i tried again and first i deleted the old trial of books. But now all is gone, PLEASE HELP!! i have no backup and i have to have at least 7 years data retention by law. 
        • Zoho Desk Down

          Not loading
        • lookup and integrated forms

          I might be misunderstanding things but I wanted to integrate our zoho crm contacts into creator. I imagined that when I used the integration it would mirror into creator. It did brilliant. BUT We have a ticket form in creator that we want to use a lookup
        • Partially receive PO without partial Bill?

          Most of our inventory is pre-paid. Let's say we purchase 30 pieces of 3 different items for a total of 90 pieces. It is common for our supplier to send us the items as they are ready. So we will receive 30 pieces at a time. How can I partially receive
        • 2 users editing the same record - loose changes

          Hello, I'm very new to Zoho so apology if this has been addressed somewhere i can't find. I have noticed the following: If we have 2 users put an inventory item in edit mode at the same time: say user1 click on edit and user2 while user1 is still in edit,
        • How to get the Dashboard page to be the first page when you open the app

          So when it opens on a tablet or phone it opens on the welcome page, thanks.
        • How I set default email addresses for Sales Orders and Invoices

          I have customers that have different departments that handle Sales Orders and Invoices. How can i set a default email for Sales Orders that's different than the default email for Invoices? Is there a way I can automate this using the Contact Persons Departments
        • Adding hyperlinks in CRM emails time automatically

          It may just be me, but when I am writing an email to a lead, I find inserting a hyperlink very time consuming. Granted, I can use templates but there are a ton of scenarios where I might want to put a link in to an website that wouldnt require me to go though the effort of creating a template.  Ideally, the crm would identify that I that a string of text is a URL and insert the hyperlink automatically, just like microsoft outlook or gmail. Has anyone else had this same experience and found a way
        • Notes Attachments

          Two things it would be nice to have the attachment size the same as the attachments sections and it would be nice to be able to attach links like you can in the attachments section. Thank you
        • Zoho Sheet - Desktop App or Offline

          Since Zoho Docs is now available as a desktop app and offline, when is a realistic ETA for Sheet to have the same functionality?I am surprised this was not laucned at the same time as Docs.
        • 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
        • Next Page