Automated Child Ticket Creation from Templates
Certain processes require child tickets to be created automatically by trigger. For example, when a New Hire Request is submitted as a ticket in Zendesk, child tickets for various departments can be created automatically from template such as "Setup user account","Allocate hardware", "Building access", and so on. If you aren't familiar with Zendesk Triggers, you can read about them here.
A template is used to create one child ticket where a template set is a bunch of templates that can be called simultaneously to create many tickets. You will create templates and add them to sets if necessary in the Myndbend administration app (left side of Zendesk, circular icon). Each template and set will display an ID that you will use in the trigger (upcoming step).
Steps for Setup
- Following the above example, we'll need to create a template called "Setup user account" and we'll note the ID (eg 12345 without the pound sign/hash).
- Next, we'll locate the trigger (Zendesk settings > Triggers > Inactive tab) called "MPM Create Child Tickets". This trigger is created when you first installed Myndbend Process Manager as "Inactive" because it needs to be customized by you for your process.
- Adapt the conditions for your custom process:
- The default Myndbend trigger will create child tickets from a template when the parent request ticket is created.
- To ensure it does not run multiple times on the same parent ticket when child tickets are created, we have a condition "Channel Not Web Service (API)." The Myndbend app uses the API, hence will not fire when Myndbend app creates child tickets.
- The actions of the trigger is already set to "Notify Target 'MPM Create Child Tickets Target'." This target was created automatically when you first installed Myndbend Process Manager. The message of the trigger should be replaced with your template or template set. The exact syntax is "template-12345" where the ID of the template you obtained in Step 1 is prefixed with "template-". If you choose to use a set (containing multiple templates), you would use "set-10" where 10 is the ID of the template set you created in the Myndbend admininstration app, prefixed with "set-".
Advanced tip 1: You may choose to have this trigger fire when the parent ticket is updated (instead of newly created). If so, you'll change the condition to "Ticket is Updated" however, you'll likely need an additional condition to check for a tag that's added after the first run of the trigger. Otherwise, you'll fire this trigger each time the parent ticket is updated, including comments. In the trigger action, you can "Add tags" with a value of your choosing. In the condition, you'll make sure that tag does not exist.
Advanced tip 2: If you need the Myndbend process to execute on tickets created by the API from another app of yours, you may need to remove the condition "Channel is Not Web Service(API)." If so, you'll need to add an action in the trigger to add a tag of your choosing and a condition to make sure that tag does not exist along with "mpm_child_ticket" tag. The two tags will ensure the trigger will not fire when the trigger has run once before on the parent ticket and will not run on each child ticket created.