Created
September 24, 2021 13:06
-
-
Save danjesus/e26609ec1b69761fce1e9a8e30dbbbbf to your computer and use it in GitHub Desktop.
Zendesk Widget Configuration Options
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
//Show and hide | |
zE('webWidget', 'hide'); | |
zE('webWidget', 'show'); | |
zE('webWidget', 'clear'); | |
zE('webWidget', 'toggle'); | |
zE('webWidget', 'reset'); | |
zE('webWidget', 'open'); | |
//Click to show | |
// <a href="javascript:void(0);" id="showWidget" onclick="zE(function() {zE.show();});">Open widget on click</a> | |
//identify | |
zE('webWidget', 'identify', { | |
name: 'Akira Kogane', | |
email: '[email protected]', | |
organization: 'Voltron, Inc.' | |
}); | |
zE('webWidget', 'prefill', { | |
name: { | |
value: 'isamu', | |
readOnly: true // optional | |
}, | |
email: { | |
value: '[email protected]', | |
readOnly: true // optional | |
}, | |
phone: { | |
value: '61431909749', | |
readOnly: true // optional | |
} | |
}); | |
//Locale | |
zE('webWidget', 'setLocale', 'de'); | |
//Update | |
zE('webWidget', 'updateSettings', { | |
webWidget: { | |
chat: { | |
departments: { | |
enabled: ['finance', 'hr', 'sales'], | |
select: 'sales' | |
} | |
} | |
} | |
}); | |
//Search Suggestions | |
zE('webWidget', 'helpCenter:setSuggestions', { | |
url: true , | |
search: 'search string', | |
labels: ['label1'] | |
}); | |
window.zESettings = { | |
webWidget: { | |
cookies: false, | |
errorReporting: true, | |
contactOptions: { | |
enabled: true, | |
contactButton: { '*': 'Contact Button' }, | |
chatLabelOnline: { '*': 'Live Chat' }, | |
chatLabelOffline: { '*': 'Chat is unavailable' }, | |
contactFormLabel: { '*': 'Leave us a message' } | |
}, | |
contactForm: { | |
suppress: true, | |
attachments: false, | |
title: {'*': 'Have your say'}, | |
subject: true, | |
fields: [ | |
{ id: 'description', prefill: { '*': 'My field text' } }, | |
{ id: 2142225, prefill: { '*': 'My custom field text' } } | |
], | |
selectTicketForm: {'*': 'Please choose:'}, | |
tags: ['website', 'store'], | |
ticketForms: [ | |
{ id: 426353 }, | |
{ id: 426353, | |
fields: [{ | |
id: 'description', | |
prefill: {'*': 'My field text'} | |
}] | |
} | |
] | |
}, | |
position: { | |
horizontal: 'left', | |
vertical: 'top' | |
}, | |
offset: { | |
horizontal:'100px', | |
vertical:'150px', | |
mobile:{ | |
horizontal:'230px', | |
vertical:'100px' | |
} | |
}, | |
color: { | |
theme:'#FF69B4', | |
launcher:'#CC3A83', | |
launcherText: '#FF6600', | |
button:'#8A0648', | |
resultLists:'#691840', | |
header:'#203D9D', | |
articleLinks:'#FF4500' , | |
bypassAccessibilityRequirement: true | |
}, | |
zIndex: 999999, | |
chat: { | |
suppress: true, | |
title: {'*': 'Have your say'}, | |
concierge: { | |
avatarPath: 'https://example.com/img/avatar.jpg', | |
name: 'Jane Doe', | |
title: { '*': 'Live support' } | |
}, | |
departments: { | |
enabled: ['finance', 'hr', 'sales'], | |
select: 'hr' | |
}, | |
hideWhenOffline: true, | |
menuOptions: { | |
emailTranscript: false | |
}, | |
notifications: { | |
mobile: { | |
disable: true | |
} | |
}, | |
offlineForm: { | |
greeting: {'*': "We aren't online right now, please leave a message"} | |
}, | |
prechatForm: { | |
greeting: {'*': 'Please fill out the form below to chat with us'}, | |
departmentLabel: {'*': 'Select a department',} | |
}, | |
profileCard: { | |
avatar: true, | |
rating: false, | |
title: true | |
}, | |
tags: ['loggedin'] | |
}, | |
helpCenter: { | |
suppress: true, | |
originalArticleButton: false, | |
filter: { | |
category: '200053794-General,115000669485,201742209', | |
section: '200154474-Announcements', | |
label_names: 'orders' | |
}, | |
searchPlaceholder: {'*': 'Please enter search terms'}, | |
title: {'*': 'Search for help'}, | |
chatButton: {'*': 'Live Chat'}, //25 characters | |
messageButton: {'*': 'Leave us a message'} | |
}, | |
talk: { | |
title: {'*': 'Have your say'}, | |
suppress: true, | |
nickname: "Sales Support" | |
}, | |
launcher: { | |
label: {'*': 'Get help'}, | |
chatLabel: { '*': 'Chat'}, | |
mobile: { | |
labelVisible: true | |
}, | |
badge: { | |
label: {'*': 'Chat with us'}, | |
image: 'https://example.com/img/avatar.jpg', | |
layout: 'image_only' //image_right', 'image_left', 'image_only' and 'text_only' | |
} | |
}, | |
answerBot: { | |
suppress: true, | |
avatar: { | |
url: 'https://link-to-some-image', | |
name: {"*" : 'Bot Name'} | |
}, | |
title: {"*": "Answer Bot Support"}, | |
contactOnlyAfterQuery: true, | |
search: { | |
labels: ['I would like some help'] | |
} | |
}, | |
navigation: { | |
popoutButton: { | |
enabled: false | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment