Automation#35 : Auto-Add Comments under the Owner's Name in Tickets via Macros

Automation#35 : Auto-Add Comments under the Owner's Name in Tickets via Macros


Hello Everyone,
This week's custom function provides simple steps to configure a Macro for adding comments to tickets with the name of the Comment owner.
When managing tickets, you can use the Comment feature to communicate internally with your team and keep everyone updated. If you select Comment(Private), the information will only be visible internally within your Zoho Desk. If you choose Comment(Public), the comment will be visible to your customers on the Help Center.

While automating comments using Macros, it can be challenging to track progress or identify the comment owner if no agent is attributed to the automated entry. This custom function ensures that the comment will appear under the name of the agent who applied it, rather than the person who configured the Macro.
 
Additionally, this Macro allows you to include a standardized comment to save time for frequently repeated updates.  
For example, Zylker Techfix collaborated across multiple departments and often required detailed customer information before transferring tickets between teams. They used comments to inform colleagues about the ticket status. To streamline this process, they automated a frequently used comment: "Awaiting additional information from the customer to proceed further." This clearly communicated to team members why a ticket was on hold. Additionally, this custom function allowed them to track which agent who applied the Macro.
To configure this within your Macros, please follow the steps below.

Create a connection

  1.1 Go to Setup(S) and choose Connections under Developer Space.
  1.2 Click Create Connection.
  1.3 Select Zoho Desk under Default Services.
  1.4 Set the connection name as deskconnection.
  1.5 Under Choose Scopes, choose the below scope values:
Desk.basic.READ
Desk.settings.READ
Desk.tickets.UPDATE
  1.6 Click Create and Connect.
  1.7 Click Connect.
  1.8 Choose the Desk's organization to connect with Deluge, and click Submit.
  1.9 Click Accept.
Connection is created successfully.

Configure Custom Function within the Workflow Rule

1. Go to Setup, choose Macros under Automation.
2. Under Macros, click Create Rule.
3. Check if the right department is selected
4. Under Basic Information, give a Rule Name and Description.
5. Under Availability, select All agents/Specific Agents based on your requirement. If you choose Specific Agents, select the agents for whom you want to make this Macro available. Click Next.
6. Under Actions, click on the drop-down in the + icon and select Custom Functions >> New.
    6.1 Under Basic Information, enter Name and Description. Choose Tickets under Module.
    6.2 Under Argument Mapping, give a desired Method Name. Map the arguments as below:
        6.2.1 In the Argument Name field, type ticketId and select Ticket Id in the Tickets Section.
 7. In the script window, insert the Custom Function given below:
  1. // ----<<<< User Inputs >>>>----
  2. // --- Replace ".com" with appropriate domain extension based on customer's location/DC ---
  3. deskURL = "https://desk.zoho.com";
  4. commentContent = "<<Your_comment_content>>";
  5. // ----<<<< Initial Configs >>>>----
  6. logs = Map();
  7. ticketCommentParam = Map();
  8. loginUserEmail = zoho.loginuserid;
  9. logs.insert("ticketId": ticketId);
  10. logs.insert("loginUserEmail": loginUserEmail);
  11.  
  12. //---------------------------
  13. try {
  14.     // ---- start your logic from here ----
  15. agentDetailsResponse = invokeurl
  16. [
  17. url :deskURL + "/api/v1/agents/email/" + loginUserEmail
  18. type :GET
  19. connection:"deskconnection"
  20. ];
  21. logs.insert("agentDetailsResponse":agentDetailsResponse);
  22. if(agentDetailsResponse != null && agentDetailsResponse != "" && agentDetailsResponse.size() > 0 && agentDetailsResponse.containKey("id"))
  23. {
  24. agentId = agentDetailsResponse.get("id");
  25. ticketCommentParam.insert("commenterId":agentId);
  26. }
  27. // ---- Add comment in the ticket ----
  28. ticketCommentParam.insert("content":commentContent);
  29. ticketCommentParam.insert("isPublic":"false");
  30. ticketCommentParam.insert("contentType":"html");
  31. logs.insert("ticketCommentParam":ticketCommentParam);
  32. commentAddResponse = invokeurl
  33. [
  34. url :deskURL + "/api/v1/tickets/" + ticketId + "/comments"
  35. type :POST
  36. parameters:ticketCommentParam.toString()
  37. connection:"deskconnection"
  38. ];
  39. logs.insert("commentAddResponse":commentAddResponse);
  40. }
  41. catch(errorInfo) {
  42.     logs.insert("errorInfo": errorInfo);
  43. }
  44.  
  45. info "logs: \n" + logs;
  46.  
  47. if(logs.containKey("errorInfo"))
  48. {
  49.     throws "Error happen in the CF execution";
  50. } 
