Automation #5 - Configure Round-Robin without Load Balancing

Automation #5 - Configure Round-Robin without Load Balancing



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.

In Zoho Desk, Round Robin is a ticket assignment method that distributes and assigns incoming tickets equally among agents. It is designed to ensure that the ticket load of agents is always balanced. It achieves this goal by first assigning tickets to the agent with the least load.

However, in some cases, this focus towards balancing work load can inadvertently result in overloading an agent. For instance, let’s take a scenario wherein there are zero incoming tickets. The first ticket comes in and gets assigned to the first agent in the Round Robin queue. The agent responds swiftly and closes the ticket even before the next ticket comes in. Now, because the first agent in the queue has no tickets in their pipeline, the Round Robin method automatically assigns even the new incoming ticket to the first agent, instead of the next agent in the queue. If this keeps happening frequently, it would for sure overload individual agents.

You can overcome this challenge using this custom function, which we have created specially for small teams, where this issue could occur frequently.

Pre-requisite:

Edit your newly created Agent contact. For the values, collect and save all the agentIds in the Agent List fields. Please note the Agent List should be a comma separated values. Add the first agent in the Next Agent field. 
  1. In the Contacts Layout, create two fields:
    1. Add a multi line field and name it as Agent List
    2. Add a single line field and name it as Next Agent
    3. Create a Contact Named Agent
    4. Edit your newly created Agent contact. For the values, collect and save all the agentIds in the Agent List fields. Please note the Agent List should be a comma separated values. Add the first agent in the Next Agent field.
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 Create checkbox to execute this rule every time a new ticket is created.
  8. Click Next.
    You can keep the Criteria section blank for this rule,
    In the Actions section, perform the following steps:
  9. Click the + icon and select Custom Functions > New
  10. Click Edit Arguments
  11. In the Name field type TicketID and from the Value drop-down list select Ticket ID and click Done

Note: Enter the name of the connection as "deskoperation"

In the script window, all the below Custom Function
  1. orgId = "paste org ID here";
  2. contactId = "paste contact ID here";
  3. contactInfo = zoho.desk.getRecordById(orgId, "contacts", contactId,"deskoperation");
  4. allAgents = contactInfo.getJSON("cf").getJSON("cf_agent_list").toList();
  5. nextAgent = contactInfo.getJSON("cf").getJSON("cf_next_agent").toLong();
  6. assignTicket = zoho.desk.update(orgId, "tickets", TicketID, {"assigneeId":allAgents.get(allAgents.indexOf(nextAgent))},"deskoperation");
  7. if (allAgents.indexOf(nextAgent).toLong() < allAgents.size().toLong() -1)
  8. {
  9. updateNextAgent = zoho.desk.update(orgId, "contacts", contactId, {"cf":{"cf_next_agent": allAgents.get(allAgents.indexOf(nextAgent)+1)}},"deskoperation");
  10. }
  11. else
  12. {
  13. updateNextAgent = zoho.desk.update(orgId, "contacts", contactId, {"cf":{"cf_next_agent": allAgents.get("0")}},"deskoperation");
  14. }
Note: The ORGID and AuthToken has to be replaced with your own IDs. You can get Auth token from Setup > developer space > api > browser mode and OrgID from Setup > Developer Space > API > OrgId

Follow this channel to get updates on our next post. Until then, happy automating! 



    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