Recent searches
No recent searches

Danny Spooner
Joined Apr 15, 2021
·
Last activity Oct 16, 2021
Following
0
Followers
0
Total activity
4
Votes
0
Subscription
1
ACTIVITY OVERVIEW
BADGES
ARTICLES
POSTS
COMMUNITY COMMENTS
ARTICLE COMMENTS
ACTIVITY OVERVIEW
Latest activity by Danny Spooner
Danny Spooner commented,
First thing: where exactly are you trying to input this code? I was under the assumption you were adding it to the trigger that sends out the email. If that is not correct, let me know.
The code is being used in the email template (settings > email > email template), sorry if I didn't make this clear!
Second thing: let’s confirm that the ticket you are testing actually has tags. If it doesn’t have any tags, that may be what is causing your issue as there is nothing to output.
I've set up a dedicate email to act as the uk email with a trigger to assign the uk tag. I've also set up another dedicated email to act the de/germany email with a trigger to assign the de tag.
When I open the ticket I can see that the tag has been applied successfully.
Third thing: let’s back up and confirm that the placeholder {{ticket.tags}} is working correctly for you. For now, remove the code from this post and simply replace it with {{ticket.tags}} if that returns blank then that will be the first thing we need to troubleshoot. That is what the first and second things are trying to establish.
When {{ticket.tags}} is added to the email template it returns nothing, but when inside the triggers it returns either uk or de as expected.
Edit: Forgot to mention when
{% assign tags = ticket.tags | split:" " %}
{% for tag in tags %}
{{tag}}{% if tag == 'uk' %}=true{% else %}=false{% endif %}
{% endfor %}
Was added to the trigger for uk emails, it displays uk=true so it looks like it can pick up the tags from inside the trigger
View comment · Posted Apr 05, 2021 · Danny Spooner
0
Followers
0
Votes
0
Comments
Danny Spooner commented,
Hi @..., thanks for taking the time to help!
I tried this:
{% assign tags = ticket.tags | split:" " %}
{% for tag in tags %}
{{tag}}{% if tag == 'test_send_email' %}=true{% else %}=false{% endif %}
{% endfor %}
in the email template and got a blank email, should this have returned
assignee_has_replied=false
has_attachment=false
not_assigned=false
not_assigned_notification_sent=false
requester_notified=false
test_send_email=true
in the email body?
Am I right in thinking the code for my situation would look something like
{% assign tags = ticket.tags | split:" " %}
{% for tag in tags %}
{{tag}}{% if tag == 'uk' %}= HTML CODE FOR UK{% else %}= HTML CODE FOR DE{% endif %}
{% endfor %}
I was sent the case-statement link by Zendesk Live Chat but couldn't get that to work either, I'm either missing some very obvious or perhaps the email template doesn't support this?
View comment · Posted Apr 05, 2021 · Danny Spooner
0
Followers
0
Votes
0
Comments
Danny Spooner created a post,
Hi all!
I've created a navbar to sit in all the outbound emails we send, as we now have a second support team I would like for them to have their own navbar.
The HTML code is solid and has been tested to ensure it resizes correctly so I have no issues there, where I have been struggling is the use of liquid to change the navbars content based on either a) the support email the request was sent to or the tag assigned to the support request.
From a few articles here this is what should work:
{% if ticket.tags == uk %}
HTML CODE FOR UK NAVBAR
{% else ticket.tags == de %}
HTML CODE FOR DE NAVBAR
{% endif %}
This only sends out the DE navbar to all emails received at any address. I've tried the following
{% if {ticket.tags} == 'uk' %}
and that either produces the same result or sends nothing out at all (the same result to all emails received).
I also tried to see if I could use the support email address but couldn't find any reference for a liquid tag for that (possibly email.received_at ?).
Is there anyone here who has an idea of what is going on here? I know the same result can be achieved in brands (which we don't use) and by placing each specific code into relevant triggers/automations but this would mean a lot of work should we need to change some details later on.
Posted Apr 05, 2021 · Danny Spooner
0
Followers
3
Votes
6
Comments