If you are creating child tickets with the type incident and want to have the parent ticket also be the problem ticket, you can use the following trigger/webhook to update the Problem ID with the Parent ticket ID. This will allow you to take advantage of Zendesk's built-in features to comment and solve all children tickets with one bulk action. Learn more about Zendesk's Problem/Incident functionality here.
Webhook
The webhook will call the Zendesk API that updates the ticket. This webhook will be called by a trigger, which will be explained in the next section below.
To create the webhook go to Admin Center / Apps and integrations / Webhooks. Under Actions, click on Create webhook. Fill out the following fields:
- Name: Set any name that can make it easy to identify this webhook
- Description (Optional): Optional description that will make it easy for other agents to know why this webhook was created
- Endpoint URL: https://{subdomain}.zendesk.com/api/v2/tickets/{{ticket.id}}.json (make sure to replace {subdomain} with your subdomain)
- Request method: PUT
- Request format: JSON
- Authentication: Basic authentication
- Username: Use the email of one of the admin's accounts, followed by "/token" - For example admin@myndbend.com/token
- Password: API token (Click here to learn how to generate it)
- Click Create
Webhook is set! Let’s see how to create the trigger we need.
Trigger
Go to Admin Center / Objects and rules / Triggers click on Add trigger and fill the form with the following information:
Conditions:
- Ticket is - Updated
- Type is - Incident
- Tags contains - at least one of the following - mpm_child_ticket
- Tags does not contain - "incident_linked" (this will ensure the trigger will not keep firing unexpectedly)
Actions:
- Add Tags: incident_linked
- Notify Active Webhook (select webhook from above)
JSON Body:
{
"ticket": {
"problem_id": "{{ticket.external_id|remove:'child_of_'}}"
}
}