Automation #9 - Convert Zoho Desk Tickets to New Deals in Zoho CRM

Automation #9 - Convert Zoho Desk Tickets to New Deals in Zoho CRM



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.

If you are using more than one Zoho product you know the value of data flowing between them. While Zoho Desk integrates directly with most Zoho products, some specific actions might still need you to carry out a few steps to optimize this smooth flow of data.
 
Like in cases where you use Desk to track your orders, you might find passing that information manually to CRM takes up more time than you like.  However, you can create a deal for every ticket created in Desk or move just a certain number of tickets based on keywords or specific tags, by setting up custom functions to help you achieve exactly that.
 
Here's how you can create these custom functions: 

To create the workflow rule, carry out 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, 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 deal for every ticket that is added to Zoho Desk, then do not select any criteria and move to the next section. Alternatively, you can add the required criteria and go ahead.
  9. In the Actions section, carry out the following steps:
  10. Click the + icon and select Custom Functions > New
  11. Click Edit Arguments
  12. In the Name field type TicketID, and from the Value drop-down list select Ticket Id under Ticket Information.
  13. In the script window, input the Custom Function you find below:

  14. orgId = "paste org id here";
    TicketInfo = zoho.desk.getRecordById(orgId,"tickets",TicketID);
    searchCRMDeals = zoho.crm.searchRecords("Deals","(Email:equals:" + TicketInfo.get("email") + ")");
    sizeofsearch = searchCRMDeals.size();
    if(sizeofsearch > 0)
    {
     dealId = searchCRMDeals.get("id");
     zoho.crm.updateRecord("Deals",dealId,{"Description":TicketInfo.get("description")});
    }
    else
    {
     zoho.crm.createRecord("Deals",{"Last_Name":TicketInfo.get("email").subText(TicketInfo.get("email").indexOf("@") +
    1,TicketInfo.get("email").indexOf(".com")).trim(),"Email":TicketInfo.get("email")});
    }
Important Note: The ORGID has to be replaced with your own ID. You can get OrgID from Setup > Developer Space > API > OrgId

We hope this custom function helps you create Deals easily in CRM. If you have requests for such custom functions or want to know more about some automation, please leave your comments below.  


    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

                                                                                                        • 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
                                                                                                        • 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
                                                                                                        • 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....
                                                                                                        • Reply-To Match condition for Inbound Mail Messages

                                                                                                          I've trying to setup a rule to match the "reply-to" header but can't find any condition that would match this in Zoho TeamInbox rules. The business case is that I've setup my team inbox to be a member of a google group. The result of that is that emails
                                                                                                        • Next Page