Simplify Ticket Management (Zoho Desk) with Chatbots | Zoho SalesIQ

Simplify Ticket Management (Zoho Desk) with Chatbots | Zoho SalesIQ

Hi everyone! 

We're here with another simple yet effective plug for your chatbot to integrate with Zoho Desk. 

When a customer reports an issue/request during chat, it's logged as a ticket on Desk. When they return for updates, you end up searching through past tickets, reading conversations, and updating them manually. Imagine if your bot could automate this, retrieving ticket details and providing updates effortlessly.


Are you new to SalesIQ? Wondering what plugs and bots are?

SalesIQ offers chatbots to automate customer interactions. Using the Codeless bot builder, you can build chatbots by using cards in the bot-builder gallery. However, at times, businesses would require unique actions from the bot and for those instances, we have plugs. With plugs, you can create any specific action and bring it as a card inside the codeless bot builder, like the rest of the cards. 

In this post, we will learn how to create a plug and list the customer's recent support tickets from Zoho desk.

How does this Plug work?
  • The bot will get the email address of the visitor (Email card)
  • Next, the bot will search and get a list of tickets associated with the respective email from Desk (Plug 1). 
  • Then, this ticket list will be displayed to the visitor (Single choice card). 
  • When the visitor selects one of the displayed tickets, the bot will fetch the neccessary ticket details. (Plug 2)
  • And these details will be displayed to the visitor (Any response/input card).

Note:
  • There are two plugs involved in this process, one is to display the ticket list and another is to display the ticket details. 
  • In this post, we will look at the plug to display the ticket list. 
  • The plug sample to display the ticket details is already available, click here to know more. 

Plug output
 


How to build this Plug?

Step 1 - Create connection with Zoho Desk
  • On your SalesIQ dashboard, navigate to Settings > Developers > Plugs > click on Add.
  • Provide your plug a name, and description, select the Platform as SalesIQ Scripts, and finally, click on Connection to your left bottom. You will be redirected to the connection interface.
  • Click on Create connection at the top right corner. 
  • Under Default connection, select Zoho OAuth service

  • Provide your connection name, connection link name, and choose the scopes below.
    • Desk.search.READ
    • Desk.contacts.READ
    • Desk.tickets.READ

Note: The Connection Link Name will be used in the scripts to invoke URL tasks.
  • Click on Create And Connect to connect Zoho SalesIQ and Zoho Desk.

  • Upon successful authentication,  Zoho SalesIQ will be connected with Zoho Desk.

  • The connection is successfully established. 

Step 2 - Build the Plug

As we have created a connection between SalesIQ and Desk successfully, it's time to build the plug. The first step in building the plug is defining the parameters. 

Input Parameters
  • Name : email | Type : Email
Output Parameters
  • Name : ticketList | Type : Option List


Script to get the list of tickets
  • Copy the code below and paste it into your plug builder. Then, make the following changes. 
  • In line #8, get your Desk org ID (Settings > Developer Space > API > Scroll down to find the "OrgId").
  1. if(session.containsKey("email"))
  2. {
  3. email = session.get("email").get("value");
  4. }
  5. // Getting the contact ID from the email - https://desk.zoho.com/DeskAPIDocument#Search#Search_SearchContacts
  6. url = "https://desk.zoho.com/api/v1/contacts/search?email=" + email;
  7. header = Map();
  8. header.put("orgId","012345");
  9. //Change your org ID (Settings > Developer Space > API > Scroll down > "OrgId")
  10. getcontact = invokeurl
  11. [
  12. url :url
  13. type :GET
  14. headers:header
  15. connection:"zohodesk3"
  16. ];
  17. info getcontact;
  18. contact_id = getcontact.get("data").getJSON("id");
  19. info contact_id;
  20. url_ticket = "https://desk.zoho.com/api/v1/contacts/" + contact_id + "/tickets?sortBy=-createdTime&limit=3";
  21. // Get associate ticket of a contact - https://desk.zoho.com/DeskAPIDocument#Contacts#Contacts_ListContactsByIds
  22. get_tickets = invokeurl
  23. [
  24. url :url_ticket
  25. type :GET
  26. headers:header
  27. connection:"zohodesk3"
  28. ];
  29. info get_tickets;
  30. array = get_tickets.get("data");
  31. optionList = List();
  32. for each  entry in array
  33. {
  34. subject = entry.get("subject");
  35. status = entry.get("status");
  36. display_text = subject + " - (" + status + ")";
  37. ticketNumber = entry.get("ticketNumber");
  38. optionList.add({"id":ticketNumber,"text":display_text});
  39. }
  40. response = Map();
  41. response.put("ticketList",optionList);
  42. return response;
  • Then, click Save, preview the plug and Publish it. 
 
Step 3 - Adding the plug to the Codeless bot builder
  • Navigate to Settings > Bot > Add, provide the necessary information, and select Codeless Bot as the bot platform. You can also open an existing bot.
  • Click on Plugs under Action cards, select the plug you have created and provide the input values for the parameters defined in the plug builder.
  • Choose the %visitor.email% variable for the name.
  • Provide a variable name for the ticket list.

  • Use a single choice card, click on Save in bot context, give a variable name and select the context variable under dynamic suggestion

  • Then, use this plug to show the ticket details.


