What is the brand manager app actually doing to my triggers?

Note that before reading this article it is recommended that you read this article about how to use the brand manager app.

For any trigger you've turned on branding for, the brand manager app will insert a liquid markup case statement to say "If the brand is X, then insert this branding" and, "if the brand is Y, then insert this other branding" and finally "for all the other brands, insert this generic branding". 

The more brands you have, the more cases or "Ifs" there will be. Here's a great article that also talks about how liquid markup conditions can work in relation to brands.

So what does it actually look like? Below you can see the conditions the app uses with explanations of what is happening... 

{% case ticket.brand.name %} // This bit lets Zendesk know that we're creating conditions for different brands.
{% when 'Brand 1' %} // IF the brand = "Brand 1" then do the following stuff...

Here is where the app puts in the branding HTML for "Brand 1"

{% when 'Brand 2' %}

Here is where the app puts in the branding HTML for "Brand 2"

{% else %} // IF the brand does not = Brand 1 or 2, then do the following stuff...

Here is where the app puts in the branding HTML any ticket that does not meet the conditions above.

{% endcase %} // This let's Zendesk know that that's the end of the code.

So take for example the branding we defined in this article

In step 2 we added in some HTML to the brand "Casterly Hotels". Then in step 3, we turned on branding for the trigger "Notify requester of received request."

So, as a result, the app adds this condition to the body in the trigger: 

{% when 'Casterly Hotels' %}<tr align="left"> <td valign="top" align="center"> <img align="center" class="img" src="https://ucarecdn.com/9a33a9db-46d5-429a-8514-c6e20f5d7901/"> </td> </tr> <tr> <td class="cnt" valign="top"> <p>Hello {{ticket.requester.first_name}}

Your request (#{{ticket.id}}) has been received and is being reviewed by our support staff.

To review the status of the request and add additional comments, follow the link below:
http://{{ticket.url}}

{{ticket.comments_formatted}}</p> </td> </tr> <tr> <td class="ftr"><a href="https://support.sweethawk.co/hc/en-us">Help Centre</a> | <a href="https://support.sweethawk.co/hc/en-us/sections/115001630047-Brand-Manager-App">FAQs</a> </td> </tr> <tr> <td class="addr"><a href="http://yourcompany.com/">Your Company</a> Ltd (ABN 91-074 444 018), Level 10, 123 Your company's Street, Suburbia CA 90210 </td> </tr>

Where: 

Blue = Liquid markup condition
Green = HTML you added in the brand template section
Orange = The text in the 'Notification content' section. (This is what your trigger email would have normally looked like before using the brand manager app.) 

But, this is just the condition for the brand "Casterly Hotels", remember in the using the brand manager article, we also had branding set for generic branding under "Settings" in step 4, ie. the "Else" part of the liquid markup (for all the tickets that are not the Casterly Hotels brand).

So after setting the branding in both locations, the email body of the trigger will look like this:

SweetHawk__-_Agent_2.png

Here's the same code, but highlighted with colours so it's easier to see what's happening: 

{% case ticket.brand.name %}{% when 'Casterly Hotels' %}<tr align="left"> <td valign="top" align="center"> <img align="center" class="img" src="https://ucarecdn.com/9a33a9db-46d5-429a-8514-c6e20f5d7901/"> </td> </tr> <tr> <td class="cnt" valign="top"> <p>Hello {{ticket.requester.first_name}}

Your request (#{{ticket.id}}) has been received and is being reviewed by our support staff.

To review the status of the request and add additional comments, follow the link below:
http://{{ticket.url}}

{{ticket.comments_formatted}}</p> </td> </tr> <tr> <td class="ftr"><a href="https://support.sweethawk.co/hc/en-us">Help Centre</a> | <a href="https://support.sweethawk.co/hc/en-us/sections/115001630047-Brand-Manager-App">FAQs</a> </td> </tr> <tr> <td class="addr"><a href="http://yourcompany.com/">Your Company</a> Ltd (ABN 91-074 444 018), Level 10, 123 Your company's Street, Suburbia CA 90210 </td> </tr>{% else %}<tr align="left"> <td valign="top" align="center"> <img align="center" class="img" src="https://www.genericbrandingimage.genimage.jpg"> </td> </tr> <tr> <td class="cnt" valign="top"> <p>Hello {{ticket.requester.first_name}}

Your request (#{{ticket.id}}) has been received and is being reviewed by our support staff.

To review the status of the request and add additional comments, follow the link below:
http://{{ticket.url}}

{{ticket.comments_formatted}}</p> </td> </tr> <tr> <td class="ftr"><a href="https://support.sweethawk.co/hc/en-us">Help Centre</a> | <a href="https://support.sweethawk.co/hc/en-us/sections/115001630047-Brand-Manager-App">FAQs</a> </td> </tr> <tr> <td class="addr"><a href="http://yourcompany.com/">Your Company</a> Ltd (ABN 91-074 444 018), Level 10, 123 Your company's Street, Suburbia CA 90210 </td> </tr>{% endcase %}

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk