Integreat 04: Integrating Zoho Creator with Zoho Desk - Part 2

Integreat 04: Integrating Zoho Creator with Zoho Desk - Part 2



Hi folks, 

We're hope the previous post on Zoho Desk integration was useful to you. In this post we will cover the rest of the tasks (task 5,6, and 7) that can be automated once you integrate your Zoho Creator application with Zoho Desk. 

As mentioned in the previous post, 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

5. Search records by specifying criteria in Zoho Desk, using Zoho Creator

You can search records in Zoho Desk by specifying the criteria in Zoho Creator. This task can achieved by making use of the zoho.desk.searchRecords() task.

Syntax

<variable> =zoho.desk.searchRecords(<orgID>, <module_name>,<query>, <fromIndex>,<limit>, <connection>);


Use case

Let's say you want to search the list of tickets in Zoho Desk by specifying the subject.

Assume that the Ticket Subject Search form has the following field:
  • Subject(Single Line field type
We need to fetch all the tickets matching the subject ("testing") that's specified in the Zoho Creator form, from the Tickets module in Zoho Desk.

Example
  1. response = zoho.desk.searchRecords(691803821, "tickets", {"subject":input.Subject}, 0, 10, "deskAuth");

6. Fetch related records in Zoho Desk, using Zoho Creator

You can fetch related records from a Zoho Desk module based on a specific record, by using the zoho.desk.getRelatedRecords() task.

 Syntax

<variable> = zoho.desk.getRelatedRecords(<orgID>, <sub_module>, <parent_module>, <record_ID>, <fromIndex>, <limit>, <query_value>, <connection>);

The zoho.desk.getRelatedRecords task allows you to fetch the following information:

  • Tickets based on a contact
  • Tickets based on an account
  • Tasks based on a ticket
  • timeEntry based on a ticket
  • timeEntry based on a task
  • timeEntry based on an agent
  • Comments based on a ticket
  • Thread based on a ticket
Use case

Let's say you want to fetch the tickets of a particular contact and want to autopopulate the Ticket Number dropdown field.

Let's assume the Ticket Details form has the following fields:

  • Contact ID (single line field type)
  • Ticket Number (drop down field type)

Example
  1. contact_id=input.contactid.tolong();
  2. mp = Map();
  3. y=zoho.desk.getRelatedRecords(<orgID>,"tickets","contacts",contact_id,<range>,<range>,mp,"<connection name>");//fetching ticket number and sorting it, list is created
  4. y = y.getjson("data").toJSONList();
  5. for each rec in y
  6. {
  7. input.Ticket_Number:ui.add(rec.getjson("ticketNumber").tolong());
  8. }
7. Create related records in Zoho Desk, using Zoho Creator

You can create a related record in a sub-module belonging to a record in a parent module in Zoho Desk. This can be achieved by using the Deluge Task zoho.desk.createRelatedRecord().

Syntax

<variable>=zoho.desk.createRelatedRecord(<orgID>, <sub_module>, <sub_recordID>, <parent_module>, <parent_recordID>, <record_value>, <connection>);

This task allows you to create the following:
  • A timeEntry based on a ticket
  • A timeEntry based on a task

Use Case
The time entry can be created in the ticket by making use of the below script in the On success workflow of the form.

Example
  1. recordValue = {"executedTime":"2019-10-18T07:38:48.000Z"};
  2. response zoho.desk.createRelatedRecord(691803821,"timeEntry","tickets",406419000000271001,recordValue,"deskAuth");

Merge tickets
You can merge tickets by merging the values of the ticket ID to another ticket. Use zoho.desk.ticket.merge() task to perform this action.

Syntax
<variable> = zoho.desk.ticket.merge(<orgID>, <ticket_ID>, <param_value>, <connection>);

Use case
If you see any duplicate tickets created in Zoho Desk and you wanted to merge those tickets into one, the zoho.desk.ticket.merge() Deluge task in Creator do the job for you.

Example
  1. paramValue = {"ids":{<ticketID 1>,<ticketID 2>}};
  2. response = zoho.desk.ticket.merge(<org iD>,<ticket ID>,paramValue,"<connection name>");
//ticket ID=> where other ticket ID 1&2 in paramvalue variable will be merged to ticket ID.

Move a ticket
The ticket can be moved from one department to another department with the help of the zoho.desk.ticket.move() Deluge task in Creator.

Syntax
<variable> = zoho.desk.ticket.move(<orgID>, <ticket_ID>, <department_ID>, <connection>);

Use case
If you see any ticket assigned to the wrong department in Desk and wanted to reassign it to the correct department, you can make use of the zoho.desk.ticket.move() Deluge task.

Example
  1. x = zoho.desk.ticket.move(<org iD>,<ticket iD>,<department ID>,<connection_name>);
// department ID is the ID of the department to which this ticket will be moved.

The ticketID and department ID can be fetched using fetch task.

Split a ticket
A ticket can also be split into multiple tickets based on the thread, by using the thread ID of that particular ticket.To get the thread ID of the ticket, use the getrelatedrecords task. 

Syntax

 mp = Map();
g = zoho.desk.getRelatedRecords(<orgID>,"threads","tickets",<ticketID>,<map variable>,"<connection name>");
//info g; (thread ID can be fetched from this response)
h = zoho.desk.ticket.split(<org ID>,<ticket iD>,<thread ID>,"<connection name>");

We hope this post on Zoho Desk integrations was useful to you. If you have any questions, feel free to add them as comments below. If you'd like us to cover any specific integration, please add them here in comments and we'll take it up. 





    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now