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:
- 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, 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.
- 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:
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.