This article focuses on the specific use case where you want the conversation of the parent ticket added into the initial description of a sub-ticket.
This can be really useful if you have members of your team that aren't agents in Zendesk, but you still need to discuss conversations with customers internally with them.
Of course, there's nothing stopping you from just manually creating a sub-ticket and copying in the stuff you want to talk about, but this will get you there a lot faster.
If you are unfamiliar with setting up a ticket template to create a sub-tickets, we have an article you can read here to learn the basics.
To set this up there are 3 steps:
2. Insert placeholder into the comment field.
Step 1: Create a ticket template.
To do this first click the tasks icon, then under ticket templates click Add ticket template like this:
Step 2: Insert placeholder into the comment field.
Once you're done setting up your template, simply insert one of the following placeholders into the comment area.
{{ticket.latest_comment_rich}}
or {{ticket.latest_public_comment_rich}}
If you want more than just the latest comment or simply wish to customize it further, you can input the following code as a starting point and make adjustments as needed.
|
Red: Input the source of your comments/attachements. (e.g ticket.comments, ticket.public_comments, ticket.private_comments, ticket.latest_public_comment)
Purple: Label whether a comment is public or private where the latter is highlighted in yellow.
Green: Input the comment text.
Orange: Copy attachments and input as a URL.
Here are three examples on how to send the ticket description.
{% for comment in ticket.comments %}{% if forloop.last%}{{comment.value_rich}}{% else %}{% endif %}{% endfor %}
{% for comment in ticket.comments %}{% if forloop.last%}<hr><b>{{comment.author.name}}</b> - {{comment.created_at_with_time}}<br><br>{{comment.value_rich}}{% else %}{% endif %}{% endfor %}
{% for comment in ticket.comments %}{% if forloop.last%}<hr><b>{{comment.author.name}}</b> - {{comment.created_at_with_time}}<br><br>{{comment.value_rich}}<br>{% for attachment in comment.attachments %}Attachments: <a href='{{attachment.url}}'>{{attachment.filename}}</a><br>{% endfor %}{% else %}{% endif %}{% endfor %}
Step 3: Test it out.
Now all that's left is to create a sub-ticket with your ticket template. The results of the above examples can be seen below:
Zendesk Placeholder:
Custom Placeholder:
Ticket Description:
Finally, if you only need want to send the ticket attachments on public comments copy and paste this code:
{% for comment in ticket.public_comments%}{% for attachment in comment.attachments %}<a href='{{attachment.url}}'>{{attachment.filename}}</a></br>{% endfor %}{% endfor %}
Hopefully, this gives you an idea of what you can do with ticket templates. If you have any questions about anything not mentioned here, please don't hesitate to contact us at support@sweethawk.co.
Comments
0 comments