The Update other tickets action lets an app event on one ticket change other tickets. While it can be used to update any set of tickets, it's primarily for passing information between tickets linked by the Tasks and Subtickets app: an event on a parent ticket can update its sub-tickets, and an event on a sub-ticket can update its parent. You don't need webhooks, API tokens or Zendesk triggers.
For example, when an approval is granted on a parent ticket in Approve, every sub-ticket created from it can be set to Open or when a sub-ticket's task is completed, its parent ticket can get an internal note.
Before you start
- The SweetHawk Suite app must be installed and active. Without it, the SweetHawk options in the action picker are locked.
- You need an app that runs actions on its events: Approve, Tasks and Subtickets, Calendar, Timers, Reminders, Survey or Journeys.
- For parent and sub-ticket updates, the Tasks and Subtickets app must be installed.
Set it up
1. Add the action to an event
- In the app where the event happens, open the definition or settings. For example, an approval definition in Approve, or a task or task list in Tasks.
- Go to the event you want, for example Approval granted or Task completed.
- Click Add action... and choose Update other tickets under SweetHawk.
2. Choose the tickets to update
In Ticket IDs to update, use a placeholder that gives the IDs of the related tickets. Placeholders use values from the ticket the event fired on (the source ticket).
| To update | Use |
| The parent ticket, from a sub-ticket |
{{ticket.parent.id}}, or the Parent ticket ID field that Tasks sets on every sub-ticket: {{ticket.ticket_field_<id>}}
|
| All sub-tickets, from a parent ticket | {{ ticket.subtickets | map: "id" | join: "," }} |
| The sub-ticket of one task (task events) | {{task.subticket_id}} |
| All sub-tickets of a task list (task list events) | {{task_list.subticket_ids}} |
| Tickets whose IDs you keep in a ticket field | {{ticket.ticket_field_<id>}} |
To find a field's ID for ticket_field_<id>, go to Admin Center > Objects and rules > Tickets > Fields. The ID is shown next to each field. To keep your own list of related ticket IDs in a field, fill it with a Tasks ticket update, as shown in How to record tasks data on a Zendesk ticket. For example, a text field filled with {{ ticket.subtickets | map: "id" | join: "," }} on Task status changed.
- The placeholder must give ticket IDs separated by commas. Anything that isn't a ticket ID is ignored, duplicates are removed, and the source ticket itself is skipped.
- Up to 10 tickets are updated per event. Any more are skipped and noted in the app's Audit log.
-
ticket.parentandticket.subticketsneed the Tasks and Subtickets app. Without it, the editor shows a warning and the action is skipped.
3. Build the update
In Changes, set what should change. This is the same form as a normal ticket update, and every ticket from step 2 gets the same changes. For example:
- Set Priority to High, and every listed ticket becomes high priority.
- Set Status to Open to move waiting sub-tickets on once the parent is approved.
- Set Group or Assignee to hand every listed ticket to the same team.
- Add a tag, such as
parent_approved, to use in your views and triggers. - Add an internal comment, such as "The parent ticket has been approved."
- Add a public comment. This emails the requester of each listed ticket.
Placeholders in Changes also use values from the source ticket, so {{ticket.id}} is the source ticket's ID on every ticket you update.
4. Save
Save the definition or settings as usual.
What happens on the updated tickets
- A note says where the update came from: "Updated by SweetHawk from ticket #<source ID> (<app>: <event>)." If your update adds a comment, the note goes at the end of it. If it doesn't, the note is added as an internal note.
- Comment author. If you choose a comment author in Changes, that author is used. Otherwise comments come from an end user called "SweetHawk".
Closed, deleted and failed tickets
- A closed or deleted ticket can't be updated. SweetHawk skips it and carries on with the others.
- Skipped and failed tickets are recorded in the Audit log of the app that fired the event, as an Action dispatched entry on the source ticket. Filter the audit log by the source ticket's ID to find them.
- A failed update also raises the app's usual "could not be updated" notification.
Loops
An update made by this action won't start another Update other tickets. If updating a ticket fires an app event that also has this action, the second one is skipped and recorded in the audit log, so one event can't spread through ticket after ticket.
This only applies inside SweetHawk. If one of your Zendesk triggers reacts to the update and starts another app event, that counts as a new event. Use the note text in your trigger conditions to avoid this.
Examples
An approval on a parent ticket opens its sub-tickets
A new starter request has a sub-ticket for each team, created by Tasks. Nothing should start until the manager approves.
- Event: Approve, Approval granted on the parent ticket's approval definition.
-
Ticket IDs to update:
{{ ticket.subtickets | map: "id" | join: "," }} -
Changes: set status to Open, set priority to High, and add the tag
parent_approved.
A completed sub-ticket task updates its parent
The facilities team finishes their part of the request. The parent ticket should show it.
- Event: Tasks, Task completed, fired on the sub-ticket.
-
Ticket IDs to update:
{{ticket.parent.id}} -
Changes: add the tag
facilities_doneand an internal comment "Facilities has finished their part."
Related
- Placeholders and where they can be used in SweetHawk Apps
- Update the parent ticket when a sub-ticket changes (advanced), using Zendesk Action Builder