I hope this was helpful. Please feel free to comment if you have any questions. I'll be happy to help you. 



Best regards
Sasidar Thandapani

    • Recent Topics

    • Strange pop up windows when sales order saving.

      Hi, May I ask what's the meaning of this pop up window. Our client script don't have this setting..
    • How to increase number of contacts shown in CRM Campaign ?

      Hello Everybody, I can't find a way of increase the number of contacts displayed per campaign. It is limited to 10 contacts which is very distressing when I need to update the status of several contacts. What a huge waste of time and energy Is there a
    • Lookup field, odd issue

      So I tried creating and app that has the names of engineers so I can use that for a lookup in the other apps that are being created . I add the look up in a new app, launch the app and when I try to fill out the form its just blank in the drop down menu
    • Add option "Avoid custom home pages" to profiles

      We need our sales agents and members on each department in general to keep the same Home designed by their Managers. Let all users to create custom home pages is a huge mistake. The homepage creation must be limited by profile so only Managers are allowed
    • Key Highlights of 2024: Recalling a Year of Progress and Advancements!

      As we step into 2025, we’re excited to share the progress and developments we’ve made to simplify and streamline your travel and expense management in the past year. Let’s take a look back at some of the key updates and enhancements that have helped us
    • Enhanced duplicate check for Leads in CRM

      Hello Everyone, We are excited to announce that you can now check for duplicate entries in leads by comparing them with similar records in the Contacts Module. Previously, when you added a lead, only the converted leads were checked for duplicates. This
    • No longer get Cliq notifications on phone if app not started

      On Android, I used to get notifications on my phone whether I was in the app, or it was started. Then about a month ago, I stopped seeing notifications on my phone UNLESS I had already started the app. So if I reboot my phone, and never start the app,
    • CUSTOMER RUNNING BALANCE WHILE PRINTING RETAIL INVOICE IN ZOHO BOOKS

      This is basic problem in zoho books where at the time of printing retail invoice, we can't add customer running balance. Kindly provide this feature as every other accounting software has customer credit balance option at the time of invoice printin
    • PRICE INCLUSIVE OR EXCLUSIVE IN ITEM MASTER CHECK BOX

      please provide checkbox or tick box to specify price mentioned in item master is inclusive or exclusive of taxes for better information. The feature is available in odoo and its very helpful.
    • MORE BUGS: Client Script, Deluge and Widget JS SDK don't work as expected when trying to retrieve a record that has been "rejected" as part of an approval process.

      Client Script $Page.record is null when accessing a record that has been "rejected" as part of an approval process. Deluge zoho.crm.getRecordById(moduleName, recordId) returns {"status":"failure"} when recordId is a valid, but rejected record. OK... I
    • Unable to add organization consultants and contractors in Zoho People

      Hello Team: I am unable to add my few consultants and contractors in Zoho People. How to add these people as Users?
    • Mandatory verification of custom domains in portal

      Hello all, Happy New Year! Wishing you a successful and fruitful year ahead. We are committed to ensuring a safe and secure experience for all users of Zoho Creator users. As part of this commitment, we regularly introduce updates to ensure our platform
    • Lost all my notes, help :(

      The thumbnails correctly preview the text, the file info correctly shows the amount of characters, but all of my notes just get stuck at this screen when I open them. :( ... I have so many projects in here, I don't know what to do, is there any way to
    • Zoho Calendar 2024: A Year in Review

      Hello, community members! Happy new year from all of us here at Zoho Calendar. As we turn the page to a new year, we extend our heartfelt gratitude to every member of our Zoho Calendar community for your continued support and enthusiasm. Your feedback
    • How manage to hardware and software contracts.

      So I have been tasked with setting up on crm a way of managing our software and hardware contracts. with a filter switch, so if they are no longer on say a hardware contract but still on a software, we would like the history about the hardware contract
    • Function #4: Schedule Customer Statements

      Regularly sending statements to customers is an imperative part of many business processes as it helps foster strong customer relationships and provides timely guidance on payments. While you can generate the statement of accounts and have it sent over
    • Automation#27: Retain Ticket Owner on Moved Tickets

      Hello Everyone! This week, we present to you a custom function that retains the ticket owner when a ticket is moved from one department to another. Here’s more to help you understand the custom function: At Zylker Techfix, Alex, the Support Engineer manages
    • CASE Module - email function

      HI there, I dont know if this has been asked or answered before as i couldnt find it on the forums. Issue: when a new case is raised, it goes under case tab and everything is captured. Then how do i send emails to the client who raised case with the details
    • Zoho CRM Workflow Merge Tag For a File Upload

      Hello, is there anyway to add a merge tag for a file upload field in Zoho CRM Workflow emails? I don't see it as an option in the drop down. Thanks, Hannah Moderation Update: I'm locking this post as a similar discussion is ongoing in the thread linked
    • Custom function daily limit and procedural programming

      Dearest Zoho Today, support confirmed that if I call a custom function from another custom function then I will use up two, with regards to my daily limit. A few times, we have blown our daily limit and that means that ordinary business processes don't
    • Lookup field - Can I avoid using advanced search?

      I have a lookup field in my app that has surpassed 500,000 records, now basic search is disabled and I'm forced to use advanced search. That adds multiple steps to what used to be very simple. Before: Select field > Type last digits of product code and
    • Zoho Flow reads record Tag as number instead of text string. How do I change it?

      I have experience with flow and have a number of them working. This flow is supposed to add a record in a custom module when a Contact record is edited or created with a specific tag. Trigger criteria is "Tag contains 'Athlete' ". However, the flow does
    • Calendar Overflow in Open URL popup

      Hi everyone, When Opening a form which has a date field in openurl popup, this happens. Is there any way I can change the calendar width and height or is there any other possible way this can be changed? Thanks.
    • Deluge Script - "Mismatch of data type expression" Error When Retrieving Account ID

      Hi everyone, I'm working on a Deluge Script in Zoho Creator to create Accounts and Locations. I'm running into a "Mismatch of data type expression" error when trying to retrieve the ID of a newly created Account. Here's the relevant part of my code: accountResponse
    • Issue with Exact Phone Number Match in Zoho CRM Search Record API

      Hello Everyone, I am working on a custom function that works as a REST API. This function receives API calls via a third-party webhook, where the payload data contains various details, including phone numbers, names, dates, etc. A single payload can contain
    • PDF API FROM ZOHO CREATOR DELUGE SCRIPT

      Hi I am in need of using a PDF Api to compress and Merge PDF files from zoho creator. Any support on this would be really helpfull any sample code for any PDF API would be extremely heplfull
    • Update field in “Validations on form submission”

      Hello, I have a hidden field in my form. I created a workflow that is executed when a record is created and triggered an event in the “Validations on form submission”. At this point I retrieve an external ID and need to add this value to the hidden field
    • Stop automatic email linking to deals after it is closed lost or Won & Done?

      How do I closed automatic linking of emails to deal which are closed or Won & Done? This is really important for us because sometimes if a new RFQ comes in the email is gets linked into an old deal which is lost or won and done.
    • Mapping for date field from one module to another.

      Hi there, I want to be able to map a date field(due date) in a module (sales order) to another module's(Purchase Requisition) date field(Promised customer date). Is this possible when the due date field is a zoho system date field while the promised customer
    • How to customize the task reminder notification email

      HI guys,  I hope someone can help with this enquiry: We have included an additional/new field of information when an activity is assigned/created, however this new field is not part of body of the task reminder notification e-mail that is generated by
    • Multiple contact email linking for a deal

      How can I add multiple contacts to a deal to have their emails auto link to a deal. At the moment only one primary contact is available for a deal, but we work with manufacturing and power plants where multiple contacts are associated with a deal and
    • Error when changing user permission from read only to user.

      Hi there, Ive tried to change one of my users to be able to edit, however i kept getting the error user license exceed.
    • Support of Total Experience - for exclude/include non-relevant expeience

      Hi, Currently, in Zoho People for employees, we can use “Total Experience,” which is a system field that can be an either total relevant experience” or “total experience (i.e. relevant + non-relevant)”. But there is no way to have two different fields.
    • API (v2) Search Criteria using CONCAT

      With API I can search for a contact using First_Name and Last_Name. However, when I need to search the Contact Module using a full name — and because CRM does not provide an API for full name — I am not finding a way to do this in the traditional way
    • SPAM

      Email notificaitons from Zoho People are quarantined by Microsoft. DKIM is configured and shown as authenticated but it seems that emails are not signed.
    • Zoho Billing in 2024 : A Year of Growth

      You asked! We listened! 2024 saw a lot of updates in Zoho Billing to improve your overall billing management experience. Let us take a look back at some of the major updates in 2024. New Features & Enhancements Sales Enhancements Create One-Time Invoice
    • Splitting a List into different rows

      I am getting a List from a for each loop. But I can't figure out how to separate each item that is separated by a comma. Example Zone 1 - Front Door,Zone 2 - Rear Door,Zone 3 - Side Door I need it too look like this: Zone 1 - Front Door Zone 2 - Rear
    • ZOho Recruit API hiring Pipeline

      I was wondering if it's possible to update the hiring pipeline using the API. I am messing around and I can change the status of the applications and it shows the application as rejected but the pipeline stay's at the stage that applicant was at. Also
    • Export multiple Invoice PDF

      As part of end of year accounting a client needs to export all of their Invoices in PDF from Zoho CRM. Do they need to click into every single Invoice and click the Export to PDF button. Is there a means of either doing a mass Export to PDF of all Invoices
    • Linkedin - Recruiter System Connect

      Hi there! Does anyone here know how to connect Zoho Recruit to Linkedin Recruiter via Recruiter System Connect?
    • Next Page