The steps below describe the integration of Jira Issue updates to Salesforce via zAgileConnect with Salesforce Flow and Process Builder. The objective in this example is to notify Salesforce Case owner via email based on certain Issue Updates posted to Salesforce from Jira (for example: Issue status transition).
This example requires:
- A Salesforce Flow
- A Process builder that will call the flow
The Steps to implement an email to notify Salesforce Case Owner when a Jira Issue Status is updated to a specified value is as follows:
- Define variables (Text, SObject, and SObject Collection) to be used in Flow definition
- Define Flow comprising of Fast Lookups, Loop, and Email body comprising of data to be sent in email
- Define a Process that will invoke the Flow
Create a Salesforce Flow to send Email to Case Owner
Create a new Flow and add the following variables
- zissueid (text; Input Only)
- case (SObject; Input and Output; Object Type: Case)
- zissuecase (SObject; Input and Output; Object Type: zsfjira__Zissue_Case__c)
- zissuecases (SObject Collection; Private; Object Type: zsfjira__Zissue_Case__c)
- issuekey (Text: Input Only)
- user (SObject; Input and Output; Object Type: User)
Add a Fast Lookup “GetZIssueCases”, set the fields as shown below and set it the Start Element
Add a loop with the fields shown below
Add Fast Lookup “GetCase” and Set the Fields as shown below:
Add Fast Lookup “GetOwner” and set the Fields as shown below:
Add a Send Email block and set the fields as shown below:
Save the Flow and with “autolaunched flow” set and its status set to active
Define a Process to call the Flow when Issue Status is updated to “In progress”
Create a new Process using Process Builder and set a Name
Add Object and set the following fields:
Add a Criteria as shown below
*The Field in the screeshot above corresponds to the “status” field in the ZIssue custom object
Add an Immediate Action to Launch the Flow created earlier with defined Flow Variables
- The Flow selected in the Action is the Flow created in previous steps
- The value for the Field zissueid must be the RecordID of ZIssue
- The value for the Field issuekey must be the IssueKey field of ZIssue
Activate the Process
When a Jira Issue is updated to the Status “In progress”, an email will be sent to the Case Owner, it is also possible to add more information in the email body, like Case Number, or other Issue fields, by just adding them in the Fast Lookups, defined previously, and adding them to the body of the email.