How to create a custom field for approver selection

This article will cover how you can create an approver selection using a custom field which can then be referenced within the approval definition to choose who the approval is sent to.

The first method involves manually inputting an email address using a custom text or regex field. The second method involves selecting from a pre-defined list of approvers using a custom drop-down or multi-select field. Lastly, you can search from all (or a limited selection) of your users within Zendesk using a custom lookup relationship field.

These fields can be either a ticket, user or organization field depending on your requirement. Ticket fields are great if you wish to give your agents and end-users control over who an approval is sent. User and Organization fields are ideal when you have managers/approvers that are different for each requester or organization that allow you to use the one approval definition.

 

This article contains the following sections:

 

Manually type an approvers email

Step 1: Create a text field or regex field.

1. Open your Admin Center.

2. Choose whether this will be a ticket, user or organization field for the approver selection.

   a) Ticket field - Navigate to Object and rules, then Fields.

   b) User field - Navigate to People, then User fields.

   c) Organization field - Navigate to People, then Organization fields.

3. Select Add field and create a Text or Regex field type.

Consider using a regex field to avoid agents/end-users from entering invalid emails.

4. Input a Display name along with any other configuration settings you wish you have.

Note: if you would like end-users to select an approver, you will need to define the permissions so that the customer can edit this field. (ticket field only)

5. (Regex only) Input the field validation.

Note: Zendesk only allows up to 255 characters for regex expressions. You will need to do your own research when deciding what expression is best suited. Below is the most basic regex expression for email validation but it is not recommend to use.

mceclip0.png

6. Select Save and you're done!

 

Step 2: Insert the field as a recipient.

Learn how to use advanced approver placeholders in an approval definition.

When sending an approval that uses a text or regex field as a recipient, a valid email address must be preset when the approval is sent. If multiple approvers are required, you can separate them using a comma.

mceclip1.png

mceclip0.png

 

Select from a predefined list of approvers

Step 1: Create a drop-down field or multi-select field.

1. Open your Admin Center.

2. Choose whether this will be a ticket, user or organization field for the approver selection.

   a) Ticket field - Navigate to Object and rules, then Fields.

   b) User field - Navigate to People, then User fields.

   c) Organization field - Navigate to People, then Organization fields.

3. Select Add field and create a Drop-down or Multi-select field type.

4. Input a Display name along with any other configuration settings you wish you have.

Note: if you would like end-users to select an approver, you will need to define the permissions so that the customer can edit this field. (ticket field only)

5. When you get to the Field values, use the following configuration for the Value and Tag.

   a) Value - Enter the name of each approver.

Note: This is only how your users will identify the approver so it is not critical that it matches the approver's name exactly.

mceclip7.png

   b) Tag - Enter the user id of each approver.

Note: You may append an additional note separated by an underscore to help identify the tag on the ticket. (e.g _approver)

 

IMPORTANT: The tag MUST contain the correct user id or the approval will not get sent. Please refer to how to retrieve a user id if you're unsure where to find this.

 

mceclip0.png

8. Select Save and you're done!

 

Step 2: Insert the field as a recipient.

Learn how to use advanced approver placeholders in an approval definition.

When sending an approval that uses a drop-down or multi-select field as a recipient, an approver must be selected from the list when the approval is sent. A multi-select field can be used to select multiple approvers at once.

mceclip1.png

mceclip2.png

 

How to retrieve a user id:

When creating an approval selection from a drop-down or multi-select field, you will be required to input the user id as the tag. This section will guide you on how to retrieve this information within Zendesk from both an end-user and an agent.

Note: If your approver does not exist as a user within Zendesk, you will need to add them before completing this step.

 

How to retrieve a user id of an end-user/customer:

1. Open Zendesk Support.

2. Navigate to Customers located on the main navbar.

3. Search for the end-user you wish to set up as an approver, and then open their profile.

mceclip8.png

4. The user id can now be found within the URL of the browser tab as seen below.

 

mceclip2.png

 

How to retrieve a user id from an agent:

1. Open your Admin Center.

2. Navigate to People, then Team members.

3. Search for the agent you wish to set up as an approver, and then open their profile.

 

mceclip3.png

4. The user id can now be found within the URL of the browser tab as seen below.

mceclip4.png

 

 

Search users within Zendesk for an approver

Step 1: Create a user lookup field

1. Open your Admin Center.

2. Choose whether this will be a ticket, user or organization field for the approver selection.

   a) Ticket field - Navigate to Object and rules, then Fields.

   b) User field - Navigate to People, then User fields.

   c) Organization field - Navigate to People, then Organization fields.

3. Select Add field and create a Lookup relationship field type.

4. Input a Display name along with any other configuration settings you wish you have.

Note: Only agents can view/edit a lookup relationship field so it's not possible for an end-user to search for an approver.

5. When you get to Select a related object, select User.

mceclip4.png

6. (Optional) If you wish to restrict the search to certain users within Zendesk, you can apply a filter based on role, tags, etc..

mceclip5.png

7. Select Save and you're done!

 

Step 2: Insert the field as a recipient.

Learn how to use advanced approver placeholders in an approval definition.

When sending an approval that uses a lookup relationship field as a recipient, you must search and select the user before an approval is sent.mceclip7.png

mceclip6.png

 

If you encounter any issues, you can contact our support team at support@sweethawk.com for further assistance.


Was this article helpful?
3 out of 3 found this helpful

Comments

0 comments

Please sign in to leave a comment.