Hi folks,
We're back with a new post in our InteGreat series, and this time we're going to walk you through how to integrate your Zoho Creator application with Zoho Desk. Before we dive into this integration, let's quickly look at what Zoho Desk is and how you can use it in your organization.
It's a cloud-based platform that helps businesses assign, track, and manage customer support tickets efficiently.
Integrating with Zoho Desk
With this integration you can push data automatically from your Zoho Creator application to your Zoho Desk account and perform various actions, without any manual effort. You can connect these services by mapping fields in your Zoho Creator form to a supported Zoho Desk module.
Integrate your applications with Zoho Desk and automate tasks like:
● Creating tickets, contacts, accounts, tasks, products, and contracts in Zoho Desk, using Zoho Creator.
● Access and search ticket details based on a contact and account, using Zoho Creator.
● Merge and split tickets and move them to specified departments in Desk, from Zoho Creator.
With Deluge, you can use the built-in integration task to connect with the different modules in Zoho Desk. These are the Zoho Desk modules that we support:
● Agents
● Departments
● Tickets
● Contacts
● Accounts
● Tasks
● Products
● Contracts
Note: First, you need to connect to Zoho Desk. Please check the help link to get the details about setting up the connection. You can directly create a record in Zoho Desk while creating a new record in Zoho Creator, just by creating a simple workflow. This eliminates the need for re-entering data again in Zoho Desk.
Once you've established a relationship between Zoho Creator and Zoho Desk, you can perform the following task:
1. Create new records in Zoho Desk
2. Fetch data from Zoho Desk
3. Fetch specific records using the record ID from Zoho Desk
4. Update specific records in Zoho Desk, using Zoho Creator
5. Search records by specifying criteria in Zoho Desk, using Zoho Creator
6. Fetch related records in Zoho Desk, using Zoho Creator
7. Create related records in Zoho Desk, using Zoho Creator
Now let's look at each of them in more detail:
1. Create new records in Zoho Desk
You can directly create a record in Zoho Desk while creating a new record in Zoho Creator, just by creating a simple workflow. This eliminates the need for re-entering data again in Zoho Desk.
Syntax
response = zoho.desk.create(<orgId>, <module>, <MAP>, <connection>);
Use case
Let's say you have a Contacts form—when the user submits the form, the entered information can be automatically recorded in Zoho Creator and in the Contacts module of Zoho Desk, as well.
Let's assume the Contacts form has the following fields:
- Name (Name field type)
- Email (Email field type)
- Secondary Email (Email field type)
To create this record simultaneously in the Contacts module of Zoho Desk, you need to execute the zoho.desk.create() task in the On Success actions block of the Contacts form.
You can achieve this using the following script:
- contactMap = Map();
- contactMap.put("firstName",input.Name.first_name);
- contactMap.put("lastName",input.Name.last_name);
- contactMap.put("email",input.Email);
- contactMap.put("secondaryEmail",input.Secondary_Email);
- response = zoho.desk.create(<ORG ID>,"contacts",contactMap,"deskAuth");
2. Fetch data from Zoho Desk
You can fetch data from Zoho Desk to autopopulate a Zoho Creator form. Use zoho.desk.getRecords() task in Zoho Creator to do it.
Syntax
response = zoho.desk.getRecords(<orgId>, <module>, <from>, <limit>, <optionalMap>, <connection>);
Use case
You can use this task when you want to fetch the list of all your tickets stored in Zoho Desk, and populate them in a dropdown field in Zoho Creator. You can also fetch the relevant contact details from Desk to populate the form fields.
Let's assume the ticket details form has the following fields:
- Ticket Number (Dropdown field type)
You can fetch the Ticket Number from the Tickets module in Zoho Desk, to populate the Ticket Nnumber (dropdown field) in the Creator form using the ui.add() task. Use the below script in the On Load action block of the Zoho Creator form.
- response = zoho.desk.getRecords(<ORG ID>,"tickets",0,10,{"":""},"deskAuth").getJson("data").toJSONList();
- for each ticket in response
- {
- input.Ticket_Number:ui.add(ticket.getJson("ticketNumber"));
- }
3. Fetch specific records using the record ID from Zoho Desk
You can also fetch a single record from Zoho Desk by specifying its record ID, with the help of Zoho Creator form. You can make use of zoho.desk.getRecordById() Deluge task to get this job done.
Syntax
response = zoho.desk.getRecordById(<orgId>, <module>, <recordId>, <connection>)
Use case
For example, you have a record ID of the ticket you'd like to view the details of.
Let's assume the Ticket Search form has the following fields:
- Ticket ID (Single line field type)
- Ticket Number (Single line field type)
You can fetch the ticket number of the specified ticket ID from the Tickets module, and populate the ticket number field with the same details. Use the script below in On User Input of the ticket ID field's action block on the ticket search form.
Example
- resp = zoho.desk.getRecordById(691803821,"tickets",input.Ticket_ID.toLong(),"deskAuth");
- input.Ticket_Number = resp.getJson("ticketNumber");
4. Update specific records in Zoho Desk, from Zoho Creator
You can automatically update records in Zoho Desk by simply submitting a form with the relevant details in Zoho Creator. You can perform this action by using the zoho.desk.updateRecord() task.
Syntax
response = zoho.desk.update(<orgID>, <module>, <record_ID>, <MAP>, <connection>);
Use case
Let's say you want to simultaneously update the ticket number in Zoho Desk when it's edited in Zoho Creator. You can configure a workflow to automatically update the same record in Zoho Desk.
Let's say the Ticket Search form has the following fields:
- Ticket ID (Dropdown field type)
- Ticket Subject (Single line field type)
You can update the subject of a specific ticket in the Tickets module with what's entered in the ticket number field (Single line field type) of the Ticket Search form. You can use the script below in On Success of the form workflow.
Example
- ticketMap={"subject":input.Ticket_Subject};
- response = zoho.desk.update(691803821, "tickets", Ticket_ID.toLong(), ticketMap, "deskAuth");