Automation #14: Capture Jira Issue Key/ID in a Ticket Custom Field

Automation #14: Capture Jira Issue Key/ID in a Ticket Custom Field

Hello Everyone!

This month's edition brings you a custom function to consolidate your records associated with Jira integration. Jira integration enables support engineers and R&D units to collaborate seamlessly on feature development, product improvement, and enhance support. Tracking tickets with Jira IDs helps support engineers communicate updates to customers effectively. This custom function will help you consolidate reports of the tickets associated with Jira IDs.

David, a developer, uses Jira to manage all projects related to Zylker products. Sarah is the support admin for Zylker products, leading a team of customer support engineers. For tickets requiring developer intervention, Sarah escalates them to David with a Jira ID. Although the process of resolving tickets is smooth, it becomes challenging for Sarah to get an overview of the tickets with Jira IDs handled each month. How can these tickets be consolidated in one place?

To ensure seamless integration, we propose capturing Jira issue keys using custom fields in the Tickets module. This function will fetch the bug key and update it in a custom field. Based on the Jira Bug Key, you can generate a custom report.

Prerequisites:

1. Create two custom fields:

1.1 A check-box field with your desired name to trigger the workflow.
1.2 A single field with the name "Jira Issue ID" to store the Jira Issue key/ID.
To add a custom field to the Tickets layout, navigate to "Setup >> Customization >> Layouts and Fields >> Layouts >> Access the layout." Here, you can add the custom fields.For reference, please see Adding custom fields.

2. Create a Connection

To create the connection, perform the following steps:
1. Go to Setup > Connections under Developer Space
2. Click "Create Connection"
3. Select "Zoho OAuth" under "Default Connection"
4. Give the connection name as "jirabugkey"
5. Under Scope below values, select
      Desk.tickets.READ
      Desk.tickets.UPDATE
6. Click "Create and Connect"
7. Click "Connect" and click "Accept"
Connection is created successfully.
To create a workflow rule and associate the custom function, perform the following steps:
1. Go to Setup, under Automation, click Workflows.
2. On the left panel, under Workflows, click Rules > Create Rule.
In the Basic Information section, carry out the following steps:
3. In the Module drop-down menu, select Tickets.
4. Enter a name and description for the rule.
5. If you want to activate the rule right away, select the Active checkbox. Else, you can create the rule and activate it later on the Rules page.
6. Click Next.
In the Execute on section, perform the following steps:
7. Select "Field Update". Under this, select the check-box field created in the prerequisite (1.1).
8. Click Next, under "Criteria", select the criteria as check-box field created is "Checked".
9. In the Actions section, carry out the following steps:
10. Click the + icon under "Action" and select "New" against Custom Functions
11. Enter a name and description for the custom function.
12. In the script window, input the Custom Function you find below:

Custom Function Script:

deskDomain = "https://desk.zoho.com";
//Replace your zoho desk URL accordingly
getTicketInfo = invokeurl
[
url :deskDomain + "/api/v1/tickets/" + ticketID + "/jiraIssue"
type :GET
connection:"jirabugkey"
];
if(getTicketInfo != null && getTicketInfo != "")
{
jiraID = getTicketInfo.get("bugKey");
jsonString = {"cf":{"cf_jira_issue_id":jiraID}};
updateTicket = invokeurl
[
url :deskDomain + "/api/v1/tickets/" + ticketID
type :PATCH
parameters:jsonString + ""
connection:"jirabugkey"
];
}
13. Click Edit Arguments.
14. In the Name field type ticketID, and from the Value drop-down list select Ticket Id under Ticket Information.
15. Click "Save" to save the custom function
16. Click "Save" again to save the workflow.

How this Function works?

Once the agent files a new issue or links an existing Jira issue with the ticket, the agent should update the check-box field created. This will trigger the custom function, fetch the Jira issue ID, and update it in the custom field.

We hope this custom function enhances your productivity towards customer support. Stay tuned  for regular updates and insights on our automation features in this space.
 


      • Sticky Posts

      • Zoho Desk Virtual Meetup: US Central, October 5 - 7, 2021

        After the interactive Virtual Meetups in the other regions, we are starting with the US Central and Midwest regions from October 5 to October 7, 2021. The dates for other regions will be announced soon.  At this event, we will explore the topics which
      • Register for Zoho Desk Beta Community

        With the start of the year, we have decided to take a small step in making the life of our customers a little easier. We now have easy access to all our upcoming features and a faster way to request for beta access. We open betas for some of our features
      • Ask the Experts 10: A 5-hour online Q&A on Zoho Desk Best Practices

        Welcome to Zoho Desk's Ask the Experts session! This is a monthly discussion on our  forums; wherein a panel of experts will take on questions  specific to topics related to Zoho Desk. The panel will be available for a 5-hour period and will answer any questions posted here.   Let's begin the year learning some best practices from our experts. In this month's ATE we are opening the floor to questions on how to use Zoho Desk the best way.  If you have a business use case but not sure if Workflow is
      • Share your Zoho Desk story with us!

        Tell us how you use Zoho Desk for your business and inspire others with your story. Be it a simple workflow rule that helps you navigate complex processes or a macro that saves your team a lot of time; share it here and help the community learn and grow with shared knowledge. 
      • Ask the Experts 7: A 5-hour online Q&A on Telephony and Call Module

        Welcome to Ask the Experts session! This is a monthly discussion in forums; each session, a panel of experts will take questions on specific topics related to Zoho Desk. The panel will be available for a 5-hour period and answer any questions posted here. In this month's Ask the Experts, we will take questions on everything related to Telephony and the Call Module in Zoho Desk. We will discuss the following aspects:  Integration with different Telephony vendors Routing calls to agents Converting