Skip to main content
Skip table of contents

Using Salesforce Flows to update Case Status based on Jira Issue transitions


This document provides a simple example of how a Salesforce Flow may be used to update a Case Status based on updates to the Issue Status received from Jira.  In the example, Case Status is 'Closed' when an Issue is transitioned to 'Done'. 


When an Issue Status is changed in Jira as a result of a workflow transition, the updated Status is sent to Salesforce to the ZIssue_c custom object provided with the zAgileConnect package.  (Note: This assumes that the Issue Status field is shared with Salesforce).  This Status update to ZIssue_c object can be used in a Flow to update the Case Status as needed.

In the Flow example below, all Cases related to a Jira Issue are transitioned to 'Close' Status when the Jira Issue status is transitioned to "Done".


To begin, we create a Flow that is executed on ZIssue__c update, retrieves all Cases related to that Issue, and performs an update on each of those Cases.

  1. Create a new Record-Triggered Flow for after ZIssue update event

  2. Add a Decision element to filter when Issue status is changed to Done
  3. Add a Get Records element to retrieve relationships from the junction object ZIssue_Case
  4. Add a Loop element to iterate over each relationship (the result of the previous Get Records element)
  5. Create a new Resource of type Variable to store a single Case record
  6. Add an Assignment element to set Case Id from the current Loop item and Status to Closed
  7. Create a new Resource of type Variable to store a collection of Case records
  8. Add an Assignment element to add the Case records to a collection
  9. Add an Update Records element to perform the Case status update
  10. Connect all the items

Please note that in scenarios where multiple Issues are associated with a Case, the first Issue transitioned to 'Done' will Close the Case independent of the Status of the remaining related Issues, since the example does not check for the Status of remaining Issues.  

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.