Automation #16: Automate Ticket Reopening on Scheduled Timestamp

Automation #16: Automate Ticket Reopening on Scheduled Timestamp



Hello Everyone!

This edition uncovers the option to schedule reopening a ticket automatically.

Zylker Finance tracks insurance policyholder activities through Zoho Desk. For policyholders who pay monthly premiums, tickets are closed upon payment completion. To efficiently follow up with its customers every month, Zylker Finance automatically reopens existing tickets on a specific date rather than creating new ones. This helps insurance agents ensure they do not miss any customer interactions.

Zylker Finance automates this process using a custom function in Schedules to ensure efficient tracking and operations management. Let's delve into the setup to understand the configurations.

Prerequisites

1. Create a custom date field in the Ticket layout.
Navigate to Setup >> Customization >> Layouts and Fields >> Choose the preferred department and select the layout to add a custom date field. Assign a Preferred Name to the Date Field.



Click on the gear icon of the custom date field and note the API name.





2. Fetch Department ID
To fetch department ID, go to Setup >> General >> Departments >> click on the preferred department. Go to the address bar and find the last number series in the URL; this is the department ID. Copy the ID appended in the URL and paste it into line 9 of the custom function for the departmentId value.  



3. Create a connection
3.1 Go to Setup >> Connections under Developer Space
3.2 Click Create Connection.
3.3 Select Zoho OAuth under Default Connection.
3.4 Give the connection name as deskconnection. 
3.5 Under Scope, include the below scopes
                  Desk.tickets.READ
                  Desk.search.READ
                  Desk.tickets.UPDATE
3.6 Click Create and Connect.
3.7 Click Connect and click Accept.
Connection is created successfully.

Create Schedules
1. Go to Setup >> Automation, choose Schedules.
2. Click on New Schedule in the top right corner. (Ensure that the correct department is selected.)
3. Give a preferred Name and Description for the Schedule.



4. Under Execute on, choose the preferred Date and Time for the schedule to begin execution. 
5. Under Repeat, choose the preferred frequency as Every Day. Under Ends, choose Never.
6. Under Functions, click on Create Function.



7. Give a Name and Description for the function. Paste the below custom function in the script window.
  1. // ----<<<< User Inputs >>>>----
  2. //Replace deskURL with the URL based on your DC
  3. deskURL = "https://desk.zoho.com";
  4.  
  5. //Replace your custom date field's API Name
  6. cfAPIName = "cf_action_date";
  7.  
  8. // Replace *********** with your department Id
  9. departmentId = ***********;
  10.  
  11. // ----<<<< Initial Configs >>>>----
  12. logs = Map();
  13. ticketIdList = List();
  14. currDate = now.toText("YYYY-MM-dd");
  15.  
  16. //---------------------------
  17. try {
  18.     // ---- start your logic from here ----
  19. ticketSearch = invokeUrl
  20. [
  21. url : deskURL + "/api/v1/tickets/fieldSearch"
  22. type : GET
  23. parameters : { "from" : 0 , "limit" : 50 , "field1" : cfAPIName+":"+currDate,"departmentId":departmentId }
  24. connection : "deskconnection"
  25. ];
  26. logs.insert("ticketSearch":ticketSearch);

  27. if ( ticketSearch != null && ticketSearch != "" && ticketSearch.containsKey("data") && ticketSearch.get("data").size() > 0 )
  28.     {
  29. for each tkt in ticketSearch.get("data")
  30.         {
  31. ticketIdList.add(tkt.get("id"));
  32.         }
  33.     }
  34. logs.insert("ticketIdList":ticketIdList);
  35. if ( ticketIdList.size() > 0 )
  36.     {
  37. bulkUpdateTickets = invokeUrl
  38. [
  39. url : deskURL + "/api/v1/tickets/updateMany"
  40. type : POST
  41. parameters : { "ids" : ticketIdList , "fieldName" : "status" , "fieldValue" : "Open" } + ""
  42. connection : "deskconnection"
  43. ];
  44. logs.insert("bulkUpdateTickets":bulkUpdateTickets);
  45.     }
  46. }
  47. catch(errorInfo) {
  48.     logs.insert("errorInfo": errorInfo);
  49. }
  50.  
  51. info "logs: \n" + logs;
