I have written a custom function in Zoho Desk to automatically assign a ticket to an agent in Zoho Desk based on the account owner in Zoho CRM when a new ticket is created in Zoho Desk. I hope this helps who need it.
You must create a workflow to automate this. To create a workflow, follow below steps.
- In the New Workflow page, do the following:
- Select the Ticket module.
- Enter the Rule Name.
- Select the Active checkbox.
- Enter the Description for the workflow rule.
- Click Next.
Step 2: Execute On
- In the Execute On section, select Create.
- Click Next.
Part 3: Actions
- Under Actions, click the Add Custom Function icon and select an New custom function.
- Enter function Name.
- Click on Edit Arguments and enter argument name ticketId and select value Ticket Id.
- Click Done.
Pre-requisites:
1. Create connection in Zoho Desk with following scopes for Zoho CRM service
ZohoCRM.modules.contacts.READ, ZohoSearch.securesearch.READ
2. Create connection in Zoho Desk with following scopes for Zoho Desk service
Desk.settings.READ, Desk.basic.READ
Paste below code in editor. Replace orgId with your org ID.