Support tip: How to structure the Zendesk email template to use custom HTML layouts for each of your Multiple Brands | Community
Skip to main content

Support tip: How to structure the Zendesk email template to use custom HTML layouts for each of your Multiple Brands

  • June 24, 2019
  • 44 replies
  • 0 views

Show first post

44 replies

Devan
  • October 6, 2020

Hello @James Ripley,

I reached out to our support team, and right now, this is still being investigated. We are looking to get some clarification this soon, and the moment I have an update, I'll be sure to let you know.

Best regards. 


  • July 12, 2021

Hi,

Indeed this thread would have helped many. I have also been able to send emails with varying footer (banners) based on ticket’s brand. While distinct footers successfully deliver to end users, it’s the agents that receive email notifications without the banner. Instead they get default footer text. Any idea why?

Just for information, I’m having 5 brands. for three I use triggers to format the email body, Out of remaining two, one (the last one) has two footers that are sent based on the brand the ticket belongs to. Just to remind end users are getting them but the agents don’t.

Thanks


Hamish15
  • November 15, 2021

@raman11 

I ran into the same issue, this is due to the fact that the {% footer %} content changes dramatically when sending emails to other agents (it includes information on the ticket, which is not usually viewable to end users). 

To ensure the branding works for emails sent to agents as well, I found the following liquid markup can be used instead: 

{% assign check = footer | split: "This email is a service from " %}

{% case check[1] %}
{% when 'BRAND NAME.' %}
//insert content
{% when 'OTHER BRAND NAME.' %}
//insert content
{% endcase %}

This will work for both end users and agents, and simply splits off the additional code that is added when emailing agents and will return the brand name, which can then be used for the when statement.

@andrew40 Thanks for the great guide, this might be a helpful inclusion :) 



  • November 16, 2021

  • January 13, 2022

We have 4 brands and use Andrew’s code to show the correct logo for general ticket emails where the footer equals “This email is a service from  [BRAND]“. It works perfectly, but for the Guide/Community emails, as Kyle mentions, liquid will not run. This results in all 4 logos showing. Since liquid cannot be used our only solution was to hide the brand logos for these types of emails. This is how we did it:

<div {% if false %} style=“display: none” {% endif %}>
        {% case footer %}
            {% when “This email is a service from Brand1.” %}
                <img src=“Brand1Logo”>
            {% when “This email is a service from Brand2.” %}
                img src=“Brand2Logo”>
            {% when “This email is a service from Brand3.” %}
                img src=“Brand3Logo”>
            {% when “This email is a service from Brand4.” %}
                img src=“Brand4Logo”>
        {% endcase %}
 </div>

The above liquid script is designed to hide the ‘display: none’ style when liquid has been compiled. If liquid is not compiled (is a Guide/Community email) ‘display: none’ will be applied to the div, hiding the logos. If liquid is compiled ‘display: none’ will be removed revealing the logos and running through the case/when code as expected.

Note: Aside from the email not being branded the other issue is that all emails from Guide/Community will now have a hidden div containing the logos. It’s understood that emails with hidden divs containing text and images aren’t very desirable and could end up in spam.

It's also less than desirable that our emails now look less professional, with no branding included. 


Dave12
  • January 14, 2022
Hi Nicky,
 
Thanks so much for posting this workaround! For visibility to our product team and to allow others to add their upvotes and comments, would you mind posting to our Feedback - Help Center (Guide) topic, using this template? Your workaround would be very useful, so our team can see the level of work required to get around the current product limitations. Thanks!

  • April 1, 2022

Andrew Soderberg

Thanks for all of this documentation. We are excited by the idea and have a proof of concept in place but there is one complication holding us up:

In our instance we have one department based brand that works with several of our brand brands. Is there a way to create a sub when statement that looks at the group of the ticket?

i.e.

{% when 'This email is a service from Brand.' %}

         {% when 'This email is a service from Group.' %}

         Brand

        {% else %}

        Brand

{% when 'This email is a service from Brand.' %}

Brand


Greg29
  • April 7, 2022

Hi Chris! I'm not Andrew and definitely not an expert in liquid markup, but I took a look at their documentation and you may be able to do this in a slightly different way. Instead of nesting the `when`, you could use multiple conditions for your `when` to accomplish this. For example:

{% when 'email from brand one' and 'email from group 1' %}

Brand/group

{% when 'email from brand one' %}

Brand

Let me know if this works for you!


Reports11
  • May 15, 2022

Hi there,

