In Myndbend™️ Process Manager, certain processes require child tickets to be created automatically by a 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 templates such as "Set up user account", "Allocate hardware", "Building access" and so on.
Learn more about using Zendesk Triggers.
Using Templates and Template Sets
MPM uses templates to simplify and automate the creation of child tickets. A template is used to create one child ticket, whereas a template set is a bunch of templates that can be called simultaneously to create many tickets. You can create templates (and add them to sets if necessary) in the Myndbend™️ Process Manager Administration app (look in Zendesk's left menu for the Myndbend™️ 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 "Set up user account" and we'll note the ID (eg 12345 without the pound sign/hash).
- Next, create a Zendesk Trigger
- Set the conditions for your custom process (for example, when a ticket is created with a New Hire form)
- Important: To ensure it does not run multiple times on the same parent ticket when child tickets are created, we have the condition Channel Not Web Service(API). The Myndbend™️ app uses the API, hence will not fire when MPM creates child tickets
- The action of the target should be Notify Active Webhook > MPM Webhook. The action that is used for creating child tickets is create-child-tickets.
JSON Body you can use for creating child tickets from templates:
{
"action": "create-child-tickets",
"data": [{
"templates": "12345,12346"
}]
}
JSON Body you can use for creating child tickets from sets:
{
"action": "create-child-tickets",
"data": [{
"sets": "1,2"
}]
}
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 set 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. Using the condition, you can make sure that the tag does not exist.
Advanced Tip 2
If you need the MPM 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 (that will 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.