In a separate part of our documentation, we outlined how users could set up a required approval process and showed how to enable and disable Checkout functionality depending on the approval state.
We’ve since introduced new searching capabilities that allow users to use JQL to query information about the order being placed. Using this JQL in conjunction with Jira Service Desk automations unlocks the ability to require approvals only if the order matches specific criteria.
In this example, we will be requiring an approval for any order over $500, unless the user is a member of a specific group authorized to make higher-priced purchases.
Instructions
To make any workflow changes necessary, users will need Jira administration permissions.
To set up the Checkout automation rules, the user will need project administrator permissions.
Configuring the workflow
First, you will need to set up the workflow which will be used for the Checkout issue type. If the Checkout project was created with the IT Service Desk template, an approval workflow should already exist, but it may not be in use for the Checkout issue type. It will be named in the form of project-key: Service Request Fulfillment with Approvals workflow for Jira Service Desk.
To use it on the Checkout issue type, modify the project workflow scheme and assign the chosen workflow to the Checkout issue type.
Once the workflow has been assigned to the Checkout project, edit the workflow and click on the Waiting for Approval status, and select Add approval.
You’ll need to select the custom field which will be used to set the approvers. Please be aware if you use the Approvers field, Checkout will automatically add the department head for the order as an approver when the ticket is created. If you do not want that behavior, you will need to create a custom approvers field.
Once the workflow has been configured how you like it, we can move onto the next portion.
Setting up the group
Next, we will set up the group of users that do not require an approval to spend more than $500.
Navigate to Settings > User Management > Groups > Create Group and enter the value purchase-approvers. In here, add the authorized users.
Configuring the Automations
To set up the Optional approval process requires a couple of automations. To create an automation, navigate to Project Settings > Automation > Legacy Automation and click on Add Rule.
We will configure a rule to automatically approve tickets where the total cost is less than $500 OR where the reporter is a member of the group we created previously. If either condition is true, the ticket will automatically be approved. If both are false, we tell the system to Disable the submit order button, preventing agents from sending the PO to vendors. Below are the configurations used.
We’ll create two more automations, one to re-enable the submit order button when approved, and another to update the status of the order if the approval is declined.
For this automation to work properly, a post function must be set on the Decline transition to set the resolution to Declined.