Recent searches


No recent searches

Agent Signature based on ticket channel

Answered


Posted Oct 10, 2018

Hi Community,
 
I’m trying to set an agent signature based on the channel that the ticket came from.
 
I know that there’s no way to check for channels with Liquid Markup, but I was hoping there would be a way to look if certain ticket fields are filled in. I would set these ticket fields via triggers beforehand.
 
This is the code I tried to use without any luck:
 
{% case ticket.ticket_field_option_title_ 360009740214 %}
{% when 'dmeme' %}
{{agent.signature}}
{% when 'dcoco' %}
{% else %}
{% endcase %}
 
I also tried looking for tags but had no luck with that either.
 
Is it that the Liquid Markup cannot look for ticket data in the agent signature?
 
Looking forward to hearing from you,
Dominic

0

33

33 comments

Hey Dominic,

check out the free app I've built some time ago

https://www.zendesk.com/apps/support/zignatures/

Designed to address this particular use case.

0


Hi Andrey,

Many thanks for the quick response!

Just to confirm, there's no way we can automate directly from the agent signature?

Reason for asking is because the app seem to need to be manually activated/deactivated and not based on ticket channels how we ideally need it.

Looking forward to hearing from you,
Dominic

 

 

 

0


Agent signature ignores ticket object as it's contexted to the current Agent only. So you can' access ticket fields and other attributes from the signature.

BUT, in Zignagtures you can create liquid like

IF this is right channel inject signature {{SIGNATURE}} ELSE inject empty string. 

So the app will still run, but there will be no signature text.

Basically, it's Liquid exercise at the end of the day....

0


Hi Andrey,

I'm using the following code in the app configuration:

{% if ticket.via == 'mail' %}
{{dc.agent_signature}}
{% else %}
{% endif %}

But it's not working. Any idea what I'm doing wrong? Sorry for all the questions. Your input is much appreciated.

Best,
Dominic

0


Try that

 

{% if ticket.via == "Mail" %} SIGNATURE {% else %} no signature {% endif %}

0


Tried it the exact way you wrote it and it says this:

Liquid Liquid error: Unknown operator =

 

 

 

0


When you copy things from here some invisible chars can be added

So copy this

{% if ticket.via == "Mail" %} SIGNATURE {% else %} no signature {% endif %}

Remove formatting (for example copy into browser address bar > the select and copy again)

Try on a ticket.

0


All good, many thanks for your help, Andrey!

You're a champ!

Cheers,

Dominic

0


Make sure you provided feedback to the app!

0


Done!

0


Hi Andrey,

Sorry to reach out with this. I'm stuck again. 

I need to create a condition along these lines:

- if a ticket comes in via email, display a message.

- If the ticket requester is part of a certain org, don't display anything

- If the ticket is coming via other channels, also don't display anything.

Code I wrote is this:

{% if ticket.via == “Mail” %}{{dc.agent_signature}}{% elseif user.organization.name == “InsidersOrganization” %}{% else %}{% endif %}

 

It doesn't work.

What am I doing wrong?

 

Looking forward to hearing from you,
Dominic

0


No ideas? 😔

0


Hi Andrey,

Alright, I'm trying an easier approach

I will assign a ticket via a trigger that will put a tag "email_signature"

{% if {ticket.tags} contains 'email_signature' %}{{dc.agent_signature}}{% else %}{% endif %}

This does not seem to work either. What am I doing wrong?

Looking forward to hearing from you,
Dominic

0


Check these out:

// 1

{% assign via = ticket.via | downcase | strip %}{% if via == 'mail' %}this is MAAAAAIL!{% endif %}

// 2

{% if ticket.tags contains 'customer' %}TAG IS THEEEERE!{% endif %}

0


Many thanks, the second one worked 🎉 🤜

0


Hey Andrey,

 

thank you for the explanation. I would like to do the same as Dominic. But i dont seem to find out, where i can change the liquid or create liquid. Can you help me out with that? Im no coding expert or anything. Do i have to put these statements into the text or html field of the configuration window? 

 