Note : In line 3, replace the URL with the Desk URL corresponding to your DC.
[ Example: For US DC, the url will be https://desk.zoho.com
                         India DC, the url will be https://desk.zoho.in
                         EU DC, the url will be https://desk.zoho.eu]
In line 6, replace cf_action_date  with the your custom date field's API Name. In line 9, give the department ID.
8. Click Save to save the script.
9. Click Save again to save the created schedule.
 
Implementation
When the custom date field matches the Execute On date in the schedule, the ticket will move to the open state.
We hope our updates enhance your experience with Zoho Desk, enabling you to offer great customer support. Stay tuned for updates on features and functions in Zoho Desk. 

    Access your files securely from anywhere



                      Zoho Developer Community




                                              • Desk Community Learning Series


                                              • Digest


                                              • Functions


                                              • Meetups


                                              • Kbase


                                              • Resources


                                              • Glossary


                                              • Desk Marketplace


                                              • MVP Corner


                                              • Word of the Day


                                              • Ask the Experts



                                                        • 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


                                                        Manage your brands on social media



                                                              Zoho TeamInbox Resources



                                                                  Zoho CRM Plus Resources

                                                                    Zoho Books Resources


                                                                      Zoho Subscriptions Resources

                                                                        Zoho Projects Resources


                                                                          Zoho Sprints Resources


                                                                            Qntrl Resources


                                                                              Zoho Creator Resources



                                                                                  Zoho CRM Resources

                                                                                  • CRM Community Learning Series

                                                                                    CRM Community Learning Series


                                                                                  • Kaizen

                                                                                    Kaizen

                                                                                  • Functions

                                                                                    Functions

                                                                                  • Meetups

                                                                                    Meetups

                                                                                  • Kbase

                                                                                    Kbase

                                                                                  • Resources

                                                                                    Resources

                                                                                  • Digest

                                                                                    Digest

                                                                                  • CRM Marketplace

                                                                                    CRM Marketplace

                                                                                  • MVP Corner

                                                                                    MVP Corner





                                                                                      Design. Discuss. Deliver.

                                                                                      Create visually engaging stories with Zoho Show.

                                                                                      Get Started Now


                                                                                        Zoho Show Resources


                                                                                          Zoho Writer Writer

                                                                                          Get Started. Write Away!

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

                                                                                            Zoho CRM コンテンツ








                                                                                              Nederlandse Hulpbronnen


                                                                                                  ご検討中の方




                                                                                                        • Recent Topics

                                                                                                        • Can it change the language ?

                                                                                                          Hello ! The question is in the title ;)
                                                                                                        • Create Tasklist with Tasklist Template using API v3

                                                                                                          In the old API, we could mention the parameter 'task_template_id' when creating a tasklist via API to apply a tasklist template: https://www.zoho.com/projects/help/rest-api/tasklists-api.html#create-tasklist In API v3 there does not seem to be a way to
                                                                                                        • Kaizen #183 - COQL API's Enhancements in Zoho CRM API Version 7

                                                                                                          Hello everybody! Welcome back to another post in our Kaizen series. In this post, we will discuss the latest COQL API enhancements introduced in Zoho CRM Version 7. COQL API Query API lets you query for records based on queries using the CRM Object Query
                                                                                                        • Sales Returns - Repairand Return

                                                                                                          Hi Inventory Team, I'm working with a client on an Inventory implementation project and they have shared this use case with me. Some items may be returned by the customer, then returned to the vendor for repairs, received from the vendor and shipped back
                                                                                                        • How to merge duplicate products?

                                                                                                          merge duplicate products
                                                                                                        • Inventory valuation

                                                                                                          Inventory valuation in case of sales return makes some error in getting proper value of inventory. Cost price considered for accommodating the goods returned is not the price at which cost of good sold where recorded, last purchase of the same item is
                                                                                                        • Getting error "invalid warehouse_id" when trying to update any transaction in Zoho books

                                                                                                          I got a message from Zoho saying that the Warehouse and Branch has been merged into one category "Locations" Once I migrated to this setup I was no longer able to edit any invoice / create creadit notes - got an error saying "invalid warehouse_id" I never
                                                                                                        • Access invoice custom modules data from API

                                                                                                          Hi, I am using $url = "https://www.zohoapis.eu/invoice/v3/invoices"; $opts = ["http" => [method" => "GET",header" => [ "Authorization: Zoho-oauthtoken $accessToken", "X-com-zoho-invoice-organizationid: $orgId" ] ] ]; From my app to retrieve the invoices,
                                                                                                        • It would be very helpful to be able to use variables in the formula columns

                                                                                                          Currently, variables can be used only in aggregated formulas. It would be great to be able to use them in regular formulas as well
                                                                                                        • Bulk Update API

                                                                                                          I’m reaching out to see if anyone has updates on the bulk records feature release. We’re eager to leverage this functionality for our operations, but until it becomes available, our current API call limits are proving to be a bottleneck—even after upgrading
                                                                                                        • Proper syntax for filtering Added_Time in the URL using functionality-based URLs

                                                                                                          I haver intermediate knowledge of functionality-based URLs. I say that because when I use them, it is never straight forward with me. Sometimes it works first try, and sometimes I spend hours exploring to find the proper syntax. link to operators: https://help.zoho.com/portal/en/kb/creator/developer-guide/others/url-patterns/articles/functionality-based-urls#List_of_operators_and_their_constants
                                                                                                        • AI that checks text content quality and for plagiarism

                                                                                                          Hello, A client has a requirement where the users will be typing in content consisting of multiple paragraphs in Creator. The text box will be checked for plagiarism and also for its quality. What would be the best approach for that?
                                                                                                        • 404 Error When Using record_cursor in ZOHO.CREATOR.DATA.getRecords (js api)

                                                                                                          Iam working on fetching all records from a Zoho Creator report using the Get Records API (V2.1) with the following recursive function: js CopyEdit // Recursive function to fetch records using record_cursor from the response function fetchAllRecords(recordCursor
                                                                                                        • Reusable Variables

                                                                                                          I’d like to know if there’s a way to store variables in Zoho Analytics that I can use in metrics or calculations. For example, I have a Currencies table that stores the value of different currencies over time. I’d like to use the value of the US dollar
                                                                                                        • Linking Purchase Orders to Task budgets

                                                                                                          Hi, We are a construction company within the mining industry. Our projects usually have fixed budgets (Cost budgets per task). Is it possible to link Purchase Orders to task budgets? I know you can link the Purchase order to a project, but this is not
                                                                                                        • Introducing prompt builder in Zoho CRM

                                                                                                          We’ve introduced a new way to put Zia’s generative AI to work—right where your teams need it most. With the all new prompt builder for custom buttons, you can create your own AI instructions to generate tailored content, suggestions, or summaries across
                                                                                                        • Facing issue in getting data through api calls

                                                                                                          I have send data of users and want to get the data oof users but facing issue with one field for that I want help
                                                                                                        • invokeURL to change custom field

                                                                                                          I have a deluge script that currently runs as a Schedule. It works exactly as intended, however I've recently been informed by Zoho that there's some mechanism in place to block changes made by a script when it runs on a schedule from being detected by
                                                                                                        • How to stop workflow running twice on a record

                                                                                                          Hi I have a workflow as below Trigger: Lead record is created/edited - Repeat this workflow whenever a lead is edited is NOT TICKED Condition: When Lead Stage is MQL Action: Reassign Lead, Create Task If the Lead goes into stage MQL, and then it changes
                                                                                                        • Customize the ticket ID for enhanced ticket tracking

                                                                                                          Hello everyone, Ticket IDs in Zoho Desk are the unique reference numbers that are assigned to tickets when they're created. Agents generally use the ticket ID to locate a particular ticket and to reference a ticket in conversations and feeds. When customers
                                                                                                        • FSM Function not executing

                                                                                                          Good Afternoon, all I am working on a workflow function in FSM and yesterday it was working fine. Now today when I select "Save & Execute" it does nothing. I even tested it with just a info statement and it is not executing. Any help would be greatly
                                                                                                        • DKIM cannot be enabled for the domain as no verified default selector present

                                                                                                          Can't get the DKIM working. May you please check my account (nksy.us) to see what's wrong?
                                                                                                        • Boost collaboration in your sales process with Team Selling and Deal revenue's Split—empowering your Zoho CRM for smarter teamwork!

                                                                                                          This feature is currently available for the AU and SA DCs. It is being rolled out in a phased manner and will be available to all users shortly. Hello everyone, As you may all know, closing a deal is rarely a one-person effort. It often involves multiple
                                                                                                        • Create modules using natural language prompts

                                                                                                          Hello all, We’ve introduced a new enhancement to Zia that allows you to create custom and team modules in Zoho CRM using plain language prompts. Why this enhancement? Creating a custom module traditionally involves multiple steps—choosing field types,
                                                                                                        • Suggesting enhance for criteria based data-sharing rules

                                                                                                          I suggest that, for user fields, the logged-user system variable could be used. This would allow the user, for example, to access records in which he/she is mentioned in a specific field, other than the owner. Thanks! Eduardo
                                                                                                        • How to sync read mails to GMail?

                                                                                                          Hello I am testing Zoho TeamInbox but I have an issue with my connected GMail account. Whenever I read a mail in TeamInbox or even reply to it, the email stays as "unread" in GMail. Is this normal behaviour? I thought that with the 2-way sync of IMAP
                                                                                                        • Look up field and show or hide section based upon selection

                                                                                                          Hi there, I am looking to show or hide a section within the opportunities module based on the value of the selection in the look-up field. This feature does not seem to be there Is there a workaround, and is this option coming in a future release? Thanks
                                                                                                        • eway Bill - Import (Good / Material)

                                                                                                          As we Importer of goods , for That first we Generate PO then , Payment, then after We create Bill of Entry  After Bill of Entry Anywhere (99%) cases material that arrived to port that comes to warehouse / factory for that Eway bill , we have to create
                                                                                                        • Import of Bank Statement DO NOT work - Date Mapping issue - Basic Feature Issue Becoming Serious Pain

                                                                                                          Hello, Yes, This is True. Importing Bank Statement feature is Not working as Intended. Facing few issues. Specially regarding the Mapping of Date field format. No matter how many times, we create a Case with Support team, they are NOT supporting in proper
                                                                                                        • Approval Workflow for Purchase Orders Abrir

                                                                                                          The requirement is , that all purchase orders greater than or equal to 5000 go through an approval process from certain people, but within books I only see that the approvers can be by levels or any approver but we cannot enter a rule like these. Can
                                                                                                        • How to see and amend Primary Clients easily

                                                                                                          Hi, i'm trying to make some reports on the clients we do projects for. However, i'm seeing a lot of "unknown" clients in the Zoho Analytics report. I suspect that these projects have not been assigned well and this needs to be corrected. Where can i easily
                                                                                                        • ZOHO NEEDS TO CREATE AN OPTION TO PASS CREDIT NOTE AGAINST SALES RECEIPT

                                                                                                          Zoho needs to find a way to pass credit note on sales receiptS. Creating a dummy invoice is causing major issues in tallying our sales figures and compliance with tax authorities.My system is tied to tax agencies and trying these options causes major
                                                                                                        • INTERGRATION OF ZOHO BOOKS PREMIUM PLAN AND ZOHO INVENTORY STANDARD PLAN

                                                                                                          Hello. I was using Zoho Books premium plan with 3 branches and has been working well until I purchased Zoho Inventory Standard plan. Now my 3rd branch location has been deactivate din Zoho Premium. how can I solve this please since I use all the locations
                                                                                                        • Exporting Templates

                                                                                                          I have just spent 2 hours creating a project template for a Netsuite configuration, and want to share it with other Zoho Projects users - who have a different account. Is there any way to do this?
                                                                                                        • It's time to say goodbye to Zoho Recruit for me.

                                                                                                          Hello, I have been a Zoho Recruit user since 2013. The tool has evolved, with a better UI, new features and so on. The pricing is still a great asset too. BUT, that being said, important features are not coming fast enough. I tried to share my point of
                                                                                                        • Automation#34: Schedule Guided Conversations (GC) Based on Business Hours

                                                                                                          Hello Everyone, Welcome to this episode on configuring your Guided Conversations (GC) based on your business hours. In our previous episode on Guided Conversations, we covered how to set up GC to enable offline support. This time, we'll guide you through
                                                                                                        • Download PDF from File Field with the name in another single line field

                                                                                                          Hi I am storing a PDF file in a File Field of a Form using Zapier automatically. now i need to download that file and set its file name as per the value stored in a single line field in that form. ANy turnout for that Thanks
                                                                                                        • Custom Module missing SDK function fetchRelatedRecords(...) in a Client Script

                                                                                                          Good day, We have added a new module with a Multi-Lookup relation to Contacts.  When we tried to use the fetchRelatedRecords(id, related_list_api_name) function to get Related Records it is missing for our new custom module. https://js.zohocdn.com/crm/5124797/documentation/DotSDK/Modules.html
                                                                                                        • TeamInbox and Desk Integration is Broken

                                                                                                          I use the TI -> Desk integration a lot. Today, it broke, again. When I go to create a Ticket from TI, an error message on a red background is shown "oops something went wrong". Checking the developers console on my browser, there are many 500 errors relating
                                                                                                        • Couldn't connect to host, port: wordpress2224249.home.pl, 143; timeout 10000

                                                                                                          Hey, i get a error up "Couldn't connect to host, port: wordpress2224249.home.pl, 143; timeout 10000" But i tried same passwords and info. to make imap on hotmail. and it works flawlessly. Has to be something with zoho....
                                                                                                        • Next Page