Were currently working on our email template for two brands.
We worked on the code and when we tested it (using https://email2go.io/), it was all good. But when we tried to paste it on the "email template" section on the Admin Center and used a test ticket everything gets messed up. I don't know why. 

The first photo is what it should look like. The second one is what we got.

Please help.

 

 

 


Cheeny
  • May 30, 2022
Hi Regit!

I would suggest that you check Customizing your templates for email notifications for guidance in customizing your email template. 

I hope that helps!

  • June 3, 2022

Thanks for the documentation. We've set up our template as we believe correctly, however, it doesn't work AT ALL. E-Mails won't show any logos, footers, etc. Would you be so kind to take a look? I anonymized it, Brands 1-4 serve as placeholders, would be the exact names we use in Zendesk.

<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <style>
        * {
            box-sizing: border-box;
            -moz-box-sizing: border-box;
        }

        html,
        body {
            background: #eeeeee;
            font-family: 'Open Sans', sans-serif, Helvetica, Arial;
        }

        img {
            max-width: 100%;
        }

        a {
            color: black; text-decoration: none;
        }

        a:hover {
            color: #a81326;
        }
    </style>
</head>

{% case footer %}

{% when 'Brand 1' %}

<body style="background: #eeeeee; padding: 0 10px; margin: 0; font-family: 'Open Sans', sans-serif, Helvetica, Arial;">
    <table width="800px" cellpadding="0" cellspacing="0" bgcolor="FFFFFF" style="background: #ffffff; max-width: 800px !important; margin: 0 auto; background: #ffffff;">
        <tr>
            <td style="text-align: center;  padding: 5px 100px 0;">
                <p href="#" style="color: #b7b7b7; font-size: 11px; letter-spacing: 0.2px;">{{delimiter}}</a>
            </td>
        </tr>
        <tr>
            <td width="200" style="width: 200px; text-align: left;  padding: 50px 100px 0;">
                <img src="https://assets.prod.XXX.de/assets/shop/images/email/logo.0685b444.png" width="200"/>
            </td>
        </tr>
        <tr>
            <td style="text-align: left; padding: 20px 100px 50px;">
                <p style="font-family: Arial, sans-serif; font-size: 15px; line-height: 1.6; letter-spacing: 0.5px; text-align: left;">
                    {{content}}
                </p>
            </td>
        </tr>
    </table>
</body>

{% when 'Brand 2' %}

<body style="background: #eeeeee; padding: 0 10px; margin: 0; font-family: 'Open Sans', sans-serif, Helvetica, Arial;">
    <table width="800px" cellpadding="0" cellspacing="0" bgcolor="FFFFFF" style="background: #ffffff; max-width: 800px !important; margin: 0 auto; background: #ffffff;">
        <tr>
            <td style="text-align: center;  padding: 5px 100px 0;">
                <p href="#" style="color: #b7b7b7; font-size: 11px; letter-spacing: 0.2px;">{{delimiter}}</a>
            </td>
        </tr>
        <tr>
            <td width="200" style="width: 200px; text-align: left;  padding: 50px 100px 0;">
                <img src="https://assets.prod.XXX.de/assets/shop/images/email/logo.0685b444.png" width="200"/>
            </td>
        </tr>
        <tr>
            <td style="text-align: left; padding: 20px 100px 50px;">
                <p style="font-family: Arial, sans-serif; font-size: 15px; line-height: 1.6; letter-spacing: 0.5px; text-align: left;">
                    {{content}}
                </p>
            </td>
        </tr>
    </table>
</body>

{% when 'Brand 3' %}

<body style="background: #eeeeee; padding: 0 10px; margin: 0; font-family: 'Open Sans', sans-serif, Helvetica, Arial;">
    <table width="800px" cellpadding="0" cellspacing="0" bgcolor="FFFFFF" style="background: #ffffff; max-width: 800px !important; margin: 0 auto; background: #ffffff;">
        <tr>
            <td style="text-align: center;  padding: 5px 100px 0;">
                <p href="#" style="color: #b7b7b7; font-size: 11px; letter-spacing: 0.2px;">{{delimiter}}</a>
            </td>
        </tr>
        <tr>
            <td width="200" style="width: 200px; text-align: left;  padding: 50px 100px 0;">
                <img src="https://assets.prod.XXX.de/assets/shop/images/email/logo.0685b444.png" width="200"/>
            </td>
        </tr>
        <tr>
            <td style="text-align: left; padding: 20px 100px 50px;">
                <p style="font-family: Arial, sans-serif; font-size: 15px; line-height: 1.6; letter-spacing: 0.5px; text-align: left;">
                    {{content}}
                </p>
            </td>
        </tr>
    </table>
</body>

{% when 'Brand 4' %}

<body style="background: #eeeeee; padding: 0 10px; margin: 0; font-family: 'Open Sans', sans-serif, Helvetica, Arial;">
    <table width="800px" cellpadding="0" cellspacing="0" bgcolor="FFFFFF" style="background: #ffffff; max-width: 800px !important; margin: 0 auto; background: #ffffff;">
        <tr>
            <td style="text-align: center;  padding: 5px 100px 0;">
                <p href="#" style="color: #b7b7b7; font-size: 11px; letter-spacing: 0.2px;">{{delimiter}}</a>
            </td>
        </tr>
        <tr>
            <td width="200" style="width: 200px; text-align: left;  padding: 50px 100px 0;">
                <img src="Z:\First & Second Level\EMC 2\CCC\Help Center\XXX\XXX_Logo_OHNE_WUERFEL_CMYK_Schwarz.jpg" width="200"/>
            </td>
        </tr>
        <tr>
            <td style="text-align: left; padding: 20px 100px 50px;">
                <p style="font-family: Arial, sans-serif; font-size: 15px; line-height: 1.6; letter-spacing: 0.5px; text-align: left;">
                    {{content}}
                </p>
            </td>
        </tr>
    </table>
</body>

{% else %}

 <br />
 
{% endcase %}


{{content}}

{% case footer %}

{% when 'Brand 1' %}

{{footer}}
<br />  
<p>
<tr>
            <td style="border-bottom: 1px solid #b0b0b0;">
                
            </td>
        </tr>
    </table>
    <table width="800px" cellpadding="0" cellspacing="0" bgcolor="f5f5f5" style="background: #f5f5f5; max-width: 800px !important; margin: 0 auto; background: #f5f5f5;">
        <tr>
            <td valign="top" style="text-align: left; padding: 20px 100px;">
                <p style="font-family: Arial, sans-serif; font-size: 10px; line-height: 1.3; letter-spacing: 0.5px; text-align: left; color: #38403e">
                        © XXX<br />
                        XXX<br /><br />
                        
                        USt-ID: DE XXX
                </p>
            </td>
        </tr>
<p>
 </body>
</html>

{% when 'Brand 2' %}

{{footer}}
<br />  
<p>
<tr>
            <td style="border-bottom: 1px solid #b0b0b0;">
                
            </td>
        </tr>
    </table>
    <table width="800px" cellpadding="0" cellspacing="0" bgcolor="f5f5f5" style="background: #f5f5f5; max-width: 800px !important; margin: 0 auto; background: #f5f5f5;">
        <tr>
            <td valign="top" style="text-align: left; padding: 20px 100px;">
                <p style="font-family: Arial, sans-serif; font-size: 10px; line-height: 1.3; letter-spacing: 0.5px; text-align: left; color: #38403e">
                        © XXX<br />
                        XXX<br /><br />
                        
                        VAT-EU: DE XXX
                </p>
            </td>
        </tr>
<p>
 </body>
</html>

{% when 'Brand 3' %}

{{footer}}
<br />  
<p>
<tr>
            <td style="border-bottom: 1px solid #b0b0b0;">
                
            </td>
        </tr>
    </table>
    <table width="800px" cellpadding="0" cellspacing="0" bgcolor="f5f5f5" style="background: #f5f5f5; max-width: 800px !important; margin: 0 auto; background: #f5f5f5;">
        <tr>
            <td valign="top" style="text-align: left; padding: 20px 100px;">
                <p style="font-family: Arial, sans-serif; font-size: 10px; line-height: 1.3; letter-spacing: 0.5px; text-align: left; color: #38403e">
                        © XXX<br />
                        XXX<br /><br />
                        
                        USt-ID: DE XXX
                </p>
            </td>
        </tr>
<p>
 </body>
</html>

{% when 'Brand 4' %}

{{footer}}
<br />
<p>
<tr>
            <td style="border-bottom: 1px solid #b0b0b0;">
                
            </td>
        </tr>
    </table>
    <table width="800px" cellpadding="0" cellspacing="0" bgcolor="f5f5f5" style="background: #f5f5f5; max-width: 800px !important; margin: 0 auto; background: #f5f5f5;">
        <tr>
            <td valign="top" style="text-align: left; padding: 20px 100px;">
                <p style="font-family: Arial, sans-serif; font-size: 10px; line-height: 1.3; letter-spacing: 0.5px; text-align: left; color: #38403e">
                        © XXX<br />
                        XXX<br /><br />
                        
                        T.V.A. LU XXX Numéro d´immatriculation XXX
                </p>
            </td>
        </tr> </p>
</body>
</html>

{% else %}

{{footer}} 
<br />
</body>
</html>

{% endcase %}


Robert17
  • November 23, 2022

Hi,

I think it is great to see so many people engage and try to set up the email template to meet multibrand needs, but I think this points to the overall difficulty in doing this and that the current email template building expereince is extremely lacklustre.

It would be far better to follow suit with someone like Hubspot, where you have a UI builder that can be used to build an email template (with the option of working within markdown if you are so inclined). This would make the experience far more pleasent and easier to work with.

In addition, when an account has multibrand functionality, it would make sense to be able to configure an individual email template per brand. This template should also apply to those sent via the Help Centre, if you Follow an article.

At the moment, the email template experience is just mediocre compared with the competition on the market (including some cheaper alternatives).


  • December 8, 2022

Hi

I am trying to use condition base on the brand in the "Email template",

so I took one code script from one of the examples in this reponses, and it is not working. Of course I created the brands as descried in the "WHEN" statement. 

Can someone explain to me why the code is not working

This is what I tried to run:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
table td {
border-collapse: collapse;
}
</style>
</head>

<body style="width: 100%!important; margin: 0; padding: 0;">
<div style="padding: 10px ; line-height: 18px; font-family: 'Lucida Grande',Verdana,Arial,sans-serif; font-size: 12px; color:#444444;">
<div style="color: #b5b5b5;">{{delimiter}}</div>

{{content}}

{% case footer %}
{% when 'This email is a service from Workforce Support.' %}

<div style="color: #9e9e9e; margin: 10px 0 14px 0; padding-top: 10px; border-top: 1px solid #eeeeee;">
<p>This email is a service delivered by <a href="https://support.getworkforce.com" style="color:black" target="_new">Workforce Consultants</a>.</p>
</div>
</div>
</body>
</html>

{% when 'This email is a service from Payworks Support.' %}

<div style="color: #9e9e9e; margin: 10px 0 14px 0; padding-top: 10px; border-top: 1px solid #eeeeee;">
<p>This email is a service delivered by <a href="https://support.gopayworks.com" style="color:black" target="_new">Payworks Support</a>.</p>
</div>
</div>
</body>
</html>

{% else %}

<div style="color: #9e9e9e; margin: 10px 0 14px 0; padding-top: 10px; border-top: 1px solid #eeeeee;">
{{footer}}
<p> Delivered by Zendesk.</p>
</div>
</div>
</body>
</html>

{% endcase %}

Hi Ayelet,
 
Are you noticing that the else condition is always true?  Or are you not seeing footer content in the notification at all?

  • December 13, 2022

Hi Christopher,

It seems like the code is skipping "when" condition and jump to the "else" condition - even thought the ticket's brand is belong to "Payworks Support".

I do see the footer (as it supposed to be expose due to  "else" condition)


Hi Ayelet,
 
Thanks for confirming.  This could happen if the name used in the condition isn't an exact match to the actual brand name.  Can you go to brand settings and copy the text from the Brand Name field to ensure that the names within the conditions match the stored brand name?

Deniz12
  • January 3, 2023

Thanks for this great tip! I was just testing, when I realised that in the border between Denmark and Germany, some might use a German language while writing to our danish support and others might use danish language and (by mistake) write to our German support - the text "This email is a service" seem to be translated by default? 

Is it possible to force a language in that string? We are not using it anywhere else.

Thanks!


Peter11
  • January 11, 2023

Hi @deniz12

No, this is not translated. This is sent by the back end, and the back end has no means to know for sure what language the user actually has selected. Thus, this text is sent in any language you want as long as it's english.

This allows this template to catch the brand specific footer text and derive from that which brand the current mail is concerning.

There several entire mails like this, but these are absolutely non-configurable as they are sent out without using a mail template. This is why I made my feature request 

https://support.zendesk.com/hc/en-us/community/posts/4408868241434-Feature-Request-Brandable-Welcome-Verification-and-Change-Password-Mails. 

Please support it if you like it.


  • June 26, 2024

Hello. This is an incredible resource and I've already implemented it into my company's email template.

 

I have one issue I can't seem to crack - the endcase is adding in a random string of letters and numbers. I've tried putting the endcase in a div with a display of none, but that code doesn't appear to work when a ticket is sent. Would anyone have suggestions on how to remove this random string?