How set approvals to be sent to managers

This article explains how to set managers to be approvers using our Approve app so that depending on who is requesting the approval, it will be sent dynamically to the right person. 

If you're not already familiar with the Approve app, please take the time to watch an in-depth walk-through of the app.

If the manager is always the same for a particular approval flow, they can be statically assigned directly within the approval definition, but what if the manager is different depending on who is requesting the approval? Here is an example of how to address this: 

Step 1: Create a custom user field where the manager approver will be defined. 

Step 2: Set the approval definition to send the approval to the contents of that field. 

Step 3: Test it out

 

Step 1: Create a custom user field.

To create a custom user field in Zendesk, in the Zendesk Admin Centre, under User Fields, at the top right, click on Add field. Next, choose Text, name it "Manager", set the Field key to "manager" and click Save.

 

Step 2: Set the approval definition to send the approval to the person set in your new manager field. 

Click into the Approve app in the main left bar in Zendesk. Then under Approval definitions at the top right click on Add approval definition

Now in the Recipients section, click the </> icon on the right of the field. 

Then click on the + icon and type "ticket.requester.manager" and select the corresponding option that appears in the menu like this:

Screenshot_13_8_2024__11_48 am.jpg

Complete the rest of the settings for the approval definition and click Create approval definition at the bottom.

 

Note: The "manager" part of the placeholder above is referring to the field key defined in step one. If you set a different field key, you will need to adjust your placeholder accordingly.

 

Step 3: Time to test. 

Go to a user profile in Zendesk and update the manager field with the email address of a manager. 

Now create a test ticket, setting the requester of the ticket to the user who now has the manager, and manually apply your new approval to the ticket. You should see that the approver is automatically set like this: 

Ticket__test_–_SweetHawk__–_Zendesk.jpg


 

Further considerations:

Above is just one way of setting an approval to be sent to a manager, but there are other ways. Determining how to do this depends on who is requesting the approval, how the request is created, and what relationship the manager has to the requester. Each of these elements can determine which type of field you configure. 

For example if the manager is not based on the user, but rather the organisation that the user sits in, then, rather than creating a user field for the manager, you would create a custom Zendesk organization field.

Alternatively, if you don't want just any email address to be entered, then you might consider using a Zendesk lookup field where you can limit who is able to be selected.

Or if the approval needs to go to a manager's manager, or somewhere not directly related to the user but indirectly related, you can "stack" your placeholder in the recipients section accordingly. EG. If it needs to be sent to the manager's manager, then you might use the placeholder {{ticket.requester.manager.manager}} . If it needs to be sent to the managers, finance manager, then your placeholder might look like this {{ticket.requester.manager.finance_manager}}. For more information on liquid placeholders used in approval definitions see here

If you have any questions or require advice on which use case best suits you're workflow, you can contact our support team at support@sweethawk.com and we would be happy to help. Please include as much information as possible based on the above Who, How and Managers to ensure we can provide the best recommendation.


Was this article helpful?
1 out of 2 found this helpful