Automation #6 - Prevent Re-opening of Closed Tickets

Automation #6 - Prevent Re-opening of Closed Tickets



This is a monthly series where we pick some common use cases that have been either discussed or most asked about in our community and explain how they can be achieved using one of the automation capabilities in Zoho Desk.

Typically when a customer submits a support ticket, it is assigned with a status to map its journey. Zoho Desk provides you with four default statuses: Open, On hold, Escalated, Closed; along with the option to create your own statutes which can then be mapped to these default ones.  
 
Once the solution has been provided to the customer and the ticket is resolved the ticket is marked as "Closed". But the status changes from "Closed" to "Open" if the customer replies to the same ticket. While this behaviour might be useful for some businesses who prefer to continue the same thread instead of reopening a new one, some might not want to do so. To ensure the ticket stays in the closed status and start a new thread for a customer reply, you can create a Workflow Rule and map it to a custom function script to achieve the desired results.

Prerequisite:

To ensure the Closed status is maintained even if a customer replies to a ticket, perform the following steps: 
1. Go to Setup, and under Customization, click Ticket Status, uncheck the "Fall-Back To Default" checkbox against "Closed" status.
2. OrgID, to get the OrgID, navigate to "Setup >> Developer Space >> API". Note down the OrgID

To create the workflow rule, perform the following steps:

1. Go to Setup, and under Automation, click Workflows.
2. On the left panel, under Workflows, click Rules > Create Rule.
In the Basic Information section, perform the following steps:
3. In the Module drop-down menu, select Tickets.
4. Enter a name and description for the rule.
5. If you want to activate the rule right away, select the Active checkbox. Else, you can just create the rule now and activate it later on the Rules page.
6. Click Next.
In the Execute on section, perform the following steps:
7. Select the Customer Reply checkbox to execute this rule every time a customer responds to a ticket.  
8. Click Next.
9. In the Criteria section, set the criteria as "Status is Closed" and click "Next"
In the Actions section, perform the following steps:
10. Click the + icon under "Action" and select "New" next to Custom Functions
11Enter a name and description for the custom function.
12. In the script window, input the Custom Function you find below:
  1. numberOfHours = 48;
  2. orgId = "Paste Org Id here";
  3. //Please paste your OrgID
  4. TicketInfo = zoho.desk.getRecordById(orgId,"tickets",TicketID);
  5. lastModified = TicketInfo.get("closedTime").toTime("yyyy-MM-dd'T'HH:mm:ss");
  6. status = TicketInfo.get("status");
  7. hoursBetween = now.hoursBetween(lastModified).abs();
  8. if(hoursBetween >= numberOfHours)
  9. {
  10. threadResponse = zoho.desk.getRelatedRecords(orgId, "threads", "tickets", TicketID);
  11. if(threadResponse.get("data") != null)
  12. {
  13. latestThreadID = threadResponse.get("data").get(0).get("id");
  14. splitTicketResponse = zoho.desk.ticket.split(orgId, TicketID, latestThreadID);
  15. info "splitTicketResponse ::::" + splitTicketResponse;
  16. info "======================================================";
  17. NewTicketNumber = splitTicketResponse.get("ticketNumber");
  18. NewTicketID = splitTicketResponse.get("id");
  19. }
  20. }
  21. else
  22. {
  23. jsonString = {"status":"Open"};
  24. TicketResponse = zoho.desk.update(orgId, "tickets", TicketID, jsonString);
  25. info TicketResponse;
  26. }

NOTE:
Line 1 numberOfHours = 48, refers to the hours post which the new response received in a existing ticket should be split as new ticket. You can replace the number of hours based on your requirement.
Line 2 replace the orgId.

13. Click Edit Arguments
14. In the Name field type TicketID, and from the Value drop-down list select Ticket Id under Ticket Information
15. Click "Save" to save the custom function
16. Click "Save" again to save the workflow.

