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. 

    • 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

      • Refreshing screen collapses Starred Views and Expands All Views

        Just in the past few weeks I've noticed that when I refresh my screen, it now collapses my Starred Views section and Expands the All Views section. This is not how it used to work in the past. It is frustrating.
      • ZOHO DESK ヘルプセンターの言語選択メニューの表示方法

        ZOHO DESK のヘルプセンターを構築し、多言語化設定をしました。 顧客のヘルプセンター画面右上に言語選択メニューが表示されないため、弊社の契約先会社に問い合わせましたが、「通常は多言語化をオンにすると表示するためCSS を触り過ぎではないか」 という指摘のみでした。 試行中ですが表示できません。 何か要因となる情報をお持ちの方がいましたらご教授いただけますと幸いです。 ↓の赤枠を表示したいのですが、表示できません。
      • CRM email sync with 365 - app passwords

        Hi We have synced users crm account with hosted 365 email accounts. 365 has MFA enforced across the tenant. Now encountering issues with 365 sync failing due to password errors after some time. Advised that will need to use app passwords from 365 in order
      • how to Add a TXT record in the DNS

        hi everyone, i am using https://pradairways.weebly.com domain for practice purpose, now a Domain Verification - pradairways.weebly.com is required ,how to add txt reocrd in dns and complete the process. thanks in advanced
      • How can I reduce the size of the lightbox?

        Hello - I want to reduce the size of the lightbox overlay function on my site. Currently it occupies the WHOLE screen when activated, which I'm not a huge fan of. Is there anyway I can reduce the size of the lightbox overlay? Say, it only takes up 75%
      • Items attribute questions

        Many of my items have attributes, such as size and color. How can I add new fields to the "New Items" screen to capture that in my Purchase Orders, Items, and Sales Order pages? I only see these attribute fields when adding an Item Group. Also, on the
      • Update multi-select lookup via API? Or allow for import of multi-select Lookups?

        When will the ability to update a multi-select lookup via API be available? Also when will we be able to import a record with multi-select lookups? I understand a linking module can help with this, but linking modules in our scenario would only be used
      • Would like to create a bounce-back for incoming emails

        Hi all, I have a catch-all address, now from this I would like Zohomail to bounce back specific email addresses to the sender. Would like the server to send back an email from zoho servers stating that the intended addresse is no longer valid. while retaining
      • Cambiar nombre de usuario

        Hola. Tengo una cuenta en zoho, por ejemplo Minombre @ midominio.es Y quiero cambiarlo a Miotronombre @ midominio.es Se puede cambiar??? Con la cuenta gratuita de zoho, cuantos nombres puedo tener en un dominio??? Gracias y buen dia
      • Circuite fail because www.zohoapis.com:443 refuse conection

        Is anyone else experiencing this issue? A few weeks ago, I started having issues with circuits failing due to www.zohoapis.com:443 refusing the connection. The error message is quite clear and points to a problem on Zoho's API server, rather than with
      • Error in connecting to WorkDrive

        I'm trying to write a script to look in a specific WorkDrive folder and if there is a csv or xslx file, copy it to a different folder with a modified filename. That gave me the error: {"errors":[{"id":"F6016","title":"URL Rule is not configured"}]} So
      • Help with Zoho Books Deluge code error

        I have this deluge code im writing for Zoho Books button, it throws an error: Check and update the code in line 12 as there is a Exception : Error at line :14 Improper Statement Error might be due to missing ';' at end of the line or incomplete expression
      • Add additional field to quick search results

        IN the advanced search, we can add any field to the columns. In the regular search results (before you press enter, there is no option to modify the results. It would be super useful to include a custom field where it currently displays the pipleine
      • Problem - cant add Users (i.e. Zoho one / CRM Users) to BCC or CC in email, i.e. Sales orders or Retainers

        I can go to zoho books email templates, and select any email template, and automatically include any Zoho One user, i.e. member of staff. However in the context of sending an email, it will not let us add a member of staff from the user list, instead
      • Cannot read properties of null (reading 'className')

        Hello, I'm attempting to integrate the Zoho desk chat widget. It loads visually on most pages, but at some point, it throws this error and it never appears: Cannot read properties of null (reading 'className') Here is the full trace: floatbutton1_hXdnKUp…f6FPihRNT_T47_.js:1
      • Is there a way to show contact emails in the Account?

        I know I can see the emails I have sent and received on a Contact detail view, but I want to be able to see all the emails that have been sent and received between all an Accounts Contacts on the Account Detail view. That way when I see the Account detail
      • Referring to Zoho user groups in Deluge?

        Hello, I am wondering whether it is possible to refer to Zoho user groups (with whom the application is shared) in Deluge. I currently restrict records to be viewable only if the login user created the record, but I would also like to make all records viewable if the login user belongs to group X. Thank you.
      • Zoho Books CREDIT LIMIT is completely USELESS due to a BUG!!! Please fix it ASAP!!

        Credit Limit should not be taken into account if payment terms on the Invoice are without credit. If selected Credit 0 days (Prepayment) why in this world would a notification pop up saying credit limit is exceeded and not allowing to create an invoice?
      • Mail Merge - unable to send more than 50 email

        Hi, I've subscribed to the pay email service because of the Mail Merge feature. However, I've found that this feature only allow to send up to 50 emails. I've to attach a screenshot for your reference. This limitation is not mentioned anywhere in service.
      • Auto-sync field of lookup value

        This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
      • Records not showing immediately.

        Hi, I keep coming across a problem when records are inserted, updated or deleted via deluge, the changes / new records or deletions aren't visible in the form's report. (Even after refreshing and clearing browser cache). I am experiencing this issue in both Google Chrome and Firefox. The records will eventually show up, but the delay can vary wildly. Below screenshot shows the report still showing a record which has been deleted via deluge.  When clicking "edit" on the record, Zoho displays a single
      • Email signature duplicate

        Hi, For a few weeks, opening the email writer would show an error. After clicking ok, the signature would change slighty (font size, I believe). After that it worked fine, so we thought nothing of it. However, now it no longer shows the error puts the
      • I can't auto-scheduling calls down - the code does not change anything

        Hi, I was trying to set a function that auto-schedules calls based on their call result; i.e "Requested more info". I had also included a reminder to send an email in the code. I logged a test call and nothing changed. Is there anything wrong with the
      • Generate a Zoho Sign link

        From time to time I get a response "I never received your you e-document for electronic signature" is there a way to generate a Zoho Sign link to share.
      • customers enter orders?

        Anyway we can let a customer into CRM and enter their own orders , no access to anything else except history reports, no access to any other contacts. Greg Aanes 2109 Queen Street Bellingha WA USA
      • Can I associate a lead with an account?

        Hello, Can I associate a lead with an account?  The only way I can do this at the moment is if I convert them from a lead.  But we have a situation where we have multiple leads for one customer so I will need to see both leads when I am viewing this customer. Thanks. Jason
      • 404 error for sites

        I'm getting a 404 error for all the sites that I created...they were working just 4-5 hours ago....
      • Default view to Gantt

        Greetings How does one set the default view to Gantt?
      • How to add two columns in Zoho forms

        I would like to have two columns in Zoho forms. How can i enable two columns?
      • Condition in templates

        Is it possible for me to add merge field conditionally in my templates. For example Dear ${Leads.Gender == "Male" ? "Sir" : "Ma"},
      • Group Sales Inbox with subfolders

        I am looking for the most effective way to create a group inbox.  I am exploring Zoho coming from a CRM where we have a group sales inbox, which is divided into 3 subfolders depending on which language the sender is sending the mail to.  We have an English, Spanish and French email address where,each message is going to one of the subfolders in the main sales inbox. I have only been using the Zoho system for a few days and am trying to set it up the most appropriately and would like to know how this
      • Zoho Support / Microsoft Outlook integration

        Is there integration between Microsoft Outlook and Zoho Support?  If so, can you point me to the related documentation?  I'm trying to understand how that would work.
      • Why cant I add users to my Portal, Workspace or Base?

        When trying to add users a view within my base, the users arent appearing. They are part of my organisation user list and should be available for selection when sharing a view within a base, but they arent popping up to select. What could the issue
      • Zoho Desk Invite

        I'm trying to send an invite via Zoho Desk to the email nwc.hd@telecare.com.sa using my account in Zoho desk rmsh7777.rs@gmail.com but the invitation or email is no received. I need your kindness to activate the account, please.
      • How can I make a part of a form be divided into two columns?

        Hi, i have a form, and i want to have 2 columns in the form but not completely, so, the first part of the form have 1 column but in the bottom of the form, i want 2 columns, how can i do? Thank you.
      • Get a realistic picture of your revenue with Forecast Adjustments in Zoho CRM

        #crm25q1 Dear Customers, We hope you're doing well! Today, we're here with an important enhancement for business decision makers: forecast adjustments. Let's get straight to it! With technology on the rise and CX at its core, businesses are constantly
      • Filter timesheet by log title

        Hello, is there a way to filter timesheets by log title (or to group by log title). Thank you
      • We are being told that emails sent to us bounce back on first attempt, then go through upon the second attempt. How do we fix this?

        As the title suggests, when interacting with another business today (one that is also using their own domain emails) we were told that each time they sent an email to us, it would bounce back upon the first attempt, only to go through successfully upon
      • MA 2.0 Email Footer

        Good day, I recently went through the nightmare of upgrading from MA 1.0 to MA 2.0 and continue to experience more problems or missing features and settings. In this particular case, I am trying to find where and how to edit the Email Footer in MA 2.0.
      • Show both Vendor and Customers in contact statement

        Dear Sir, some companies like us working with companies as Vendor and Customers too !!! it mean we send invoice and also receive bill from them , so we need our all amount in one place , but in contact statement , is separate it as Vendor and Customer, 
      • Next Page