Skip to content

Instantly share code, notes, and snippets.

View DeskWOW's full-sized avatar

Desk.com Customer WOW Team DeskWOW

View GitHub Profile
@DeskWOW
DeskWOW / openssl_multipass.php
Created December 14, 2017 19:09
Desk.com Multipass SSO using OpenSSL
<?php
$subdomain = 'YOUR DESK.COM SUBDOMAIN';
$api_key = 'YOUR MULTIPASS API KEY';
// Create the encryption key using a 16 byte SHA1 digest of your api key and subdomain
$salted = $api_key . $subdomain;
$digest = hash('sha1', $salted, true);
$key = substr($digest, 0, 16);
// Generate a random 16 byte IV
@DeskWOW
DeskWOW / desk-search-results
Last active October 11, 2017 23:50
Desk search results for Swiftype integration.
<!--
.M"""bgd `7MM"""YMM db `7MM"""Mq. .g8"""bgd `7MMF' `7MMF'
,MI "Y MM `7 ;MM: MM `MM..dP' `M MM MM
`MMb. MM d ,V^MM. MM ,M9 dM' ` MM MM
`YMMNq. MMmmMM ,M `MM MMmmdM9 MM MMmmmmmmMM
. `MM MM Y , AbmmmqMA MM YM. MM. MM MM
Mb dM MM ,M A' VML MM `Mb.`Mb. ,' MM MM
P"Ybmmd" .JMMmmmmMMM .AMA. .AMMA..JMML. .JMM. `"bmmmd' .JMML. .JMML.
BEGIN SEARCH PAGE
@DeskWOW
DeskWOW / 1 - index code
Last active October 6, 2017 20:03
Topic/Subtopic Desk Theme hack. Place on Page (Index) in Advanced Theme Editor.
<div id="content">
<div class="container index">
<div class="row">
<div class="col-md-12">
<div class="col-md-8 {% if desk.page.theme.layout != 'left' %} col-md-push-4 {% endif %}">
<div class="row topic">
{% assign col = 0 %}
{%for topic in topics%}
{%if topic.desc contains 'heading' and col == 0 %}
</div><div class="row topic">
@DeskWOW
DeskWOW / 1 - Read Me
Created June 6, 2017 01:04
Custom Desk.com Email Notification Theme for Chat Transcripts.
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}}.
@DeskWOW
DeskWOW / 1) Header
Last active March 30, 2017 20:30
Everglades Foundation theme.
{% if desk.apps.get_satisfaction.enabled %}
{{ gsinit }}
{% endif %}
{% if favicon.size > 0 %}
<link rel="SHORTCUT ICON" type='image/ico' href='{{favicon}}' />
<link rel="icon" type='image/png' href='{{favicon}}' />
{% else %}
<link rel="icon" type='image/vnd.microsoft.icon' href='{{ "/favicon.ico" | portal_image_url: image_asset_host }}' />
<link rel="icon" type='image/png' href='{{ "/favicon.png" | portal_image_url: image_asset_host }}' />
@DeskWOW
DeskWOW / gmail_style_email_reply_theme.html
Last active June 27, 2017 18:36
Gmail style email reply theme for Desk.com
{% assign emails = case.emails_for_reply_theme %}
{% assign threadlength = emails.size|minus:1 %}
{% for email in emails reversed %}
{% if forloop.first %}
{{email.new_html}}
{% if email.agent %}
{% if email.agent.signature %}
@DeskWOW
DeskWOW / 1 - Read Me
Last active September 19, 2016 02:34
Custom Desk.com Auto-Acknowledgement Email Theme (matches look & feel of the email notification theme)
This is a custom theme for the Desk.com Auto-Acknowledgement Email. It is styled to match the look and feel of the default email notification theme. If the private portal is enabled the My Cases link will display in the email.
@DeskWOW
DeskWOW / 1-subject.txt
Created August 11, 2016 15:25
A notification theme that simply gives interaction history of the case.
[Case #{{case.id}} Activity] {{ case.emails.last.subject }}
var express = require('express'),
bodyParser = require('body-parser'),
app = express(),
path = require('path'),
CryptoJS = require("crypto-js");
app.use(express.static(path.join(__dirname, 'public')));
app.use(express.static(path.join(__dirname, 'bower_components')));
app.use(bodyParser.json()); // create application/json parser
if (hashedContext === b64Hash) {
res.sendFile(path.join(views, 'index.html'));
} else {
res.send("authentication failed");
};