Jira Service Desk
This document provides comprehensive instructions on setting up the integration and configuring data sources for seamless integration with Jira Service Desk. NOTE: If you plan to use this with Ticket Concierge, you can restrict the webhook to get triggered for specific projects using Jira Webhooks.
Overall this entails the following:
Jira
Open your Jira Application.
Give access to the Aisera Service User account (see link to steps below).
Enable Oauth 2.0.
Provide the callback URL
Add appropriate scopes and permissions.
Identify the Project and Service Desk ID for the integration with Aisera
Aisera
Create an Aisera Service User Account.
Create the Integration. Make sure offline access is added to the scope.
Create an Aisera bot and add the Data Source. Provide the project and its Service Desk ID.
Use Settings > Data Source in the Aisera Admin UI to run the Data Source and import Tickets.
Jira Setup
OAuth2 Setup
To create an Atlassian app (Jira, Confluence):
Navigate to https://developer.atlassian.com/console/myapps/
Set up the call-back URL to Aisera URL.
Make sure the proper vanity URL is applied as applicable.
The URL would be something like this:
https://<tenant-url>/?id=aisera.oauth.oauthCommand
Jira Platform Rest API Permissions
Make sure the appropriate permissions are provided.
The ‘jira-work’ set of permissions are needed as they give access to get the list of projects.
Get Project Info
We will need the Project and the Service Desk ID associated with it.
Log in to your Jira ServiceDesk and get to your project.
Login into your Jira Service Desk
Choose the appropriate Project
Click ‘Project Settings’ You will see a ‘Portal Settings’ link on the left. Click that. Look for the ‘Portal URL’ in the center form. The number at the end is the Service Desk ID. Keep the Service Desk ID ready because this will be needed when the data source is created.
Aisera setup
There are three parts to the Aisera setup:
Create an Integration
Obtain an access token and get the Cloud Id
Create the Datasource which will use the above integration
1. Create an Integration
a. Go to Settings> Integration > + New Integration
b. Provide the following details:
Name: Name of the integration
Endpoint: Provide URL you need to connect to
Public: Determines whether the integration can be used outside the firewall
Description: Enter the description (Optional)
Authentication Details: Basic: Enter Username and Password for Basic Authentication OAuth: Info from the setup above
Authorization URL: Enter the Authorization URL (just enter the URL the below. Do not include the client_id and redirect_uri values. https://auth.atlassian.com/authorize?audience=api.atlassian.com&scope=offline_access read%3Ajira-user read%3Ajira-work manage%3Ajira-project manage%3Ajira-configuration write%3Ajira-work manage%3Ajira-data-provider read%3Aservicedesk-request manage%3Aservicedesk-customer write%3Aservicedesk-request&state=12414142&prompt=consent
Client ID: from JIRA ServiceDesk (see image below)
Client Secret: from JIRA ServiceDesk (see image below)

IMPORTANT NOTE - The authorization URL should include the necessary scopes for each call, such as 'addAttachment.' For example: for the 'addAttachment' action, you need to include '%20write%3Ajira-work' and '%20read%3Ajira-work' in the URL. When you grant permission scopes through the UI settings in the Atlassian developer console, an authorization URL will be generated in the Authorization tab. However, please note that this URL will not include all the permissions granted from the Permissions tab. Therefore, for any specific action requiring permissions, you must manually add them to the URL instead of relying on the Authorization URL generator to include every permission.
Access Token URL: https://auth.atlassian.com/oauth/token You are redirected to your Jira site and you have to choose the appropriate site and other details. The Cloud Id section below completes the integration.
2. Get the Cloud id
Once the integration is saved, you will have an initial access token. You need to use it to make a rest call and retrieve the cloud Id for your site. The access token can be retrieved from the db, if you need help contact the connectors team.
The following command will return a response that contains cloud id:
curl --request GET \
--url https://api.atlassian.com/oauth/token/accessible-resources \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'Accept: application/json'
The response is:
[
{
"id": "1324a887-45db-1bf4-1e99-ef0ff456d421",
"name": "Site name",
"url": "https://your-domain.atlassian.net",
"scopes": [
"write:jira-work",
"read:jira-user",
"manage:jira-configuration"
],
"avatarUrl": "https:\/\/site-admin-avatar-cdn.prod.public.atl-paas.net\/avatars\/240\/flag.png"
}
]
Finally, using this id, you can construct the request URL (endpoint) and update the Integration.
Requests that use OAuth 2.0 (3LO) are made via api.atlassian.com (not https://your-domain.atlassian.net). Construct your request URL using the following structure:
Jira apps: https://api.atlassian.com/ex/jira/{cloudid}
Confluence apps: https://api.atlassian.com/ex/confluence/{cloudid}
3. Add a Datasource
Go to Settings > DataSource> + New Data Source
Search and Select “Jira Service Desk”
Enter the General details:
Name: Enter the name of the DataSource
Type: Select the Type i.e. DownStream or UpStream
Integration: Select the Integration created in the previous step
Functions: Ticket Creation, Ticket Learning..etc, and other objects to be ingested.
Schedule: Select the schedule of the DS you want it to run.
Public Domain: Enter the public domain. If a data source is marked with a public domain name, any KB ingested from DS will come up as a hint to a related question to the bot.
Description: Enter the description you want to give to the DS.
Choose your project and the associated Service Desk Id (you received this in step 2 under Jira).
Remote Executor: Select of the Remote Executor is required
Projects: Select the project key from the list
Service Desk ID: Enter the Service Desk ID
Custom Headers: N/A
Custom Script: JavaScript used for transformation
Event Type: N/A
Bypass Test Connection: Disable if you want to bypass the test connection
Custom Query: Enter the valid Jira query
Save the Data Source details.
Click the ‘Run’ button.
NOTE: For assistance during the configuration of this data source, we recommend reaching out to Aisera Support/Engineering. Their team will be readily available to provide the necessary guidance and support.
4. Review Ingested Tickets:
All the ingested tickets are available under the Tickets tab.
Click on the Tickets tab to view the invested Tickets.
Last updated