Automation#27: Retain Ticket Owner on Moved Tickets

Automation#27: Retain Ticket Owner on Moved Tickets


Hello Everyone!
This week, we present to you a custom function that retains the ticket owner when a ticket is moved from one department to another.
Here’s more to help you understand the custom function:
At Zylker Techfix, Alex, the Support Engineer manages customer interactions when gadgets are submitted for servicing. Alex creates a ticket for each device and ensures customers feel supported. However, when a device requires advanced troubleshooting, the ticket is transferred to the Technical Engineering department. By default, this transfer often changes the ticket owner or leaves it unassigned, causing Alex to lose visibility and leaving customers feeling disconnected.

To solve this, Zylker Techfix used this custom function that retains Alex as the ticket owner during inter-department transfers. This allows Alex to stay updated, connect with customers, and provide timely updates while the Technical Engineers focus on resolving the issue. With this solution, Zylker Techfix ensures seamless collaboration and a better customer experience, maintaining trust and delivering quick resolutions.

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 deskconnection.
  1.5 Disable the toggle for User Credentials of Login User.
  1.6 Under Scope, choose the below scope values:
Desk.tickets.READ
Desk.tickets.UPDATE
  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.                                           
12. In the script window, insert the Custom Function given below:
  1. deskUrl = "https://desk.zoho.com";      //Edit the domain based on your DC
  2. getTicketHistory = invokeurl
  3. [
  4. url :deskUrl + "/api/v1/tickets/" + ticketID + "/History?limit=50"
  5. type :GET
  6. connection:"deskconnection"
  7. ];
  8. ticketHistory = getTicketHistory.get("data");
  9. info ticketHistory;
  10. prevTicketOwner = "";
  11. i = 0;
  12. for each  history in ticketHistory
  13. {
  14. if(history.get("eventName").equalsIgnoreCase("TicketUpdated"))
  15. {
  16. historychanges = history.get("eventInfo");
  17. for each  hchanges in historychanges
  18. {
  19. if(hchanges.get("propertyName").equalsIgnoreCase("Department"))
  20. {
  21. i = i + 1;
  22. }
  23. if(hchanges.get("propertyName").equalsIgnoreCase("Case Owner"))
  24. {
  25. if(hchanges.get("propertyValue").containKey("previousValue"))
  26. {
  27. prevTicketOwner = hchanges.get("propertyValue").get("previousValue").get("id");
  28. i = i + 1;
  29. }
  30. }
  31. }
  32. info prevTicketOwner;
  33. }
  34. if(i == 2)
  35. {
  36. break;
  37. }
  38. }
  39. jsonString = {"assigneeId":prevTicketOwner};
  40. updateTicket = invokeurl
  41. [
  42. url :deskUrl + "/api/v1/tickets/" + ticketID
  43. type :PATCH
  44. parameters:jsonString + ""
  45. connection:"deskconnection"
  46. ];
  47. info updateTicket;
Notes
NOTE
In Line 2, Replace ".com" with the domain extension based on your Data Center.
13. Click Edit Arguments and include the argument mapping as below: 
  13.1 In the Name field, type ticketID and select Ticket Id under the Tickets Section.
14. Click Done.  
15. Click Save to save the custom function.
16. Click Save again to save the workflow.
Info
Additional Note
1. The Ticket Owner will be retained only if the agent is part of the department. 
2. Set up the workflow rule in all departments where tickets may be moved, ensuring the owner stays the same and the function works as intended.
This custom function streamlines workflows and enhances collaboration, ensuring a seamless customer experience. By keeping the original ticket owner, it helps to deliver efficient, customer-focused service every step of the way.

