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
try { | |
DeskClient client = new DeskClient(new Map<String, String>{ | |
'username' => 'you@example.com', | |
'password' => 'your_password', | |
'subdomain' => 'your_subdomain' | |
}); | |
List<Object> labels = (List<Object>)client.getResource('cases').find(3368).get('labels'); | |
// get the count of the labels | |
System.debug(labels.size()); |
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
<div class="agent_customer_section" id="my_custom_field" style="display:none;"> | |
{{custom_my_custom_field}} | |
</div> | |
<script> | |
$(function() { | |
var case_assigned_group = $('#edit_customer_{{customer.id}}') | |
.closest('#case_sidebar') | |
.find('#ticket_group_id option:selected') | |
.text(); |
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
{ | |
"type": "email", | |
"subject": "Creating a case via the API", | |
"priority": 4, | |
"status": "open", | |
"labels": [ | |
"Spam", | |
"Ignore" | |
], | |
"language": "fr", |
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
{ | |
"direction": "in", | |
"status": "received", | |
"to": "Helpdesk <helpdesk@myhelpdesk.com>", | |
"from": "Jane Doe <jane@example.com>", | |
"subject": "Replying to a case via the API", | |
"body": "Please assist me with this case", | |
"created_at": "2012-05-02T21:38:48Z" | |
} |
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
<!--If you already have jquery on the page you don't need to insert this script tag--> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> | |
<link href="https://d218iqt4mo6adh.cloudfront.net/assets/widget_embed_191.css" media="screen" rel="stylesheet" type="text/css" /> | |
<!--If you already have fancybox on the page this script tag should be omitted--> | |
<script src="https://d218iqt4mo6adh.cloudfront.net/assets/widget_embed_libraries_191.js" type="text/javascript"></script> | |
<script> | |
// ******************************************************************************** | |
// This needs to be placed in the document body where you want the widget to render |
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
client.post('/api/v2/customers', { | |
"emails": [ | |
{ | |
"type": "home", | |
"value": "jsmith@example.com" | |
} | |
], | |
"custom_fields": { | |
"user_id": null | |
} |
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
require 'desk_api' | |
DeskApi.configure do |config| | |
config.username = 'me@support.com' | |
config.password = 'MyReallySecretPassword' | |
config.subdomain = 'syncmade' | |
end | |
DeskApi.cases.create({ | |
type: 'qna', |
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
from rauth import OAuth1Session | |
import pprint | |
try: | |
read_input = raw_input | |
except NameError: | |
read_input = input | |
session = OAuth1Session('YOUR_CONSUMER_KEY', | |
'YOUR_CONSUMER_SECRET', |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Security.Cryptography; | |
using System.IO; | |
using System.Web; | |
using System.Diagnostics; | |
using System.DirectoryServices; |
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
<script> | |
$(function() { | |
var tid = $('#tabs .ui-state-active a').attr('href').replace('#tabs-tid_', '') | |
, sel = '#email_reply_div_tid_' + tid | |
setTimeout(function() { | |
$(sel).prepend([ | |
'<div>', | |
' <ul class="reply-toggle">', | |
' <li class="active">', |
OlderNewer