1. Knowledge Base
  2. Zendesk integration

Zendesk Chat Integration

Overview

The Cobrowse.io integration for Zendesk works out of the box with Web Widget (Classic) version and the new messaging Web Widget. Just by following the SDK instructions and the Zendesk integration you will have a working setup.
Install the Cobrowse Chat application available on Zendesk marketplace and you will be able to see available Cobrowse devices alongside each customer chat. Cobrowse-enabled devices are associated with Zendesk chats by utilizing a common identifier shared between both systems. To better understand the details on how this works please see below.

Integration

In the Zendesk integration Cobrowse uses a device Id to be able to correlate sessions, to achieve this:
1. Set Cobrowse SDK Custom Data cobrowseio_deviceid field to the device id value;
2. Tag Zendesk chat with a tag containing the device id value;
3. The Cobrowse Chat application on Zendesk will then be able to correlate both and present the relevant devices.  
For example, when using the Web SDK, you can define a field in the custom data as shown below.
CobrowseIO.client().then(function() {

let customData = {};

customData.cobrowseio_deviceid = CobrowseIO.deviceid();

CobrowseIO.customData = customData;

CobrowseIO.start();

});
On the other end, Zendesk chats are tagged using the built-in functionality. For example for the device id '123abc':
<script type="text/javascript">

zE('webWidget', 'chat:addTags', ['cobrowseio_deviceid_123abc']);

</script> 
This correlation identifier pattern can be applied to other integration scenarios, where the key lies in using a consistent correlation identifier.