This feature is considered experimental and we are not able to offer much help with how to interact with your chat widget. Using this feature requires a solid understanding of Javascript and is subject to change.
Through header scripts found under:
Partner Settings -> Integrations -> Header Scripts
CloudRadial provides the ability to inject Javascript scripts into CloudRadial. These scripts are loaded on page load before the application starts or users have either logged in or been identified.
To interact with these chat widgets, CloudRadial now calls the Javascript function "CloudRadialUserInit" that is called after a user has been identified through login or session refresh and "CloudRadialUserLogout" that is called when a user uses the Log out option from their profile menu.
Example for Zendesk Chat
Information on working with the Zendesk Chat client can be found here:
Core API - Web Widget - Zendesk Developer Portal
Using this code, then you would add the following javascript code to the headerscripts section in CloudRadial.
<script>
function CloudRadialUserInit(email, displayname, companyname) {
//console.log(email);
//console.log(displayname);
//console.log(companyname);
zE('webWidget', 'prefill', {
name: {
value: displayname,
readOnly: true // optional
},
email: {
value: email,
readOnly: true // optional
}
});
}
function CloudRadialUserLogout() {
zE('webWidget', 'prefill', {
name: {
value: '',
readOnly: false
},
email: {
value: '',
readOnly: false
}
});
}
</script>
Comments
0 comments
Please sign in to leave a comment.