Automation #2- Create recurring tickets using Schedules

Automation #2- Create recurring tickets using Schedules



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.
 
Creating recurring tickets for tasks like system updates, firewall checks, unused data clearance and others is one of the most sort after action in Zoho Desk. In this month's topic, we will discuss how you can use a combination of custom functions and the recently launched feature called "Schedule" to create recurring tickets in Zoho Desk. 
 
To achieve this, you need to write a custom script first, let's see how you can do that:

Prerequisite:
  1. OrgID, to get the OrgID, navigate to "Setup >> Developer Space >> API".
  2. Department ID, to get the Department ID, navigate to "Setup >> General >> Departments", select the department in which you prefer to create the ticket, copy the number appended in the URL.



  3. Contact ID, to get the Contact ID, access the contact for which you prefer to create the ticket under "Contacts/Customer", copy the number appended in the URL.


Steps to create a custom function:
  1. Go to Setup > Functions under Developer Space
  2. Click "New Function" from the top right corner
  3. Give a name to your custom function
  4. Add a description(Optional)
  5. Under Category select "Schedules"
  6. In the Deluge field, add the following script:

    1. orgId = "xxxxxxxxxx";
    2. //Replace xxxxxxxxxx with OrgID
    3. param = Map();
    4. param.put("subject","This is subject of ticket created via schedule");
    5. //You can pass your desired subject
    6. param.put("contactId","xxxxxxxxxx");
    7. //Replace xxxxxxxxxx with Contact ID
    8. param.put("departmentId","xxxxxxxxxx");
    9. //Replace xxxxxxxxxx wih Department ID
    10. createTicket = zoho.desk.create(orgId,"tickets",param);
    11. info createTicket;

  7. You can also fetch these IDs by making the following API calls for Dept ID and Contact ID.
  8. Click "Save"
With the custom script in place, follow these steps to create a schedule for your ticket creation.
  1. Go to Setup > Schedules under Automation.
  2. On the Schedules page, click "New Schedule" in the upper-right corner.
  3. In the Add Schedule page, do the following:

    1. Click the Execute On field to specify the date and time at which the function should be executed.



    2. Set the schedule frequency from under the Repeat drop-down field.



      You can execute the schedule either once (select, Never) or on an hourly, daily, weekly, monthly, or yearly basis.

    3. Select the Custom option to run the schedule either on any specific hour/day/week/month/year along with recurring frequency and end point.


    4. Click Associate Function and choose the custom function that you created earlier to be associated with the schedule.



    5. Click "Save".
This should help you create recurring tickets in Zoho Desk. If you prefer to pass default field data, custom field data or create multiple tickets for the different contacts please write to us at "support@zohodesk.com" with your requirement . 


    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation
                                              • 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
                                              • Ask the Experts 10: A 5-hour online Q&A on Zoho Desk Best Practices

                                                Welcome to Zoho Desk's Ask the Experts session! This is a monthly discussion on our  forums; wherein a panel of experts will take on questions  specific to topics related to Zoho Desk. The panel will be available for a 5-hour period and will answer any questions posted here.   Let's begin the year learning some best practices from our experts. In this month's ATE we are opening the floor to questions on how to use Zoho Desk the best way.  If you have a business use case but not sure if Workflow is
                                              • 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. 
                                              • Ask the Experts 7: A 5-hour online Q&A on Telephony and Call Module

                                                Welcome to Ask the Experts session! This is a monthly discussion in forums; each session, a panel of experts will take questions on specific topics related to Zoho Desk. The panel will be available for a 5-hour period and answer any questions posted here. In this month's Ask the Experts, we will take questions on everything related to Telephony and the Call Module in Zoho Desk. We will discuss the following aspects:  Integration with different Telephony vendors Routing calls to agents Converting


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns 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