Until next time,
Regards,
Lydia | Zoho Desk 

    • Sticky Posts

    • Zoho Desk Virtual Meetup: US Central, October 5 - 7, 2021

      After the interactive Virtual Meetups in the other regions, we are starting with the US Central and Midwest regions from October 5 to October 7, 2021. The dates for other regions will be announced soon.  At this event, we will explore the topics which
    • 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. 
    • Zoho Desk Community Meetups 2019 - Canada

      Hey there!  ​ Are you making the best use of Zoho Desk? Do you think meeting and learning from other Zoho users in your city would help? If yes, then Zoho User Group Meetups is the right place for you! We're happy to announce our first Zoho Desk User Group meetups in Toronto, Montreal, Quebec City, Calgary, and Vancouver. These meetups are a great place to meet local Zoho users, Zoho Desk product experts and partners, all under one roof.    Join us as we discuss some key Zoho Desk features and share
    • 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. 
    • Recent Topics

    • Trying to setup a record to automatically create on a weekly basis

      Hello all, I need multiple records to be automatically created on a weekly basis. What I'm trying to accomplish is, I have a maintenance database where I track when I work on IT related systems. Every week on the same days I perform backups on systems
    • Subform Zoho Form to Creator

      Hi, I would like to be able to retrieve the values of a Zoho Form subform to create an entry for each in Zoho Creator. To send from Form to Creator, I use Zoho Flow. I have a custom function, which should normally retrieve each field value then create
    • SEO for your Zoho Sites Website

      Join our live webinar to learn how to use Zoho Sites' SEO tools to boost your website's ranking. Our product specialist will demonstrate everything you need to know about optimizing your web pages to make them search engine friendly. Register here for free: https://www.zoho.com/sites/webinars/
    • Can we turn off archiving views?

      Is there a way to turn off view archiving? Some views aren't used regularly, and archiving may force us to recreate them.
    • Desk Contact Name > split to First and Last name

      I am new to Zoho and while setting up the Desk and Help Center, I saw that new tickets created or submitted from the Help Center used the Contact Name field. This would create a new Contact but put the person's name in the Last Name field only. The First
    • Multiple Selection/Select All for Approvals

      I have a suggestion from users regarding Approvals. In our environment, our Regional Managers can receive multiple requests for Approval or Rejection. They find it tedious to approve (or reject) each individual record. They would like to have a way to
    • Last Name / First Name

      Hello , My company adds contacts on a "Last Name , First Name" basis. We've noticed that when viewing accounts there is no " , " (comma). It's VERY misleading. I have set the custom view to show "last name" "first name" instead it joins them both and
    • Grouping payments to match deposits

      Is there a way to group multiple invoice payments together so they match credit card batches and grouped deposits in the bank account? Basically, we are creating invoices for each of our transactions, and applying a payment to each of the invoices. Our payments are either credit cards or checks. We want to be able to group payments together so when our bank account reflects a credit card batch made up of many transactions, or the deposit we took to the bank that has multiple checks from different
    • What takes from the inventory quantity

      There are several options SaleOrders, PurchaseOrders, Invoices... which ones disminish the Inventory quantity of the product? Does the change occurs online?
    • Post on behalf of employees as well as business socials

      Is there a way to give our sales team access to social to add their own LinkedIn accounts, so that when we schedule business posts, we can also post on behalf of them at the same time so they don't have to repost etc.
    • [Free Webinar] Enhancing your dashboards with JavaScript widgets in Zoho Creator - Creator Tech Connect

      Hello Everyone! We welcome you all to the upcoming free webinar on the Creator Tech Connect Series. The Creator Tech Connect series is a free monthly webinar that runs for around 45 minutes. It comprises technical sessions in which we delve deep into
    • Quickbooks Online Customer Creation Code

      Hi! I'm looking for code that will automatically create a quickbooks customer account when clicking on a button located directly within Zoho CRM - Contacts Module. Here's what I have and I can't seem to figure it out. xxxxx is our company id which we
    • High cpu load on client side by process sessionaudit.exe

      Hi, as stated above. This happens every time with different clients. Now, the first thing I have to do after making the connection is to go to taskmanager on client computer and kill the process 'sessionaudit.exe' If I don't their cpu is very high and
    • Zoho carbon footprint

      Hi, I am calculating the carbon footprint of my company and would like to include the use of Zoho, because it is core to the company's operations. Do you know the carbon footprint of using Zoho? This for example could be emissions from using Zoho for
    • How Do I Refund a Customer Directly to Their Credit Card?

      Hi, I use books to auto-charge my customers credit card. But when I create a credit note there doesn't seem to be a way to directly refund the amount back to their credit card. Is the only way to refund a credit note by doing it "offline" - or manually-
    • Zoho CRM Appointments and Services

      The Appointments and Services modules are nice but very limited. Is there any chance that Zoho will make these more customizable or expand the fuctionality? Appointments Allow "Appointment For" lookup to the Deals module. For us and I'm guessing others
    • Configuration de la signature de messagerie dans zoho crm

      bonjour, j'essaie d'ajouter une image de signature mais en cliquant sur l'icone image, rien ne se passe. merci de m'aider :)
    • Rebrand your CRM with the all-new custom domain mapping setup

      UPDATES TO THIS FEATURE! 19th Jan, 2024 — Custom domain mapping has been made available for portal users in Zoho One and CRM Plus. 23rd June, 2023 — Custom domain mapping has been made available for all users, in all DCs. Hello everyone! We are elated
    • How to record Staff payment and receipts

      I'm a bit new with zoho so I have few questions its great if anyone here can help I work for a logistic company, every 1-2 months we transfer a lump sum $A to drivers so that they can pay for fuels or they can buy some tools. So my questions are - What
    • Inappropriate Removal of Features

      It's the first with any software where I am experiencing that an existing customer has some of his exiting features removed. Moreover, new Zoho One users are paying less than us. Is this going to be Zoho's "normal behaviour". If so, it is going to be
    • Issue Saving Workflow Rule – "Unable to Process Your Request" Error

      Dear Zoho Recruit Support Team, I am experiencing an issue while trying to integrate a new rule into a workflow. Specifically, I am setting up a Follow-Up workflow for applicants, where a user is assigned based on specific requirements. However, when
    • Chat function not working properly

      Ever since upgrading to plus, the chat is all messed up. it is coming up behind the web page so that I cannot see what I'm typing and cannot read replies. I can only see the bottom of the text box at the bottom of the page, and then it is blocked. I've
    • Analytics report issue

      Hey, does anyone know why suddenly our Analytics report goes blank whenever we add a field from the contacts module? It shows when adding fields from all other modules. Thanks.
    • Zoho One Dashboard is not loading.

      Hi, Is anyone else experiencing a problem with the Zoho One Dashboard not loading? We started seeing the screen below on Friday afternoon and support has not responded regarding the same. Zoho One team, what's going on?
    • User Filter for Dynamic Date Dimensions in Zoho Analytics

      One challenge I frequently encounter is the need to create multiple versions of the same report—one for yearly data, another for quarterly data, another for monthly, and so on. While this works, it leads to unnecessary duplication, making maintenance
    • Remove attachment from ticket

      Hello, When we receive e-mails from our customers, lots of those e-mails contain attachments with sensitive information, which we need to delete from the ticket after using it. It is forbidden for our company to store these attachments, due to security reasons.  Is there a possibility to delete an attachment from a ticket in any way? It is necessary for us that this possibility is available. Thanks in advance, Yorick
    • When converting a lead to an account, the custom mandatory fields in the account are not treated by zoho as mandatory

      In my Account module I have a number of custom fields that I have set as mandatory. When I enter a new customer as a new account they work, I can't save the record without populating them. However when I convert a lead, my CRM users are able to save the
    • [Client Script] How to get selected related record Id

      Hi Zoho, I set an client script button in related record list. We would like to fetch the selected record id/field for further action. But I don't know how to get the selected id. If there is not possible to get related record info, then what does the
    • need help to set up feeds to Zoho books with CRM Perks plugin

      Hi there, I need help setting up feeds with the CRM Perks plugin. It is supposed to send various feeds, like orders, payments, etc., from Woocommerce to Zoho Books. I have been trying so hard but seem to be too thick to get it done :-( For months, I worked
    • Write-Off multiple invoices and tax calculation

      Good evening, I have many invoices which are long overdue and I do not expect them to be paid. I believe I should write them off. I did some tests and I have some questions:  - I cannot find a way to write off several invoices together. How can I do that,
    • How to make a ScreenPop with Customer Information

      Hi, I need open a customer sheet when I receive a call on my pbx. I have a client on my PC that are able to open a web page with a specific url. How can I leave open the Zoho CRM application and search for a customer? Thank you in advance, Mauro
    • Simple Deluge Script

      Hi. I'm brand new to functions but I'm trying to create a script to convert a date field in Meetings to a written format. For example, instead of 02/05/2025 8:00AM, I'd like to convert it to Wednesday, February 5, 8:00 AM. My Date field is the API Name
    • Send emails directly via Cases module

      Greetings all, The ability to send emails from the Cases module, which users have been eagerly anticipating, is now available, just like in the other modules. In Zoho CRM, Cases is a module specifically designed for managing support tickets. If your organization
    • Problem with delivery status in delegate account

      Hello, We have a problem with delivery status in "sent" folder in delegate account. Some messages has no status, some messages has "waiting" status, Some messages are delivered, some messages are delivered wit delay, some are not delivered. Conclusion:
    • Zoho Projects - Custom Objects

      Hello, is there the ability now, or in the near future, to add custom objects to Zoho Projects? The requirement here would be to have the ability to track change requests to a project's budget. The idea here is to have the ability to create a custom Object
    • Create Package From A Picklist

      Dear Zoho, Can it be made possible to create a package from a picklist? The reason our company makes a picklist is for that to become a package Our sales orders have 600-1000 items I hope that makes it clear that it's hard to delete 990 items when we
    • Enable Organization-Wide reCAPTCHA Settings in Zoho Forms

      Hello Zoho Forms Team, We appreciate the existing security options for Zoho Forms, including Google reCAPTCHA v2 (checkbox) and reCAPTCHA v2 (Invisible). However, we have a major usability concern: Current Limitation: Right now, CAPTCHA is a form-specific
    • Store Google reCAPTCHA Site Keys & Secrets in Zoho Forms

      Hello Zoho Forms Team, We appreciate the support for Google reCAPTCHA v2 (checkbox) and reCAPTCHA v2 (Invisible) in Zoho Forms. However, we have a significant usability concern regarding the current implementation. Current Limitation: Every time we want
    • Ho to restrict access to row level to Zoho Analytics users

      Let me explain the scenario we are trying to achieve. We have an online system our team members work with. On it we have 6 users that manage data from different areas (North, South, East and West). We would like to transfer this information to a Zoho
    • Add Support for Google reCAPTCHA v3 in Zoho Forms

      Hello Zoho Forms Team, We appreciate the security measures currently available in Zoho Forms, including Zoho CAPTCHA, Google reCAPTCHA v2 (checkbox), and reCAPTCHA v2 (Invisible). However, we would like to request the addition of support for Google reCAPTCHA
    • Next Page