zAgileConnect Flow Action - Delete Issue
Please note that zAgileConnect license is required for a user to invoke this Action. Additionally the user must have the “zAgileConnect Subscription User“ permission set and access to the “ZCProcessIssueDelete” apex class.
You can delete an Issue by using Salesforce Flow and adding the “Delete Issue“ action to your flow. The action has the following fields:
Delete Issue Action Fields
Field | Type | Required | Description |
---|---|---|---|
connectionId | String | If multilple Jira instances are connected (for zAgileConnect Release 1.15.x and higher), specify the connection id (j00, j01, etc). Leave empty to use the default Jira connection. | |
entityId | String | The Salesforce record Id linked to the Jira Issue to be deleted. This record must be the parent of the Jira Issue, meaning the Issue was created from that Salesforce record. | |
issueKey | String | The Key of the Jira Issue to delete. |
Error Handling
This invocable action executes callouts to Jira API and so is executed in an asynchronous transaction. For this reason this action does not return any result. Errors during Issue delete are sent via email to the Salesforce user for whom the Flow is being executed.
Example Flow to Delete all Issues Created from Salesforce when Case is Closed
The following example will delete all the Issues related to a Case (only if those Issues were created from that Case) every time the Case Status changes “Closed”.
In Salesforce → Flows create a new Flow from scratch
![](../../../__attachments/102925160/CleanShot%202024-12-17%20at%2013.12.17@2x-20241217-181228.png?inst-v=6da133f4-4e36-46d2-934e-8ac8cb7677c0)
Select “Record-Triggered Flow“ and create, then select the Case Object and the conditions as follows:
![](../../../__attachments/102925160/CleanShot%202024-12-17%20at%2016.25.36@2x-20241217-212617.png?inst-v=6da133f4-4e36-46d2-934e-8ac8cb7677c0)
Add a Get Records element to retrieve relationships from the junction object ZIssue_SF, and set the conditions as follows (the condition IssueCreated == True is to only retrieve Issues created from the Case):
![](../../../__attachments/102925160/CleanShot%202024-12-17%20at%2013.19.53@2x-20241217-182102.png?inst-v=6da133f4-4e36-46d2-934e-8ac8cb7677c0)
Add a Loop element to iterate over each relationship (the result of the previous Get Records element)
![](../../../__attachments/102925160/CleanShot%202024-12-17%20at%2013.27.00@2x-20241217-182729.png?inst-v=6da133f4-4e36-46d2-934e-8ac8cb7677c0)
Add the “Delete Issue“ zAgileConnect Action
![](../../../__attachments/102925160/CleanShot%202024-12-17%20at%2013.28.40@2x-20241217-182850.png?inst-v=6da133f4-4e36-46d2-934e-8ac8cb7677c0)
Map the Case Id and the Issue key ({!For_each_created_Issue.zsfjira__ZIssue__r.Name}) to the Action fields
![](../../../__attachments/102925160/CleanShot%202024-12-17%20at%2013.35.19@2x-20241217-183556.png?inst-v=6da133f4-4e36-46d2-934e-8ac8cb7677c0)
Finally Save and Activate the flow. Then go to a Case with Issues created from that Case and update the status to “Closed“, all Issues created from that Case must be automatically deleted in Jira.