Created
June 6, 2017 01:04
-
-
Save DeskWOW/355c7b08231d654a9d78ad172b14df5d to your computer and use it in GitHub Desktop.
Custom Desk.com Email Notification Theme for Chat Transcripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Must be used in conjunction with a Case Resolved rule. | |
2) Email must go to assigned agent or assigned group so add this liquid to the To field: {% if case.user %}{{case.user.email}}{% elsif case.group %}{{case.group.emails}}{% else %}{{site.admin_emails}}{% endif %} | |
3) The first interaction from the customer is the case subject so can be added to the subject field by referencing {{case.subject}}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title></title> | |
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css"> | |
<style> | |
@media only screen and (max-device-width: 480px) { | |
td[class=emailData] { | |
width: 260px !important; | |
} | |
} | |
</style> | |
<style> | |
table, td, div, span { | |
font-family:'Open Sans', sans-serif !important; | |
} | |
</style> | |
</head> | |
<body style="-webkit-text-size-adjust:none;"> | |
<table style="width: 100%; background-color: #f9f9f9; margin: 5px 15px 20px 0px; padding: 0px; border: 0px solid #e9e9e9; font-family: 'Open Sans',sans-serif; font-weight: 300; line-height: 19px; font-size: 13px;" border="0" cellpadding="0" cellspacing="0"><tr> | |
<td style="font-size:13px; color:#FFFFFF; font-family:'Open Sans', sans-serif; mso-line-height-rule: exactly; line-height:100%; margin-bottom:5px; background-color: #3498DB; width:100%;text-align:center;font-weight:300; padding-top:10px;padding-bottom:10px;">This is an INTERNAL NOTIFICATION for <a href="{{case.direct_url}}" style="text-decoration: underline; color: #FFFFFF;">Case #{{case.id}}</a></td></tr> | |
<tr> | |
<br /> | |
<table class="messageTop" cellspacing="0" cellpadding="0" border="0" style="width: 100%;"> | |
<tr> | |
<td> </td> | |
<td class="emailData" style="width: 100%"> | |
<table class="caseReply" cellspacing="0" cellpadding="0" border="0" style="width: 100%;background-color: white;"> | |
{% if case.channel == "chat" %} | |
{% assign objects = case.chat.messages_and_notes %} | |
{% endif %} | |
{% for obj in objects reversed %} | |
{% if case.channel == "chat" %} | |
{% if obj.note %} | |
{% assign name = obj.agent.name_public %} | |
{% assign date_to_show = obj.created_at %} | |
{% assign message_to_show = obj.note %} | |
{% assign background_color = "#FFFEE9" %} | |
{% capture users_image_url %} {{obj.agent.email | gravatar_url: gravatar_unknown_user, ssl }} {% endcapture %} | |
{% else %} | |
{% assign date_to_show = obj.created_at %} | |
{% assign message_to_show = obj.text %} | |
{% assign background_color = "auto" %} | |
{% if obj.from_customer? %} | |
{% assign name = customer.name %} | |
{% capture users_image_url %} {{customer.email | gravatar_url: gravatar_unknown_user, ssl }} {% endcapture %} | |
{% elsif obj.from_system? %} | |
{% assign name = "System" %} | |
{% capture users_image_url %} {{"[email protected]" | gravatar_url: gravatar_unknown_user, ssl }} {% endcapture %} | |
{% else %} | |
{% assign name = obj.user.name %} | |
{% capture users_image_url %} {{obj.user.email | gravatar_url: gravatar_unknown_user, ssl }} {% endcapture %} | |
{% endif %} | |
{% endif %} | |
{% endif %} | |
<!-- New code TL added --> | |
{% if obj.note %} | |
{% assign background_color = "#FFFEE9" %} | |
{% assign background_color_body = "#FFFEE9" %} | |
{% assign name = obj.agent.name_public %} | |
{% assign sig = "" %} | |
{% elsif obj.agent %} | |
{% assign name = {{case.group.name}} %} | |
{% assign sig = {{obj.agent.signature}} %} | |
{% else %} | |
{% assign background_color = "#f7f7f7" %} | |
{% assign background_color_body = "auto" %} | |
{% assign name = {{customer.name}} %} | |
{% assign sig = {{obj.agent.signature}} %} | |
{% endif %} | |
<tr> | |
<td style="color: #000000; font-family:'Open Sans', sans-serif; border-top:1px solid #CCCCCC; mso-line-height-rule: exactly; line-height:110%; font-size:10pt; background-color:#FFFFFF; color:black; padding:10px; margin:0;"> | |
<strong>{{name}}<br/></strong> | |
<span style="font-size:9pt;">{{date_to_show | in_time_zone: site.timezone | date: "%a %b %d, %Y" }} - {{date_to_show | in_time_zone: site.timezone | date: "%I:%M %p %Z"}}</span><br/> | |
</td> | |
</tr> | |
<tr> | |
<td style="font-size:13pt; color: #000000; font-family:'Open Sans', sans-serif; padding: 10px; mso-line-height-rule: exactly; line-height:110%; background-color:#FFFFFF;">{{message_to_show}}<br/>{{sig | newline_to_br}}</td> | |
</tr> | |
{% endfor %} | |
</table> | |
<table class="spacer" cellspacing="0" cellpadding="0" border="0" style="height: 25px; line-height:25px;"> | |
<tr><td> </td></tr> | |
</table> | |
</td> <!-- EmailData TD Ends--> | |
<td> </td> | |
</tr> | |
</table> | |
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%; text-align: center; padding-bottom: 10px; background-color: #3498DB; padding-top: 10px; color: #FFFFFF;"><tr><td style="font-size:13px; color: #FFFFFF; font-family:'Open Sans', sans-serif; mso-line-height-rule: exactly; line-height:100%; padding:5px 10px 10px 10px;">{{system.snippets.message_was_sent_to}} an internal team member in reference to <a href="{{case.direct_url}}" style="text-decoration: underline; color: #FFFFFF;">Case #{{case.id}}</a>. <br /></td></tr></table> | |
</td> | |
<td> | |
| |
</td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment