To create a target click on the admin cog on the left of the screen and right down the bottom go into extensions. Then click on "Add target" at the top right-hand side.

Next, choose HTTP target

Then give the target a name eg. "Update many"

For the URL enter:

https://yourhelpdesk.zendesk.com/api/v2/tickets/update_many.json

Make sure you replace yourhelpdesk with your Zendesk URL ;-)

Set the method to "PUT, content type to "JSON", and lastly check to enable basic authentication and enter your Zendesk user credentials.

The target should now look something like this:

Finally, click submit to CREATE the target.

Step 2: Get the ID for the parent ticket field.

In order to change the parent ticket, we'll need to reference the ID of it in the trigger. So, you'll need to search for it. You can do this by going to this URL:

https://yourhelpdesk.zendesk.com/api/v2/ticket_fields.json

(Replace yourhelpdesk with the name of your help desk)'

Then do a search (ctrl + f) for the "Parent Ticket ID" ticket field and make a note the ID like this:

You may see the information above displayed a little differently, but all you need is the ID so once you find it, make a note and head back to the agent interface.

Step 3: Creating the trigger

Ok you're almost there. To create a trigger simply click on Triggers in your admin, and at the top right click on 'add trigger' like this:

Then name your trigger something like "Update parent task"

Next under "Meet all of the following conditions" set the rules when you want the trigger to fire. For example, you may want it to only fire on tickets with an actual parent ticket, so you could add the rule:

"Parent Ticket ID" - "Present"

You may only want to update the parent ticket when the sub-ticket is updated by the agent so you would add the rule:

"Current user" - "Is" - "Agent"

Finally based on the example we used at the start if you're wanting to update the parent ticket with a comment made on the sub-ticket, you'll probably want to check that one has actually been made with this rule:

"Comment" - "Is" - "Present (public or private)"

So your trigger rules might look something like this:

Finally under "ACTIONS" is where you set the rule to notify the target you created in step 1.

You will need to add the rule:

"Notify target" - "Update many"

Then the JSON body section is where you define what you want to happen.

Since we'll be wanting to update the parent ticket we need to specify it by referencing the ticket field ID we collected in step 2.

Your code might look something like this:

{ "tickets": [ { "id": "{{ticket.ticket_field_81189308}}" } ]}

Where 81189308 should be replaced with your ticket field ID.

Once you've added in that code, you can start adding other rules to do stuff to the parent ticket. For example, if you wanted to change the status to open it would look like this: