This article explains how to use Zendesk Action Builder to automatically perform actions in a parent ticket when activity occurs in one of its sub-tickets.
For example, you can automatically copy an agent's public comment from a sub-ticket to its parent ticket as a private note. The same approach can also be used to update ticket fields, add tags, complete tasks, start approvals, and perform other actions in the parent ticket.
Note: Zendesk have deprecated API tokens so webhooks are no longer recommended. This article will use Action Flows to achieve the same result. We recommend updating your workflow to this method if you are still using webhooks.
Creating the Action Flow
If you're new to Action Builder and Action Flows, Zendesk provides an excellent introduction to creating workflows. Understanding the action builder and action flows
In this example, we'll create an Action Builder workflow that adds an agent's public comment from a sub-ticket to its parent ticket as a private comment.
Comment added trigger
- Create a new action flow.
- Add a trigger card.
- Under Zendesk, select Tickets.
- Select Comments.
- Select Ticket comment added.
- Click Add condition.
- Configure the condition as follows:
-
Variable:
Tags -
Operator:
Contains at least 1 of -
Value: Enter a tag that identifies your subtickets, for example
hr_subticket.
-
Variable:
This condition ensures the workflow only runs for the subtickets you want to include.
Note: Make sure the relevant sub-ticket templates apply this tag when the sub-ticket is created. If your sub-tickets already use a suitable identifying tag, you can use that instead.
Look up subticket
Click the + beneath the trigger card to add the second step.
- Under Zendesk actions, select Look up ticket.
- In the new card, under Ticket ID, select Ticket ID from the trigger card.
This lookup makes the sub-ticket's ticket fields available to later steps in the Action Flow, including the Parent ticket ID field populated by the SweetHawk Tasks & Subtickets app.
Update the parent ticket
Click the + beneath the trigger card to add the third step.
- Under Zendesk actions, select Update ticket.
- In this card, under Ticket ID, select Parent ticket id from the Look up ticket card in step 2. (Do not use the ticket ID from the trigger card.)
- Under Additional fields, select Comment.
- In Comment, click Add variable, then select the trigger step and then Comment. Here comment placeholders are available such as comment author information and comment text values which you can copy to the parent ticket. Use the available variables to build the message that will be added to the parent ticket.
- Under Additional fields, select Comment is public, and set this drop down to False so the comment is added as an internal note.
Save the Action Builder workflow, test it on a sample sub-ticket, then activate it. When a tagged sub-ticket receives a new public comment, the workflow will add it to the parent ticket as an internal note.
Extend the workflow with SweetHawk actions
Updating the parent ticket with a comment is just one example of what can be achieved. In addition to, or instead of, adding a Zendesk Update ticket action, you can also add a SweetHawk action to perform automation directly on the parent ticket.
The configuration is the same as the steps above. Add a new card at the end of the workflow, or replace the Update ticket action with a SweetHawk action. When configuring the action, use the Parent ticket ID from the Look up ticket step as the Zendesk ticket ID. This ensures the action is performed on the parent ticket rather than the subticket that triggered the workflow.
For example, you could:
- Start, pause, resume or stop a timer on the parent ticket.
- Complete a task or complete a task list phase.
- Start an approval request.
- Place the parent ticket on a Kanban board.
...and much more!
By combining Zendesk Action Builder with SweetHawk actions, a single update on a sub-ticket can trigger powerful automation across the parent ticket, allowing your workflows to extend well beyond standard Zendesk ticket updates.