Paldesk Website Widget API
Related Articles
Paldesk website widget API allows you to control the widget on your website using Javascript.
The following functions are supported:
– show/hide chat window
– authenticate user on chat
– open non-chat channels (Facebook, Telegram, Skype and email)
All functions are available in the window.BeeBeeate.widget object
(e.g., window.BeeBeeate.widget.openChatWindow(null, null) )
1) Show chat window
openChatWindow(successCallback, errorCallback)
Function that opens the widget chat window. Usage example:
window.BeeBeeate.widget.openChatWindow(() => console.log(“chat open”), (error) => alert(“ERROR; ” + error));
2) Close chat window
closeChatWindow(successCallback, errorCallback)
Function that closes the widget chat window. Usage example:
window.BeeBeeate.widget.closeChatWindow(() => console.log(“chat closed”), (error) => alert(“ERROR; ” + error));
3) Authenticate user
authenticate(email, firstname, lastname, successCallback, errorCallback)
Function that authenticates the user using the provided authentication data, and opens the widget chat window if authentication is successfull. Usage example:
window.BeeBeeate.widget.authenticate(‘test.user@testema.il’, ‘John’, ‘Doe’, () => console.log(“user authenticated”), (error) => alert(“ERROR; ” + error));
4) Open Email
openEmail(successCallback, errorCallback)
Function that opens the email client using the email address configured in your email channel config. Usage example:
window.BeeBeeate.widget.openEmail(() => console.log(“email editor open”), (error) => alert(“ERROR; ” + error));
5) Open Facebook
openFacebook(successCallback, errorCallback)
Function that opens the Facebook chat using the facebook channel id configured in your Facebook channel config. Usage example:
window.BeeBeeate.widget.openFacebook(() => console.log(“facebook open”), (error) => alert(“ERROR; ” + error));
6) Open Whatsapp
openWhatsapp(successCallback, errorCallback)
Function that opens the Whatsapp chat using the Whatsapp account phone number configured in your Whatsapp channel config. Usage example:
window.BeeBeeate.widget.openWhatsapp(() => console.log(“whatsapp open”), (error) => alert(“ERROR; ” + error));
7) Open Telegram
openTelegram(successCallback, errorCallback)
Function that opens the telegram chat using the whatsapp channel id configured in your telegram channel config. Usage example:
window.BeeBeeate.widget.openTelegram(() => console.log(“telegram open”), (error) => alert(“ERROR; ” + error));
8) Open Skype
openSkype(successCallback, errorCallback)
Function that opens the Skype chat using the Skype acount configured in your Skype channel config. Usage example:
window.BeeBeeate.widget.openSkype(() => console.log(“skype open”), (error) => alert(“ERROR; ” + error));
9) Open Instagram
openInstagram(successCallback, errorCallback)
Function that opens the Instagram chat using the Instagram username configured in your Instagram channel config. Usage example:
window.BeeBeeate.widget.openInstagram(() => console.log(“instagram open”), (error) => alert(“ERROR; ” + error));
NOTE:
Please note that we do not provide live chat support when it comes to widget API documentation. If you come across any difficulties, please send us an email with a detailed description of the issue to support@paldesk.com, our tech team will do their best to help.