Notes
Note
a. In Line 3, replace .com in the address with .in/.eu/.ca based on your DC.
b.In Line 4, enter the text which you would like to include as a ticket. 
8. Click Save to save the custom function.
9. Click Save again to save the Macros.


We hope this custom function helps streamline your team's communication and enhances your ticket management process. If you have any questions or need further assistance, feel free to reach out to us at
support@zohodesk.com .
Regards,
Lydia | Zoho Desk 


    • 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
    • Recent Topics

    • Records Per Page

      Can we get max number of records per page increased from 100 to 250 and 500 please? Or alternatively allow us to use the Zoho Sheet View for all records and not just the max 100 showing on the page? thanks.
    • Zoho Forms sheet prefil

      I've been using zoho sheet prefill for a week and it was working perfectly, as soon as i deleted the particular sheet and replaced it with another one no matter what I do it cant find the record and i get this message. Could you please assist me to resolve
    • Check out in Meetings

      Why there is no check out in Meetings of Zoho CRM, very difficult to track
    • WO Completion Status Not Updating Automatically

      Hello Latha, Hope you are doing well. Over the past few days, we have been facing an issue with WO completion. When an AP is marked as complete, the work order status is not automatically updating to “Completed,” and we have to mark it manually. Could
    • CRM to Desk Contact Sync Issues?

      Hello, I noticed none of the contact changes in CRM are being transferred over to Desk. Anyone else experiencing this? I checked the sync history in desk and it confirms it - it doesn't show "X Contacts Synced" like it normally does.
    • Microsoft Teams integration in Zoho Apptics

      Good app monitoring is not just about collecting data. It is about making sure important updates reach the team in time to act on them. When an app crashes or a user shares feedback from within the app, teams should be able to see it promptly without
    • Able to change project on timelog entries

      Ability to move the timesheet entry from one project to another. When a user adds a wrong entry a manager can change/update the timesheet entry to the correct project.
    • Marketing Tip #28: Increase buyer confidence with visible social media links

      Your social media pages are often where customers go to “double-check” your brand before buying. When visitors can easily find your Instagram, Facebook, YouTube, or LinkedIn from your store, it builds trust and makes your business feel more real and active.
    • [Webinar] Solving business challenges: One tool for documents, forms, PDFs, e-signatures, and more

      Hi Zoho Writer users, Most businesses rely on multiple tools, such as a word processor, form builder, e-signature provider, and PDF editor, for their document workflows. Managing multiple subscriptions, switching between tools, and moving data across
    • Customer Message Edit/Delete Function & Backend Visibility Inquiry

      目前客服已发送的对话支持编辑和删除功能,请问在 Zoho 系统后台,是否可以查看客服具体发送了什么内容,以及删除或修改了哪些信息?如果无法查看,这个功能是否可以通过设置关闭客服的编辑和删除权限?如可以,请告知具体设置路径。 Currently, customer service agents are able to edit and delete messages after sending them. In the Zoho system backend, is it possible to view
    • Google Drive API 403 PERMISSION_DENIED from Deluge custom function - OAuth connection not recognised

      Hi all, I've built a custom Deluge function to route Zoho CRM Account attachments into specific Google Drive subfolders based on filename prefix. The CRM API steps all work correctly, however our first Google Drive API call (listing subfolders via drive/v3/files)
    • Supercharge Your Zoho Billing Workflows with AI Using Zoho MCP

      What is MCP and how does it connect to Zoho Billing? If you've ever wished you could just tell your billing software what to do without clicking through menus, running reports manually, or switching tabs every five minutes, that's exactly what the Zoho
    • Automation Series: Notify Admin When User Accepts an Invitation

      In Zoho Projects, a portal is an organisational-level workspace where user can manage multiple projects. To join a portal, a user will have to accept the portal invitation. However, it is important for admins to be in the loop when a user accepts the
    • Knowledgebase SEO

      We have a custom-domain mapped help center that is not restricted via login. I have some questions: a) will a robots.txt file still allow us to control indexing? b) do we have the ability to edit the sitemap? c) do category URLs get indexed by search
    • Mail Merge preview won't load

      Hello! One of our users has not been able to use mail merge templates in CRM as the preview screen does not load. We have many templates for one of our custom modules and the users are used to this feature and have been using it for years without any
    • mask Customer phone number and agents cant see customer phone number

      Is there any way we can integrate Zoom Phone with Zoho CRM while ensuring that customer phone numbers remain masked? We need a solution where agents can make outbound calls but cannot see customer phone numbers. Please let us know if there is any solution
    • Issue with Zoho Sheets

      Edit: Small Error of Opening doc and losing entire formatting while downloading to *.xlsx format. Also my formulas don't work while opening a document downloaded from Zoho sheets, since the colors aren't matched to the correct data. Even though the data
    • Record-Level Cliq Conversations Inside Zoho CRM

      It would be extremely useful to bring the Zoho Projects + Cliq conversation experience into Zoho CRM records. Today, in Zoho Projects, each project or task can have its own related chat conversation through Cliq, allowing team members to discuss that
    • Introducing note actions and dynamic visibility in Kiosk Studio

      Hello all, We are introducing enhancements to Kiosk Studio that will improve the product scope and meet your custom needs more precisely. What's new? Add notes as Actions: You can add notes to CRM records as kiosk Actions, as well as insert merge fields
    • Logging Calls not working

      For some reason, logging calls is not working anymore. Description of problem: On a Lead's record, in the "Open Activities" block, clicked on "Add New" Clicked on "Call", clicked on "Log a call" Nothing happens. If I click on "Schedule a call" nothings
    • How do I filter contacts by account parameters?

      Need to filter a contact view according to account parameter, eg account type. Without this filter users are overwhelmed with irrelevant contacts. Workaround is to create a custom 'Contact Type' field but this unbearable duplicity as the information already
    • Data Import into Zoho Forms

      Hi everyone, I am migrating several Google Forms into Zoho Forms. I can recreate the forms, but I also need to bring over historical response data currently stored in Google Sheets. I want to keep using that data inside Zoho for analysis, reporting, and
    • How Can I Clear Deleted Members and Free Up Their Storage?

      Can we remove these deleted members and free up their storage?
    • Cliq iOS can't see shared screen

      Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
    • Pro rata holiday allowance for variable part time employees

      We have some part time staff who work variable hours and their holiday allowance is based on pro rata system. In Zoho people is there any way to calculate their holiday allowance based on actual hours worked? I.e. worker is entitled to a pro-rata amount of 5.6 weeks holiday, which is equivalent to 12.07% of hours worked over a year. So part time staff's holiday is accrued at a rate of 12.07% per hour worked. Thanks
    • Zoho Bookings - Provide Appointment System ID in Zoho Flow Variable

      Hi Bookings Team, It would be great if you could provide the system record ID for appointments as a variable in Zoho Flow trigger outputs and Fetch Appointments action. This would allow us to create a dymanic URL which can be clicked by a staff user to
    • Understanding tasks

      So we have a module linked to contacts called Equipment and that in turn has a related module called service calls. Often on a service call we want add a task but we are not able. I think it needs a link to the contact. WE therefore tried to add tasks
    • How to transfer files from Creator file upload fields to CRM file upload fields

      This article describes how to transfer files from Zoho Creator file upload fields to Zoho CRM file upload fields. I'm posting it here because the current documentation does not fully and accurately describe how to do this with certain file types (PDF,
    • Add Comprehensive Accessibility Features to Zoho Writer

      Hello Zoho Writer Team, We hope you are doing well. We would like to submit a feature request to enhance Zoho Writer with a full set of accessibility tools, similar to the accessibility options already available in the Zoho Desk agent interface. 🚧 Current
    • ¿Puedo migrar mi sitio desde WordPress a Zoho? ¿Zoho admite herramientas con código personalizado?

      ¡Hola comunidad! Estoy evaluando la posibilidad de migrar mi sitio web https://calculadoradenotas.cl/ desde WordPress a una solución Zoho, y tengo algunas dudas técnicas que espero puedan aclararme. Mi sitio no es solo informativo: es una herramienta
    • Make Task ID and Issue ID columns filterable like all other columns

      Hello Zoho Projects Team, We hope you are doing well. We would like to submit a feature request regarding the Task ID and Issue ID columns in Zoho Projects list views. Current Limitation: As of now, in both the Tasks and Issues modules, almost every visible
    • Improve Back Navigation (X Button) Inside Nested Milestones, Task Lists, Tasks, and Issues

      Hi Zoho Projects Team, We would like to request an improvement to the X / close button navigation behavior inside milestones. Currently, the milestone area behaves as a nested hierarchy (tree structure): Project → Milestone → Task List → Task So when
    • Add a way to connect Log360 Cloud logs with Zoho analytics

      Hi, Several month ago Log360 Cloud was added to zoho one - and this is great. But as far as I see there is no prebuilt way to connect Zoho analytics to the logs we have in Log360 Cloud. Please add a prebuilt connection like we have for so many other zoho
    • Extend GitHub Commit Integration to Tasks in Zoho Projects

      Hello Zoho Projects Team, We hope you are doing well. We would like to submit a feature request regarding the current GitHub integration in Zoho Projects, specifically the ability to link commit information. Current Limitation: As of now, Zoho Projects
    • Enable Screen Recording in Zoho WorkDrive Mobile Apps (Android & iOS)

      Hi Zoho WorkDrive Team, How are you? We are enthusiastic Zoho One users and rely heavily on Zoho WorkDrive for internal collaboration and content sharing. The screen-recording feature in the WorkDrive web app (similar to Loom) is extremely useful- however,
    • Zoho Project - Total Forecasted Hours

      Does anyone know an easy way to get a total of all the forecasted hours across the portfolio? I'm aware trying to create a custom report that can generate this figure for each task and the total up but the completion percentage doesn't seem to come back
    • Bank Fees - Allow User to Choose Expense Account

      Bank fees from Customer Payments can only be debited against the system Bank Fees account due to hard-coding. The user should be able to select which expense account those fees are debited against. The use case is pretty straightforward. A business like
    • Attendance Kiosk Mode for all Employees

      Is it possible to assign a tablet (ios/android) so that all employees can check in or out using a simple QR code? If not would it be possible to integrate attendance with a web app that also has a tablet app that works in kiosk mode? If yes can anyone recommend such an app?
    • How can we get payment status updates for payment links in Zoho Books using webhooks?

      When we create and share a payment link in Zoho Books, is there a way to know when the payment is updated? Can we use webhooks to get real-time updates for payment link status instead of checking manually?
    • Challenges with data consistency when integrating Zoho with other systems

      In setups where Zoho (CRM/Inventory) is connected with external systems like eCommerce platforms, maintaining consistent and reliable data across systems can be challenging. Some common issues that tend to come up: Product data mismatches (variants, pricing
    • Next Page