Please tell me how to make the macro display a certain text depending on the brand name in the ticket | Community
Skip to main content

Please tell me how to make the macro display a certain text depending on the brand name in the ticket

  • November 7, 2023
  • 2 replies
  • 0 views

Ivan27

Hello there! A new one here :)

The company I work for has 4 brands in ZenDesk. The goal: to make sure that when I use a macro, the custom text is displayed depending on the brand name, for example:

Ticket Brand Name: Mentos.
The message in ticket: Please follow this link: *Check: IF “Mentos”, THEN insert *mentos.com*.

I'll imagine it something like this in the macro setup:

{{ticket.brand.name}} THEN "custom brand site №1"
ELSEIF {{ticket.brand.name}} THEN "custom brand site №2"
ELSEIF {{ticket.brand.name}} THEN "custom brand site №3"
ELSEIF {{ticket.brand.name}} THEN "custom brand site №4";

 
 

2 replies

Oliver27
  • November 7, 2023

Hi

 

You'll want to use Dynamic Content to create similar to the above

{% case ticket.brand.name %}
{% when 'SUPPORT BRAND 1' %}
BRAND 1
{% when 'SUPPORT BRAND 2' %}
Brand 2
{% when 'SUPPORT BRAND 3' %}
BRAND 3
{% else %}
******** PLEASE SELECT BRAND AND RERUN THIS MACRO ********
{% endcase %}

 

 

This will then give you a placeholder dependant on what you set the title as of the dynamic content, for example ours is called Ticket Brand so the placeholder came as {{dc.ticket_brand}}, you can then use this in your macro.

 

It works for links too and you can rich content it for formatting

{% case ticket.brand.name %}
{% when 'BRAND 1' %}
[click here](https://your link)
{% else %}
******** PLEASE SELECT BRAND AND RERUN THIS MACRO ********
{% endcase %}

 

These will work based on if your ticket has a brand set. Hope this helps


Ivan27
  • Author
  • February 9, 2024

Hi Ollie!

Just wanted to say thank you! Everything works great! Amazing! You helped a lot!