Greetings,
Bastian

0


hi Bastian,

all these "liquid" goes into Zignatures App setting together with text or HTML you want to see in the signature. So if you go to MANAGE > Apps > Zignatures and find the settings for this app you should see the field where to add your desired signature code.

Let me know if that helps?

0


Hi Andrey,

Very helpful chain here!

We are trying to use Zignature and are having issues with the coding, though I'm not sure what's wrong. We're trying to allow for using multiple signatures to be applied dynamically based on tags on tickets - and in one case, send no signature.

It seems we can get the coding to work here:

{% if ticket.tags contains 'twiliotext' %}
{%- else -%}
<p>Fresh wishes,</p>
<h3>{{current_user.name}} [{{ticket.account}}]</h3>
<p><i>Freshly Customer Experience</i></p><a href="https://www.freshly.com/contact" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/t609Lt9.jpg" alt="Visit us at Freshly.com!"></a></span>
{% endif %}
 
But when we try to make it more elaborate, the logic doesn't work (such as if I tried to add the tag "deliverysupport", I get the last signature option below):
 
{% if ticket.tags contains 'twiliotext' %}
{% elsif ticket.tags contains ‘standardtext' %}
{% elsif ticket.tags contains ‘messagebird' %}
{% elsif ticket.tags contains ‘deliverysupport' %}
<p>Fresh wishes,</p>
<h3>{{current_user.name}} [{{ticket.account}}]</h3>
<p><i>Freshly Customer Experience</i></p>
<br />
 <a href="https://support.freshly.com/hc/en-us/categories/115001757948-Delivery-Shipping" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/GQu00A7.jpg" alt="Visit us at Freshly.com!"></a></span>
{% elsif ticket.tags contains ‘freshlyplus' %}
<p>Fresh wishes,</p>
<h3>{{current_user.name}} [{{ticket.account}}]</h3>
<p><i>Freshly Customer Experience</i></p>
<br />
 <a href="https://www.freshly.com/contact" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/UZbvvPM.jpg" alt="Visit us at Freshly.com!"></a></span>
{%- else -%}
<p>Fresh wishes,</p>
<h3>{{current_user.name}} [{{ticket.account}}]</h3>
<p><i>Freshly Customer Experience</i></p>
<br />
 <a href="https://www.freshly.com/contact" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/t609Lt9.jpg" alt="Visit us at Freshly.com!"></a></span>
{% endif %}

All my best,

Colin

0


Hi Colin,

I played a bit and the following version started to work for me.

NOTE: i changed one condition to look up "priority_changed" tag on my test account and slightly updated the HTML

Let me know if that work?

<br>
{% if ticket.tags contains 'twiliotext' %}
{% elsif ticket.tags contains 'standardtext' %}
{% elsif ticket.tags contains 'messagebird' %}
{% elsif ticket.tags contains 'priority_changed' %}
Fresh wishes,<br><b>{{current_user.name}} [{{ticket.account}}]</b><br><i>Freshly Customer Experience</i><br><a href="https://support.freshly.com/hc/en-us/categories/115001757948-Delivery-Shipping" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/GQu00A7.jpg" alt="Visit us at Freshly.com!"></a>
{% elsif ticket.tags contains 'freshlyplus' %}
Fresh wishes,<br><b>{{current_user.name}} [{{ticket.account}}]</b><i>Freshly Customer Experience</i><br><a href="https://www.freshly.com/contact" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/UZbvvPM.jpg" alt="Visit us at Freshly.com!"></a>
{% else %}
Fresh wishes,<br><b>{{current_user.name}} [{{ticket.account}}]</b><i>Freshly Customer Experience</i><br><a href="https://www.freshly.com/contact" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/t609Lt9.jpg" alt="Visit us at Freshly.com!"></a>
{% endif %}

0


Hi Andrey,

Thanks, that does help!!

What would you recommend coding-wise for making the current_user_name more prominent?

Can I use a standard header tag?

All my best,

Colin

0


You can use any style/HTML supported by Zendesk Comment Editor.

Looks like the Headers are supported. So this is something I expect you can use.

As a test you can create a comment with all possible formatting options and then using dev tool inspect the element to see with HTML is being used by Zendesk. Then use the same HTML in your Zignatures config.

0


Hi Andrey,

Thanks, you have been super helpful... so very much appreciated!

One last question, if you don't mind...

What would you recommend if I only wanted to trigger a signature if two tags were on the same ticket, as opposed to one?

Example:

{% elsif ticket.tags contains 'test' and 'test' %}

Fresh wishes,<br><b>{{current_user.name}} [{{ticket.account}}]</b><br><i>Freshly Customer Experience</i><br><a href="https://support.freshly.com/hc/en-us/categories/115001757948-Delivery-Shipping" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/GQu00A7.jpg" alt="Visit us at Freshly.com!"></a>

{% elsif ticket.tags contains 'test' %}

Fresh wishes,<br><b>{{current_user.name}} [{{ticket.account}}]</b><i>Freshly Customer Experience</i><br><a href="https://www.freshly.com/contact" rel="noreferrer" target="_blank"><img src="https://i.imgur.com/UZbvvPM.jpg" alt="Visit us at Freshly.com!"></a>

...where, if 'test' and 'test2' are both on a ticket, Signature A is added, but, if only 'test' is on a ticket, Signature B is added.

All my best,

Colin

0


Hi Colin,

Glad your are finding this helpful. Would be great if you can rate this app on Zendesk marketplace.

In liquid you can use AND or OR operators inside the IF statement in the following way:

{% if ticket.tags contains 'test' and ticket.tags contains 'blah' %}
then show me that message
{% endif %}

So if you structure your conditions from more specific (when multiple tags are expected) to a less specific (when one or no tags are expected) it should do the trick.

0


Hi Andrey,

I'm trying to run this:

{% if ticket.via == 'Any_channel' %}
{% else %}
{{agent.name}}
{% endif %}

To prevent signatures on Channel integrations, but its not working

 

0


@...

Interesting...

Can you render {{ticket.via}} placeholder on a ticket (inject it as a text > submit a ticket) to see what value it renders?

0


Question:

 

We are looking at using Zendesk signatures to advertise Knowledge Management (KB articles). The trick here is that there are a few requirements,
  • Each team of agents will have their share signatures. Product A has a standard signature, Product B has a different signature, etc.
  • We need to update signatures in Bulk to all 100+ agents
  • Signatures need to have the ability to have embedded links

Is there a way to do this?  Any ideas?

0


>Each team of agents will have their share signatures. Product A has a standard signature, Product B has a different signature, etc.

This is where Zignatures app may come handy. You'll need to add a logic into the app to show signatures based on product field values.

>We need to update signatures in Bulk to all 100+ agents

I wonder why? What makes your signatures agent specific?

>Signatures need to have the ability to have embedded links

This is possible.

0


Also, how do you set that up for item #1?

 

We have teams of agents with each team working on a different product.  If we leave the update to the agents, it may not get done.  So, we would rather push out the signatures to each team so all the signatures are the same and each gets populated.

 

I think for item #3 we can use markdown, correct?

0


Hi Andrey, 

 

I was wondering if it was possible to change signatures based on whether or not the ticket was being sent out as an SMS as opposed to an email via the support app on Zendesk. 

0


Caitlin 

 

If ticket was created via SMS and someone replies, then i believe the following can do the trick.

{% if ticket.via == "SMS" %} no signature {% else %} SIGNATURE {% endif %}

If a ticket was created in any other channel, but Agent wants to send an SMS back (which is done via Trigger), then you may need to add a tag to a ticket and exclude signature when a tag is present.

 

Let me know if it helps.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post