The Myndbend™ Process Manager action search-and-add-approvers is used to automatically search for and add the approver, based on a trigger and message conditions. This is useful in cases where the manager might be defined as an external ID on a user's profile (as some of the external systems set), so you need to find the user with the corresponding external ID, and use his Zendesk ID to add him in.
How do I use this action?
Create a Zendesk trigger with conditions that match the moment when you want to find and add the approvers.
Then set the action in MPM. For the action, select Notify Webhook - MPM Webhook. You will be presented the option to paste in the message that will be sent to our servers.
The message for this action is:
{
"action": "search-and-add-approvers",
"data": ...
}
What data is expected in the message?
This webhook action is powerfully versatile and advanced, since it allows you to define search parameters to find the right approvers:
{
"action": "search-and-add-approvers",
"data": {
"user": { external_id | id | email: string },
"user_field": string,
"search_field": string
}
}
Let's go into detail about each of the options...
The message has 3 parts:
- user - Who is the user from whom should we take the value of user_feild (manager_id). We can find the user by one of 3 fields:
- external_id - Example: "user": { "external_id": "VALUE"}
- id - Example: "user": { "id": "VALUE"}
- email - Example: "user": { "email": "VALUE"}
This will find a user whose email | id | external_id is equal to the value provided
- user_field - After the user has been found, we will read the value of the user field specified here
- search_field - We will search for a user whose specified search_field value is equal to the value of user_field
For example:
{
"action": "search-and-add-approvers",
"data": {
"user": {"external_id": "{{ticket.requester.custom_fields.employee_id}}"},
"user_field": "manager_id",
"search_field": "external_id"
}
}
In this example, we find a user whose external ID matches our value "external_id" is equal to requester's custom field "employee_id". After we find the specified user, we will take the value of "manager_id" field, and find a user with that external id. That user will be added in as an approver.
That is it! Using one of these methods, you can easily automate adding managers / supervisors as approvers to your tickets.