About Us


Concretio was founded in 2013 by Abhinav Gupta (8 times Salesforce MVP), with a motive to build a team of passionate individuals, who want to develop high quality solutions, and enjoy challenges posed by rapidly changing technology.


Working Hours

Monday - Friday 9 AM - 10 PM IST

Top
Salesforce + JIRA Synchronous Integration

Salesforce JIRA Synchronous Integration

PURPOSE OF THIS INTEGRATION 

Boost your Salesforce CRM business task through smooth integration with Jira

  1. All teams on the same page: Better internal talk=happy customers. coordinated aggregated feedback and connections in both systems.
  2. Coincide your significant data to the other side: Teamwork simplified. Current & error-free updates about Salesforce objects or Jira data.
  3. Bid farewell to manual errors and duplication: Duplicate endeavors and manual data entry is gone. Empower mapping schemes to push or pull data among Jira and Salesforce.

Currently, We have integrated Salesforce with two of the JIRA platforms those are Service platform and Cloud Platform

Steps to create JIRA Cloud Platform account integrating with Salesforce

  1. To Create a Jira Account If You Don’t Have One.

A. Click here to create an Account

B. Verify your account email address.

2. To Convert Your Account URL to .NET for JIRA Cloud API Platform.

A. Click here to convert URL

When we are done with the signup process of the JIRA platform account. We got an URL like https://id.atlassian.com. So to work with Salesforce JIRA integration we have to convert that URL with .net version(Refer above screenshot with site name field).

As we signed up with a JIRA platform account and they provided us default URL by using this we can’t call REST API.

To call REST API with this platform we use version 3 with username and API token with basic authentication.
To create a JIRA Service account with our custom .com URL like ‘https://jira.concret.com/’ we have to communicate with the Jira support team. To call REST API with this platform we use version 2 with username and password with basic authentication.

B. Fill your details and click Agree and Sign up.

After that please follow the steps as per JIRA standard steps.

3. To Generate an API Token.

A. Click here to generate an API Token and click on Create API token.

B. Fill your API a label

C. A new API Token will be generated, Click View or Copy to Clipboard.

4. To Create A Public Site In Salesforce To Handle JIRA Webhook.

A. Go to Setup, in the Quick Find box, enter “Sites”, click on Sites, then select New.

Fill in the details to create a new Site, then click Save.

Jira Cloud Platform Authentication:  To authenticate users by JIRA rest API for Cloud platform We need username and API tokens that we had created in previous steps.

To create JIRA API token for the cloud platform.

Code Example : 

public class HttpReq {

    public static void testMethodToken(){

        String userEmail = ‘your account username’;

        String password = ‘your password’;

        Http http =new Http();

        HttpRequest req =new HttpRequest();

        req.setEndpoint(‘https://testjiraintegration.atlassian.com/rest/api/2/issue/createmeta’);

        req.setmethod(‘GET’’);

        Blob headerValue = Blob.valueOf(userEmail+’:’+password);

        String authorizationHeader = ‘Basic ‘ + EncodingUtil.base64Encode(headerValue);

       system.debug(‘authorizationHeader ‘+authorizationHeader);

        req.setHeader(‘Authorization’, authorizationHeader);

        req.setHeader(‘cache-control’,’no-cache’);

        req.setHeader(‘Content-Type’,’application/json’);

        HttpResponse res = http.send(req);

        System.debug(‘res :’+res);

        System.debug(‘result of new :’+res.getBody());

    }

}

Please click here

Jira Service Platform Authentication:  To authenticate users by JIRA rest API for Service platform We need username and password.

public class HttpReq {

    public static void testMethodToken(){

        String userEmail = 'your account username';

        String password = 'your password';

        Http http =new Http();

        HttpRequest req =new HttpRequest();	
		
        req.setEndpoint('https://testjiraintegration.atlassian.com/rest/api/2/issue/createmeta');

        req.setmethod('GET’');

        Blob headerValue = Blob.valueOf(userEmail+':'+password);

       	String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue);

      	system.debug('authorizationHeader '+authorizationHeader);

        req.setHeader('Authorization', authorizationHeader);

        req.setHeader('cache-control','no-cache');

        req.setHeader('Content-Type','application/json');

        HttpResponse res = http.send(req);

        System.debug('res :'+res);

        System.debug('result of new :'+res.getBody());

    }

}

Please click here

NOTE: These above code examples are only to check the JIRA account authentication using REST API’s

About Webhook: A webhook is a user-defined callback over HTTPS. You can use the JIRA webhook to notify your app or web application when certain events occur in JIRA.

To communicate with Salesforce From JIRA we used Webhook. 

For More Info Regarding Webhook Please click here

  1. Go to your .NET URL and then navigate to 

Jira Settings →System→WebHooks→Create a WebHook 

After that we need to click on create a Webhook button once you click below, the screen is visible and we have to fill fields according to our requirement: 

URL looks like:

{OrgUrl}/services/apexrest/jira_sfdc?issuekey=${issue.key}&projectkey=${project.key}&modifiedUser${modifiedUser.name}&commentId=${comment.id}&attachmentId=${attachment.id}

Services/apexrest/jira_sfdc: Is the prefix of request that we made when did activities from JIRA account to salesforce webservice.

Issuekey: This is the key to the issue which automatically populated according to our setting that we did while creating the webhook in JIRA according to activities that we had selected.

Projectkey: This is the key to a project which automatically populated according to our setting that we did while creating a webhook in JIRA according to activities that we had selected.

modifiedUser: Is the id of a user who updated the issue.

CommentId: Is the id of comment which automatically populated according to our setting that we did while creating a webhook in JIRA according to activities that we had selected.

AattachmentId: Is the id of attachment which automatically populated according to our setting that we did while creating a webhook in JIRA according to activities that we had selected.

Restrictions that we faced  

  1. We can’t post feeds on chatter using connectedAPI from guest user profiles. That was the restriction that we faced while developing that.
  2. We have a limit of characters to post feed on chatter; it’s about 10,000 characters.
  3. We have limitations that we can’t mention users in JIRA description, we can’t attach inline images in the description as well as while posting comments using salesforce with JIRA REST API’S.
  4. We can’t fetch issues and projects according to user permissions from JIRA. To do the same we need administrator permission at Jira end that seems to be not possible for all users.
  5. While implementing auth2.0 authentication with JIRA we can get access token but when we tried to hit API using that we can get status code 200 with a blank body that seems to be an issue at JIRA end. Auth 2.0 Blank body Issue and that seems to be working fine in postman.

References Those We Used While Implementing Whole Functionalities  

Thanks to our Salesforce Consultant Vijay Soni for this amazing blog post brilliantly written with detailed information.

Abhilasha Dabral

Subscribe to our newsletter

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Concretio Apps will use the information you provide on this form to be in touch with you and to provide updates and marketing.