When it’s integrated into Zendesk, Myndbend™ Process Manager can support complex child ticket workflows. This can be accomplished with a trigger that automatically creates a child ticket when certain conditions are met from the ticket. For example, in the New Hire request - if the hiring manager selected that new employee needs a laptop - we should create a child ticket for the IT department to prepare one.
There are two ways to do this:
- Multiple Zendesk Triggers
- Use Liquid Script
Pros and cons
Multiple triggers
Pros: It’s simple to create. Using the built-in Zendesk conditions allows you great flexibility, and it is quite simple to build a trigger with a new set of conditions - So, you would just build a trigger that has the conditions matching.
Cons: If your company has a lot of different options and combinations, you might end up with a long list of triggers.
Liquid script
Props: All of the conditions are built in a single trigger, so you have fewer places that you need to update during maintenance.
Cons: It is more complicated to set up, and since all of your child tickets are coming from a single trigger, in case that someone miss configures a trigger during the update, your whole flow could break.
Multiple triggers setup
For each combination of form data that you have, you need to define the conditions of your Zendesk trigger as such. This means that you will have one trigger for each of your possible combinations.
In the action, you will list out templates you want to create, using the create-child-tickets action of MPM Webhook.
Liquid script
Liquid Script is a simple scripting language developed by Shopify, used through Zendesk. You can use the liquid script in your tickets, macros, automations as well as trigger messages!
If you haven't already, now is the right time to go through our article about creating child tickets automatically since this article is basically an extension of that setup.
Zendesk has a list of placeholders that you can use within the liquid script. Since liquid script provides us with easy-to-use if-then-else statements, we will combine those with Zendesk's placeholders to determine what child tickets should be created. We'll do so by checking IF the value of certain form fields is equal to our desired value. If it is, we will send that template ID.
Based on the type of field used, the code will look different.
If you are using text fields, the code for that will look something like this:
{
"action": "create-child-tickets",
"data": [{
"templates": "
{%- if ticket.ticket_field_option_title_<FIELD_ID> == '<DESIRED_VALUE>' -%}
<TEMPLATE_ID>,
{%- endif -%}
{%- if ticket.ticket_field_option_title_<FIELD_ID> == '<DESIRED_VALUE>' %}
<TEMPLATE_ID>,
{%- endif -%}
"
}]
}
If you are using different fields or options, liquid might look different. If you decide to use the Liquid Script, be sure to read our quick Liquid guide, which covers some of the most common questions.