Ticket templates for automatic ticket creation

 

For any task, at the point that it's added to a ticket, you can specify a sub-ticket to automatically be created containing predefined details relative to the ticket it's being created from.

An example of where a ticket template might be used is when you have a new hire start at your business. You may have a saved task list containing all of the things that need to be completed. One of those items may need to be a sub-ticket for "Harriette" make sure she looks after "Employee Orientation". In Harriette's ticket you may want to automatically set her as the assignee of the ticket, the requester to the new employee, and copy other details from the parent ticket so she has all the information she needs in the one place. This is where a ticket templates can help.

This article will cover: 

Setting up a ticket template.

Using templates on tasks in saved task lists.

Using templates on existing/ad-hoc tasks.

If you're spinning up pre-defined ticket the old way then we also have a video on how to converting ticket data on task list items to ticket templates.


 

Setting up a ticket template.

To create a ticket template click on the tasks admin icon in the main bar on the left of the screen, click on "Ticket Templates" and then click "Add ticket template" like this:

 

ForestLight_Publishing_-_Agent.png

 

Now, just as if you were creating a normal ticket, fill out the details of what you want your sub-ticket to be.

  • Subject: By default, this field will be set to copy the contents of the parent ticket as is indicated by the light grey text "Same as parent". To alter this, click inside the box and type the desired subject. 
  • Description: This field is required by Zendesk when creating any new ticket. As such if you leave this field blank, at the point the ticket is created the app will place a "." as the first ticket comment, so it is recommended that you add at least a small description as to what the ticket is for.

Note: When typing out the subject and description you're able to use placeholders & liquid markup just like you would in any other ticket, macro, automation or trigger, but the information being pulled in from a template is coming from the parent ticket, not the child that is being created.

So, for example, if you'd like to pull in all comments that have already been made on the parent, you could add in the placeholder "{{ticket.comments_formatted}}" into the description.


ForestLight_Publishing_-_Agent-5.png

 

 

  • System Ticket fields: You're also able to predefine all of the fields on your new ticket. Note that there are some differences with how you go about predefining these. One big difference is that each field contains extra options to copy stuff from the parent. For example, the "Requester" dropdown field also gives you the options "Same as parent" and "Parent assignee". In fact the "same as parent" option is available in many of options like "Status", "Priority" and "Form" as you can see below: 

    Screen_Shot_2019-12-20_at_1_53_09_pm.png

 

  • Custom ticket fields: Once you've selected a ticket form for your new ticket, the custom ticket fields available on that form will then be shown for input. 

    Dropdown & Checkbox fields will give you the option "(same as parent)" as an extra option like this: 

    Screen_Shot_2019-12-16_at_4_08_56_pm.png

    All other fields types (such a Text, Multiline text, Numeric, Decimal etc.) will allow you to enter text, placeholders or liquid markup. If you'd like to copy the contents of the field from the parent there is a blue ticket button on the right to create the required placeholder for you that looks like this: 

    ForestLight_Publishing_-_Agent.png

    However, if you would like to append extra information in addition to the placeholder, or pull in data from another part of the ticket with another placeholder you're able to curate content like this: 

    ForestLight_Publishing_-_Agent.png

    WARNING: Note that the restrictions applied to Zendesk field types will still apply. This means that you can't add text into numeric or decimal fields; Date fields will only accept date formatted data (ie. YYYY-MM-DD); Regex fields will only accept regex formatted data etc. 

    If you set the template to push data into a field that will not accept it, then at the point the sub-ticket is created an error will occur creating a sub-ticket containing the error message instead of containing the intended data. 
  • Special ticket fields (Tags & Multi-select fields): There are two types of fields that you can choose to copy the data from the parent ticket exactly the same as above, however instead of having the field's placeholder automatically added for you, the app will place in some liquid markup like this:
    ForestLight_Publishing_-_Agent.png
    The reason why we place in liquid into the field instead of placeholders (like the other fields) is that an appropriate placeholder does not exist for these two fields. 

  


 

Using templates on tasks in saved task lists.

Once the template is created all you'll need to now is specify which task will automatically create it. To do this go into a save task list and click to edit one of the tasks like this: 

ForestLight_Publishing_-_Agent2.png

Then from the dropdown menu select the template and click 'Update task' like this:

 ForestLight_Publishing_-_Agent.png

Now, when ever that task list is added to the ticket, the task that's been altered will spin up a sub-ticket using the template you specified.

 