These steps would ensure that when a ticket is marked Closed, it stays in the Closed status, even if a customer replies after the mentioned hours. But also ensure that the new reply is added as a new ticket so you don't miss anything!

    Zoho Campaigns Resources


      • Desk Community Learning Series


      • Digest


      • Functions


      • Meetups


      • Kbase


      • Resources


      • Glossary


      • Desk Marketplace


      • MVP Corner


      • Word of the Day


      • Ask the Experts


        • 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. 

        Zoho CRM Plus Resources

          Zoho Books Resources


            Zoho Subscriptions Resources

              Zoho Projects Resources


                Zoho Sprints Resources


                  Zoho Orchestly Resources


                    Zoho Creator Resources


                      Zoho WorkDrive Resources



                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ






                              ご検討中の方

                                • Recent Topics

                                • Zoho Creator Get Records Integration Task

                                  Trying to use Zoho Creator's Get Records integration task to fetch records from a specified report in Zoho Creator: https://www.zoho.com/deluge/help/creator/get-records.html However, I continue to receive a code 2894 error saying that the report is not
                                • How to export customer contacts from Zoho desk

                                  How to export customer contacts from Zoho desk
                                • New in WorkDrive: WorkDrive Genie, a quick-editing app for desktop (Beta)

                                  The WorkDrive Genie app lets you open and edit any of your WorkDrive files on the web with your default desktop applications. For example, you can open and edit files such as documents, images, and videos with Microsoft Word, CorelDRAW, and Adobe Premiere
                                • Internal Notification Email contact fields

                                  Whenever a new customer is added in Books we add the contact to Campaigns. This is easy to do via sync. We need to send an internal email when the contact is added in Campaigns. This is also easy to do with "Internal Notification Email" automation. Question
                                • Zoho Books | Product Updates | January 2025

                                  Hello users, Now that January is over, here are some exciting updates to make this new year even better. We’re back with new features and enhancements in Zoho Books, including comparing fields as criteria in workflow rules and a custom SMTP integration.
                                • zoho account

                                  we are unable to log tickets to IT due to our zoho account we unable to open
                                • One editable subform entry to more than one parent record (of the same parent type)

                                  Is it possible for two records of Form A to share a subform B record? As in the subform B record shows up and is editable in both of the Form A records and when I create a form A record I can associate it with other form A records through deluge. I'm
                                • WhatsApp

                                  Hola quiero saber cómo puedo integrar WhatsApp y Zoho desk
                                • Auto CC is Off but still sends email

                                  Hi, I often forward an email from my work address into the ticket system using my custom support@xxxxx.zohodesk.com email. Even though I have the Auto CC email replies to my support box Off (image attached), It still includes that when I reply. And if
                                • Configure Notes Title for Blueprint Transition

                                  It'd be very helpful to be able to configure note titles on blueprint transitions when requiring notes. This would help tie back the history of notes to the blueprint actions. We have some approval processes in our blueprint and require notes for the
                                • Zoho Signing embedded with iframe is moved out of view when navigating to focus signature on mobile devices

                                  Dear Zoho team, I'm having difficulty embedding the signing url into a website for users to sign on their phones, it's not working perfectly. The problem occurs after the user accepts and continues to sign, or the user clicks to redirect to any of the
                                • How to change the pdf title of invoice

                                   Hi! When we generate an invoice in pdf format, the title of the document still appear in English, for example Invoice-XXX How we can customize the title of the invoice generated?
                                • Paypal Payaments Pro not available in our live account.

                                  We have a test environment set up and one of hte payment gateways is paypal payments pro. This option is not avaiable in our live account and the regular paypal gateway says auto-charge not available. Why does paypal payments pro not appear in our live
                                • CRM Hack #2: Automate sending of birthday greetings to your customers.

                                    Hello everyone! What sets you apart as a sales person is your ability to add that personal touch to your business relationship with your customers. Sending a gift on a special day, or leaving a note wishing them on their birthdays, are small, yet significant actions that show your customers that you care. And these are actions done without any expectations :) You must be engaging with a lot of customers and it is highly unlikely that they all are your friends on Facebook or some social channel,
                                • Adding Markdown text using Zoho Desk API into the Knowledge Base

                                  Hi Zoho Community members, We currently maintain the documentation of out company in its website. This documentation is written in markdown text format and we would like to add it in Zoho Knowledge Base. Do you know if there is REST API functionality which is able to support this operation ? Thank you in advance, Leandros
                                • Multi-Select lookup field has reached its maximum??

                                  Hi there, I want to create a multi-select lookup field in a module but I can't select the model I want the relationship to be with from the list. From the help page on this I see that you can only create a max of 2 relationships per module? Is that true?
                                • Create/Update Query Tables through API

                                  We need an API to edit the query tables. Currently if columns are added/removed from a normal table, we have to edit the query tables made on top of that table manually to reflect the changes. We want to automate this task to automatically update the
                                • Displaying Inactive Customers & Vendors

                                  Can we please have this choice in general settings, it's a pain showing hundreds of inactive records. A simple search clears the "Active records" filter ! A simple message showing "Inactive records match your search criteria but have been omitted, would
                                • Marking a Desk ticket as Unread after merge

                                  We have a custom script that runs against every new ticket and auto-merges it with any existing ticket that matches our criteria. That works fine but there is no functionality that reverts the newly-updated ticket back to an "unread" state. I found the
                                • Ticket rápido e simples

                                  Boa tarde pessoal! Tudo bem? Me chame de gustavo! Estou em busca de um sistema simples, prático e rápido!,sendo o seguinte caso: Como possuimos um serviço de endereço fiscal, onde os clientes criam endereço fiscal conosco, ao longo do tempo nós recebemos
                                • Overview on users IMAP settings

                                  We have about 30 users who all have the channels/email/email configuration/IMAP integration/O365 enabled and emails are synchronized. Here my problem: Passwords for the email accounts are expiring on individual bases and most of the users forget to update
                                • Meeting integration with Otter.ai

                                  Would love for an integration with an AI transcription service like Otter.ai to be integrated with Zoho Meeting. Thanks
                                • Adding Attachment to Desk Ticket via Deluge

                                  Hello, My team has a process where some people are entering information into a workbook in Zoho Sheet, and we need to get a copy of workbook into a ticket in Desk. We currently have a 'Submit' button on the Sheet that triggers a webhook to Flow, and from
                                • Enhancing self-service capabilities with AI-based Zia Answer Bot

                                  Hello All, Zia Answer Bot is available with better accuracy to enhance the self-service capabilities of the platform and to empower the users to resolve queries independently. By leveraging knowledge base (KB) resources, the Answer Bot provides accurate
                                • BUG ALERT: Client Script + Commands -> $Page contextual data is not updated

                                  When using the new Client Script Commands feature, there is an issue with the Client Script $Page contextual data not accurately being updated each time a Command is run. Assuming a Client Script Command called "Client Script Command Bug" with the following
                                • Error AS101 when adding new email alias

                                  Hi, I am trying to add apple@(mydomain).com The error AS101 is shown while I try to add the alias.
                                • Leistungsdatum in Rechnungen (Zoho Books)

                                  Hallo, ist es irgendwie möglich den Leistungszeitraum in der Rechnung aufzuführen? Beste Grüße Aleks
                                • Custom module in Portals won't edit

                                  I have a custom module but Portals access users can't edit it. They can create and delete though. In the Portals settings I have Create, Edit and Delete set turned on. Anyone know what this could be?
                                • On-prem version of Zoho Desk

                                  Is there an on-prem version of Zoho Desk available for enterprise customers if we have additional aspects of security that aren't covered with current legal and data security terms?
                                • 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
                                • Multiple email accounts in MacOS mail app

                                  Hey, I am facing a problem while using Zoho mail app on macos. The clear description of the problem: I am managing multiple Zoho accounts and each of them have some custom email addresses. address1@domain1.com is my main account, address2@domain2.com
                                • Delay in delivery of emails

                                  I'm experiencing random delays for emails sent from Zoho account. Headers show that the message reached mx.zohomail.com almost instantly, followed by a delay of anywhere from 3-15 minutes (and counting).  Please confirm whether this is a system-wide issue.
                                • Convert Leads to Deals in Portals?

                                  Is there a way to convert leads to deals, like the main program does? It doesn't seem to do it in portals. It seems a bit pointless having it.
                                • Need Marketing specialist for Zoho client

                                  HI, I am looking for someone to help a client with their social media marketing. I have set up Zoho for them, but they want to start various social media campaigns and are looking for a referral. This is for a marketing person who is familiar with Zoho
                                • Error: Invalid login: 535 Authentication Failed 0|server | at file:///var/www/html/AHFits/Controllers/mailer.js:70:35 0|server | at process.processTicksAndRejections (node:internal/process/task_queues

                                  I tried every thing anable 2 factor auth, generate app specific password, add MX,SPK,DKIM everything i can do but still I am unable to user email through nodemailer. I work on development but when it Runs on production(VPS) I got 535 Authentication Failed
                                • Pivot Chart - Zoho Creator

                                  In Zoho Creator, I want to enable an edit option within the Pivot Chart itself. Additionally, I want to avoid showing duplicated values for certain columns. For example, I’ve created a month-wise sales report for each product type. The form contains fields
                                • Not Receiving Incoming Mails

                                  Today I had successfully verified and configured the Zoho Business Mail setup for my domain "weturn.ae" But the Business mail ID i had created not receiving the incoming mails but I can send them. So Please help me with the issue
                                • Cant BCC comments

                                  Whats the reason why we cant bcc to add to comments? We are getting this error:  We are unable to process this email. WHY DID THIS HAPPEN? We suspect the below reasons to be the cause of failure : 1. You might have mis-spelt the email address. 2. You might have added the email address in BCC I used the copy option within the comments to copy the email address. It works fine if I cc, just not bcc.
                                • Private Tickets

                                  Sometimes we want to be able to create a ticket for a customer that they cannot see either in email or in their help center. Sometimes we see an issue on their account or something odd, or our analytics show something proactively needs to be addressed
                                • email Signature from Contact page not working

                                  Hey guys, I just set up my signature for the email i integrated with ZOHO. It works when I'm using the email client but when I send an email from the contact or lead page it doesn't add the signature. problem on my end or ZOHO's? thanks for the help!
                                • Next Page