Automation #10 - Auto Assign Ticket based on Keywords

Automation #10 - Auto Assign Ticket based on Keywords



This is a monthly series designed to help you get the best out of Desk. We take our cue from what's being discussed or asked about the most in our community. Then we find the right use cases that specifically highlight solutions, ideas and tips on optimizing your customer support with the automation capabilities of Zoho Desk.

Zoho Desk offers you a few choices on how to assign your tickets. From Direct assignment to Round Robin rules, every variation cued to assign tickets in a way best suited to your business workflow.
 
These features can help you create a viable workflow easily. Even in cases when you'd like to add more context to open tickets and assign them based on their content. For example, you have a Direct Assignment rule based on a State. As per the rule any ticket originating from that State is automatically assigned to a specific Agent, say Agent 1. However, after a few conversations, the customer refers to the keyword refund in their email content. At which point you want it to include the Refund team automatically. This can be achieved using a custom function, which reads the keyword in the email replies of a customer, and automatically assigns any email matching the keyword to the concerned team based on the rule set.

We have replaced Auth-tokens with connections for all the existing custom functions. So the first step to make the most of ZohoDesk's automation capabilities is to create a connection to use in the custom function later.
 
To create the connection, carry out the following steps: 
  1. Click on Setup > Developer Space > Connections 
  2. Click Create Connection
  3. In the Pick Your Service section, under Pre-Defined Services find and select Zoho OAuth
  4. In the Connection Details section, add zohodesk as the Connection Name and Connection LinkName
  5. In the Choose Scopes list, select Desk.tickets.READ
  6. Click Create and Connect
  7. In the page that appear, click Connect
  8. If you have more than one portal associated, select the Portal to which this connection should be added and click Accept.
To create the custom function, follow the steps below: 
  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, carry out 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.
    In the Criteria section, if you want to create a ticket just based on the keywords, then do not select any criteria and move to the next section.
    In the Actions section, carry out 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 under Ticket Information.
  12. In the script window, input the Custom Function you find below: 
    orgId = "paste orgId here";
    DepartmentB_id = "paste department B id here";
    keyword1 = "paste keyword value here";
    keyword2 = "paste keyword value here";
    TicketInfo = zoho.desk.getRecordById(orgId, "tickets", TicketID);
    subj = TicketInfo.get("subject");
    threads = zoho.desk.getRelatedRecords(orgId,"threads","tickets",TicketID).get("data").toList();
    threadId = threads.getJSON("id");
    Message_body = invokeurl
    [
    url :"https://desk.zoho.com/api/v1/tickets/" + TicketID + "/threads/" + threadId + "?include=plainText"
    type :GET
    connection:"zohodesk"
    ];
    Message_body = Message_body.getJSON("plainText");
    if ( Message_body.containsIgnoreCase(keyword1) || Message_body.containsIgnoreCase(keyword2) || subj.containsIgnoreCase(keyword1) || subj.containsIgnoreCase(keyword2)   )
    {
    info zoho.desk.ticket.move(orgId, TicketID, DepartmentB_id);
    }
Note: The connection name used in the above script should match the name that you provided while creating the connection. 

Stay tuned for more such use cases!

    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



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


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

                                                                                                  • 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
                                                                                                  • 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.
                                                                                                  • 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
                                                                                                  • 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
                                                                                                  • How to export customer contacts from Zoho desk

                                                                                                    How to export customer contacts from Zoho desk
                                                                                                  • 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!
                                                                                                  • Importing into Multiselect Picklist

                                                                                                    Hi, We just completed a trade show and one of the bits of information we collect is tool style. The application supplied by the show set this up as individual questions. For example, if the customer used Thick Turret and Trumpf style but not Thin Turret,
                                                                                                  • Add "Running Balance" column to Account Transaction Reports

                                                                                                    Hello, Currently Zoho Account Transaction Reports give you the opening balance, then lists the transactions, then provides the closing balance.  It would be great if you could add a column on the far right that shows the "Running Balance" on the account after each transaction.  There are many times when analyzing or tie-ing out transactions that this would be very helpful.  I currently have to frequently run a tape on my adding machine to get balance totals after a specific transaction on the list.
                                                                                                  • Next Page