Using ticket templates templates on existing/ad-hoc tasks.

You can apply a template to any task that already existing on a ticket. To be able to do this, you'll first need to ensure that the template you'd like to use has "manual" switched on like this: 

ForestLight_Publishing_-_Agent.png

 

Then in the apps pane, on the right of any ticket, click on any existing task and from the dropdown field select "Convert to new ticket":

 

ForestLight_Publishing_-_Agent.png

Then from the popup modal, select the template from which you'd like to spin up the ticket for like this: 

ForestLight_Publishing_-_Agent.png 


 

 

Have more questions? Submit a request

2 Comments

  • 0
    Avatar

    Love this new feature however it seems to be throwing off a JSON parsing error (765: unexpected token) when I use it.  I think the issue might be from the "body" value for an internal note.  It seems to not be escaping the " properly.

    Example:

    < "comment": {
    "public": false,
    "body": "{"id"=>1026120825174, "value"=>"\\u0026gt;assign task", "value_rich"=>"\\u003cdiv class=\\\"zd-comment\\\" dir=\\\"auto\\\"\\u003e\\u0026gt;assign task\\u003cbr\\u003e\\u003c/div\\u003e", "is_public"=>false, "author"=>UserDrop, "created_at"=>"Feb 6, 2020", "created_at_with_time"=>"Feb 6, 2020, 14:24 UTC", "attachments"=>[]}{"id"=>1025857289433, "value"=>"\\u0026gt;Add Manager Approval Required Task", "value_rich"=>"\\u003cdiv class=\\\"zd-comment\\\" dir=\\\"auto\\\"\\u003e\\u0026gt;Add Manager Approval Required Task\\u003cbr\\u003e\\u003cbr\\u003e\\u003c/div\\u003e", "is_public"=>false, "author"=>UserDrop, "created_at"=>"Feb 6, 2020", "created_at_with_time"=>"Feb 6, 2020, 13:47 UTC", "attachments"=>[]}{"id"=>1026079750294, "value"=>"\\u0026gt;adult approval", "value_rich"=>"\\u003cdiv class=\\\"zd-comment\\\" dir=\\\"auto\\\"\\u003e\\u0026gt;adult approval\\u003cbr\\u003e\\u003c/div\\u003e", "is_public"=>false, "author"=>UserDrop, "created_at"=>"Feb 6, 2020", "created_at_with_time"=>"Feb 6, 2020, 13:46 UTC", "attachments"=>[]}{"id"=>1026076616914, "value"=>"Template Section\\n\\nGroup: \\n Line Item Name: \\n Detailed Changes:\\n \\nDocument Location:", "value_rich"=>"\\u003cdiv class=\\\"zd-comment\\\" dir=\\\"auto\\\"\\u003e\\u003cb\\u003eTemplate Section\\u003c/b\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup: \\u003cbr\\u003e\\u003cpre style=\\\"white-space: pre-wrap\\\"\\u003e\\u003cbr\\u003e\\u003c/pre\\u003eLine Item Name: \\u003cbr\\u003e\\u003cpre style=\\\"white-space: pre-wrap\\\"\\u003e\\u003cbr\\u003e\\u003c/pre\\u003e\\u003cb\\u003eDetailed Changes:\\u003c/b\\u003e\\u003cbr\\u003e\\u003cpre style=\\\"white-space: pre-wrap\\\"\\u003e\\u003cbr\\u003e\\u003c/pre\\u003e\\u003cbr\\u003e\\u003cb\\u003eDocument Location:\\u003c/b\\u003e\\u003cbr\\u003e\\u003cpre style=\\\"white-space: pre-wrap\\\"\\u003e\\u003cbr\\u003e\\u003c/pre\\u003e\\u003c/div\\u003e", "is_public"=>false, "author"=>UserDrop, "created_at"=>"Feb 6, 2020", "created_at_with_time"=>"Feb 6, 2020, 13:42 UTC", "attachments"=>[]} Subticket automatically created by tasks app."
    },>
  • 0
    Avatar

    Hi Greg, thanks for posting. Based on the code you've sent through it looks like you may have been editing the template in advanced mode? We did have an issue with escaping quotes for a short time there so it is likely what you were experiencing has since been resolved. None-the-less, if you're still having issues, could you please submit a ticket to support@sweethawk.co so we can help you more specifically on this one.  

Please sign in to leave a comment.
Powered by Zendesk