Artisan IMG > Jira Service Desk (jira-service-desk) (23bd71db-a245-4dc8-8bfa-771925857e85)
Artisan IMG > Jira Service Desk (jira-service-desk) (23bd71db-a245-4dc8-8bfa-771925857e85)

Jira Service Desk
1.1

Jira Service Desk is software built for both internal and external support.

Overview
Copy

Jira Service Desk enables employees and customers to submit help requests to your support team through a customer portal, via email, or through an embedded widget on your site. Support agents can then work on these requests, tracked as issues in a queue.

Authentication
Copy

When using the Jira Service Desk connector, the first thing you will need to do is go to your Tray.io account page, and select the workflow you wish to work on. Once in the workflow builder itself, search and drag the Jira Service Desk connector from the connectors panel (on the left hand side) onto your workflow.

With the new Jira Service Desk connector step highlighted, in the properties panel on the right, click on the Authenticate tab and 'Add new authentication' (located under the 'Authentication' field).

This will result in a Tray.io authentication pop-up window. The first page will ask you to name your authentication, and state which type of authentication you wish to create ('Personal' or 'Organisational').

As you can see, the next page asks you for your 'Instance URL'. The 'Instance URL' is the full URL of your Jira dashboard, e.g. https://mydashboard.atlassian.net. The instance URL must always be prepended with https://.

Once you have added the Instance URL and selected the required scopes to your Tray.io authentication popup window, click on the 'Create authentication' button.

An Atlassian web page will popup asking you to grant Tray.io access to your Jira Service Desk site site. Select the Jira Service Desk site that you would like to grant access to from the 'Authorise for:' input field. Click on the 'Accept' button to grant access to your Jira Service Desk site.

Your connector authentication setup should now be complete.

Available Operations
Copy

The examples below show one or two of the available connector operations in use.

Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.

Using the Raw HTTP Request ('Universal Operation')
Copy

With the Raw HTTP Request, you can effectively create your own operations.

This is a very powerful feature which you can put to use when there is an endpoint in Jira Service Desk which is not used by any of our operations.

To use this you will first of all need to research the endpoint in the Jira Service Desk API documentation v3.0, to find the exact format that Jira Service Desk will be expecting the endpoint to be passed in.

Note that you will only need to add the suffix to the endpoint, as the base URL will be automatically set (the base URL is picked up from the value you entered when you created your authentication).

The base URL for Jira Service Desk is: https://api.atlassian.com/ex/jira/[cloud_id]/rest/servicedeskapi

For example, say that the 'Get customer request' operation did not exist in our Jira Service Desk connector, and you wanted to use this endpoint, you would use the Jira Service Desk API docs to find the relevant endpoint - which in this case is a GET request called: /request/{{issue_id}}.

More details can be found here.

As you can see there is also the option to include a query parameter, should you wish to do so. So if you know what your method, endpoint and details of your query parameters are, you can get the desired customer request information with the following settings:

Method: GET

Endpoint: /request/123

Body Type : None

Final Example outcome being: https://api.atlassian.com/ex/jira/[cloud_id]/rest/servicedeskapi/request/123

Example Usage
Copy

TRAY POTENTIAL: Tray.io is extremely flexible. By design there is no fixed way of working with it - you can pull whatever data you need from other services and work with it using our core and helper connectors. This demo which follows shows only one possible way of working with Tray.io and the Jira Service Desk connector. Once you've finished working through this example please see our Introduction to working with data and jsonpaths page and Data Guide for more details.

Below is an example of a way in which you could potentially use the Jira Service Desk connector, to list request types by a specified Service Desk and to list the corresponding customer requests of that request type.

The steps will be as follows:

  1. Setup using a manual trigger and use a Jira Service Desk connector in order to list the request types available.

  2. Use a Loop connector in order to iterate through each request type individually.

  3. For each request type, retrieve the customer requests on record.

The final outcome should look like this:

1 - Setup Trigger & list request types
Copy

Once you have clicked 'Create new workflow' from your main Tray.io dashboard named it, select the Manual trigger from the trigger options available:

After you have been redirected to the Tray.io workflow dashboard, from the connectors panel on the left, add a Jira Service Desk connector to your second step. Set the operation to 'List request types'. Provide the required 'Service Desk ID' field from the dropdown list.

Feel free to re-name your steps as you go along to make things clearer for yourself and other users.

Once you have completed this step, you will have retrieved all of the request types available for your specified Service Desk.

2 - Loop through each request type
Copy

Next, search for the Loop collection connector within your connector panel, and drag it into your workflow as your next step. Set your operations to 'Loop list'.

The Loop Collection connector allows you to iterate through a list of results. In this example, we will use it to iterate through the data found within the previous Jira Service Connector connector step.

In order to specify the list you want to loop through, start by using the 'List' mapping icon (found next to the list input field, within the properties panel) to generate the connector-snake.

While hovering over the 'List request types' step (with the tail end of the connector-snake), select values from the list of output properties displayed. This will auto-populate a jsonpath within your 'List' input field, and update the type selector to jsonpath.

For more clarification on the pathways you have available, open the Debug panel to view your step's Input and Output.

JSONPATHS: For more information on what jsonpaths are and how to use jsonpaths with Tray.io, please see our pages on Basic data concepts and Mapping data between steps

CONNECTOR-SNAKE: The simplest and easiest way to generate your jsonpaths is to use our feature called the Connector-snake. Please see the main page for more details.

Upon finishing this step of the workflow, you will be able to iterate through each of the request types from the previous step and retrieve their IDs.

3 - For each request type, retrieve customer requests
Copy

The last step is to drag a Jira Service Desk connector inside of the Loop Collection step itself. Set the operation to 'List customer requests'.

INTERPOLATION: When you wish to include JSON generated data within another input/output result, use our Interpolation method as described here.

You will need to populate the 'Request type ID' to filter the customer requests by request type. To do this, use the connector snake and hover over the 'Loop Collection' step (with the tail end of the connector-snake), select 'id' from the list of output properties displayed.

You can now run the workflow by clicking run in the bottom right hand corner of the workflow builder. If you click on 'Debug' at the top of the page, you can see your workflow execution. If everything has completed correctly, all steps in the debug panel should show as green.

As you can see, the connector loops through the list of profiles as provided by step 1. If you click on each execution of 'List customer requests', you will be able to see the results of each loop.

BEST PRACTICES: Whenever you do decide to create your own workflow, be sure to check out some of our key articles such as: