In workflows that involve a sequence of approvers, it’s crucial to efficiently handle denials by re-engaging the previous approver to restart the process from that point. This guide will walk you through the steps to implement this feature, ensuring a smooth and effective approval workflow. Let’s get started!
Workflow:
Prerequisites
- An approval sequence that relies on the Approver id or email being captured in a ticket or user profile field
- This is a continuation of the related article: How to sequence Approvers using a Custom Field
Step 1: Create New Triggers to Remove Denied Approver (Manager) and Resend Previous Approver (Teamlead)
Trigger Conditions:
- Ticket is updated
- Tags contain at least one of the following approval_denied
- Tags contain at least one of the following manager_in_progress
- Tags contain at least one of the following teamlead_complete
- Tags contain none of the following mpm_child_ticket change_approved approval_pending manager_complete manager_processing director_processing director_complete
Trigger Actions:
- Add tags teamlead_processing
- Remove tags manager_in_progress teamlead_complete
- Notify by Active Webhook > MPM Webhook > In the JSON body
{
"action": "resend-approval-request",
"data": {
"conditions": {
"all": [
[
"email",
"any",
[ {{ticket.requester.custom_fields.teamlead_field_key_name}}
]
],
[
"approvalStatus",
"any",
[
"approved"
]
]
]}
}
}
- Notify by Active Webhook > MPM Webhook > In the JSON body
{
"action": "remove-approvers-by-status",
"data": {
"status": ["denied"]
}
}
Step 2: Create a Processing Trigger for the First Approver (Teamlead)
Previously we did not need a processing trigger for the first approver as they were part of the first step. Since we are readding them, we will need to add a processing trigger to prevent other triggers from firing early.
Trigger Conditions:
- Ticket is updated
- Tags contain none of the following mpm_child_ticket manager_complete manager_in_progress teamlead_in_progress
- Tags contain at least one of the following approval_pending
- Tags contain at least one of the following teamlead_processing
Trigger Actions:
- Add tags teamlead_in_progress
- Remove tags teamlead_processing
Step 3: Repeat for additional sequenced approvers
If your sequence includes three approvers like the example, you will need to replicate step 1 for the additional approvers such as the Director.
Trigger Conditions:
- Ticket is updated
- Tags contain at least one of the following approval_denied
- Tags contain at least one of the following director_in_progress
- Tags contain at least one of the following manager_complete
- Tags contain none of the following mpm_child_ticket change_approved approval_pending manager_processing teamlead_processing director_processing director_complete approved
Trigger Actions:
- Add tags manager_processing
- Remove tags director_in_progress manager_complete
- Notify by Active Webhook > MPM Webhook > In the JSON body
{
"action": "resend-approval-request",
"data": {
"conditions": {
"all": [
[
"email",
"any",
[ {{ticket.requester.custom_fields.manager_field_key_name}}
]
],
[
"approvalStatus",
"any",
[
"approved"
]
]
]}
}
}
- Notify by Active Webhook > MPM Webhook > In the JSON body
{
"action": "remove-approvers-by-status",
"data": {
"status": ["denied"]
}
}
Creating these triggers will allow your process to restart from the previous approval point.