Setting up salesforce integration

Background

ARN’s email action let’s you send emails to internal stakeholders (Jira users) and external stakeholders (by using a comma-separated email list.). But what if you are maintaining data of all your customers in an external tool like Salesforce and what if that list is dynamic? Well, no worries, you don’t have to manually export the email list from Salesforce and add it to ARN’s rule action every time you want to execute a rule. Integrating your Salesforce account with ARN will provide you the ability to fetch a dynamic email list from salesforce using a unique endpoint URL followed by the SOQL query in the URL parameters.

Cloud version only 

This feature is currently available only on the cloud due to limitations in Salesforce app setup which does not allow setting up a dynamic call back URL in OAuth based integration.

Steps for salesforce integration

  • As Jira admin, navigate to Apps menu from Jira settings >> Configurations under ARN section >> Integrations tab

  • Click on +Add Saleforce instance shown at the right top corner

  • A Saleforce section is added, now add Connection name (give a name that will help you identify the connected salesforce account).

  • Click on ‘Connect your Salesforce account

  • Authenticate your salesforce login in the pop-up that will open and then allow necessary permissions to ARN on the pop-up screen.

  • The pop-up should close and you will see that your Salesforce account is now successfully connected with ARN.

Setting up salesforce API in ARN’s email action

Once salesforce integration is in place, you can use salesforce API in ARN’s email action to fetch a dynamic email list while executing the rule.

Here are the steps:

  • On the email rule action page, under the Send to section, Click on Integration tab.

  • Here you should see the name of the salesforce connection you added during the integration steps.

  • In the URL input box, you need to enter the endpoint URL followed by the SOQL query in the URL parameter

    • The typical endpoint URL should look like - https://<<YourSalesforceInstanceName>>.my.salesforce.com/services/data/v56.0/query/?q=<<Query>>

    • The SOQL query that needs to be added to the endpoint URL should be encoded

      • For example -

        • Original query - SELECT email FROM contact WHERE account.site='ARN'

        • Encoded query- SELECT+email+FROM+contact+WHERE+account.site='ARN'

  • Click on the Test connection button to check if the URL is valid and the query fetches write email list

    • If the connection is successful, you will see a total number of emails fetched through the query and two sample email ids from the email list on the screen.

    • You will see a necessary error message if the connection is unsuccessful in the following conditions

      • Invalid endpoint URL

      • Valid endpoint URL but no query added.

      • Valid endpoint URL and email column not included in the query.

      • Valid endpoint URL and query but 0 emails are fetched by the query.

 

IMPORTANT

Your salesforce instance must have ‘REST API’ enabled to fetch the email list via endpoint. If this setting is not enabled, then your email action setup may fail even successfully adding the integration settings. Read this to understand list of salesforce instances that allow you to the enable REST API setting.