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 to optimize your customer support with the automation capabilities of Zoho Desk.
With a wide variety of businesses using Zoho Desk, there are different use cases that need to be included and accounted for. In this month's automation series we will look at how comments can be added automatically to tickets whenever a business process is triggered. This could be a status change, a reply from a customer, the creation of a task, or others. These processes and use cases can differ from business to business but by using this custom function you, can ensure a comment is added to the tickets leaving specific instructions, steps to resolve the ticket, credentials to use or any other specific keywords.
To create a connection, carry out the following steps:
- Click on Setup > Developer Space > Connections
- Click Create Connection
- In the Pick Your Service section, under Pre-Defined Services find and select Zoho OAuth
- In the Connection Details section, add Zoho Desk as the Connection Name and Connection LinkName
- In the Choose Scopes list, select the value Desk.tickets.UPDATE
- Click Create and Connect
- In the page that appears, click Connect
If you have more than one portal associated, select the Portal to which this connection should be added and click Accept.
To add the comments to the tickets, proceed with these steps:
- Go to Setup, and under Automation, click Workflows.
- On the left panel, under Workflows, click Rules > Create Rule,
In the Basic Information section, carry out the following steps:
- In the Module drop-down menu, select Tickets.
- Enter a name and description for the rule.
- 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.
- Click Next.
In the Execute on section, perform the following steps:
- Select the Create checkbox to execute this rule every time a new ticket is created.
- Click Next.
In the Criteria section, mention the criteria based on which comment should be added to the ticket. For example, if the email contains firstname.lastname@example.org
- Click Next.
In the Actions section, carry out the following steps:
- Click the + icon and select Custom Functions > New
- Click Edit Arguments
- In the Name field type TicketID, and from the Value drop-down list select Ticket Id under Ticket Information.
- In the script window, input the Custom Function you find below:
commentContent = "Please follow the below mentioned steps to address the issue\n\n1. Click on Settings > Agents\n\n2. Add this email as new Agent.";
comment = Map();
createComment = invokeurl
url :"https://desk.zoho.com/api/v1/tickets/" + TicketID + "/comments"
parameters:comment + ""