Skip to content

Instantly share code, notes, and snippets.

View jandreaucodes's full-sized avatar

Mike Jandreau jandreaucodes

View GitHub Profile
### Keybase proof
I hereby claim:
* I am jandreaucodes on github.
* I am mikejandreau (https://keybase.io/mikejandreau) on keybase.
* I have a public key ASD-l8mt0to66AjrTpHgwqIyqBu2BI4NHabcRIFBQQiaQwo
To claim this, I am signing this object:
@jandreaucodes
jandreaucodes / CSAT Code
Created March 14, 2017 10:50
CSAT Code
{% if email.has_customer_feedback? %}
<hr />
<div id="section-customer-feedback" style="background-color:#fafafa; border:0; padding:2px;">
<div id="customer-feedback-question">{{email.customer_feedback.question}}</div>
{% if email.customer_feedback.yes_no_rating? %}
<span class="customer-feedback-rating">
<a href="{{email.customer_feedback.rating0_link}}"><img style="vertical-align:middle;" src="{{email.customer_feedback.rating0_yes_no_img}}" alt="{{system.snippets.customer_feedback_poor}}" title="{{system.snippets.customer_feedback_poor}}"></a>
</span>
<span style="margin: 0 10px 0 10px;">|</span>
<span class="customer-feedback-rating">
{"channel": "#general", "username": "CSAT Bot", "text": "", "icon_emoji": ":thumbsdown:",
"attachments": [
{
"fallback": "{{customer.first_name}} {{customer.last_name}} ({{customer.company}}) gave {{case.user.name}} a bad rating",
"pretext": "Room for improvement {{case.user.name}}!",
"title": "{{customer.first_name}} {{customer.last_name}} ({{customer.company}}) gave {{case.user.name}} a sad face",
"text": "Subject: {{case.subject}}\nCase <{{case.direct_url}}|{{case.id}}>",
"color": "#7CD197",
"mrkdwn_in": ["text", "pretext", "fields"]
}
{"channel": "#general", "username": "CSAT Bot", "text": "", "icon_emoji": ":thumbsup:",
"attachments": [
{
"fallback": "{{customer.first_name}} {{customer.last_name}} ({{customer.company}}) gave {{case.user.name}} a happy rating",
"pretext": "Great job {{case.user.name}}!",
"title": "{{customer.first_name}} {{customer.last_name}} ({{customer.company}}) gave {{case.user.name}} a smiley face",
"text": "Subject: {{case.subject}}\nCase <{{case.direct_url}}|{{case.id}}>",
"color": "#7CD197",
"mrkdwn_in": ["text", "pretext", "fields"]
}
@jandreaucodes
jandreaucodes / priority.txt
Created August 16, 2016 19:56 — forked from rruhlen/priority.txt
Hard-code drop-down to allow user to select priority on case.
<div class="priority-container">
<select class="default xl form-control" name="ticket[priority]" id="ticket_priority">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
{% if page == 'email_new' %}
<style>
#support-side {display: none !important}
#support-main {width: 100% !important}
</style>
{%endif%}
@jandreaucodes
jandreaucodes / gist:7a84d77c14e0ee06d1c60312ea2ff3c4
Last active March 29, 2016 17:28
How to escape Liquid when replying to a case
{%raw%} My Liquid code goes here, ie; {{customer.first_name}} {{customer.last_name}} {%endraw%}
@jandreaucodes
jandreaucodes / gist:72c33d7cbbcbcf51bf66
Created March 18, 2016 15:50
Code for "My Cases" link in Private Portal
{% if site.myportal_enabled %}
<a href='{{ desk.system.links.myportal }}'>{{system.snippets.my_cases}}</a>
{% endif %}
{{customer.email}}