Zendesk
Documentation and examples in using the Zendesk with PCUI
Include in your HTML
Copied successfully!
<script src="~/PCUIAssets/PCUI/Common/js/Zendesk.js"></script>
Usage
Copied successfully!
<script>
var configScript = '@("<script id=\"ze-snippet\" src=\"https://static.zdassets.com/ekr/snippet.js?key=ded6e3e5-8f95-4788-8df3-25b5923cf40e\"> </script> <script> zE('webWidget:on', 'chat:departmentStatus', function(dept) {if (dept.name == 'Connecticut' && dept.status == 'online') {console.log(dept.name + ' is ' + dept.status); zE('webWidget', 'updateSettings', {webWidget: {chat: {departments: {enabled: [''], select: 'Connecticut'}, suppress: false } } }); } else if (dept.name == 'Connecticut' && dept.status !== 'online') {console.log(dept.name + ' is ' + dept.status); zE('webWidget', 'updateSettings', {webWidget: {chat: {suppress: true } } }); } }); </script>")';
var textarea = document.createElement('textarea');
textarea.innerHTML = configScript;
initZendesk(textarea.value);
</script>