freshchat-widget
Freshchat Inapp Widget
This is the Javascript API for the freshchat widget (https://www.freshworks.com/freshchat-livechat-software/)
Installation
bower install freshchat-widget
Integration
For anonymous user
window.fcWidget.init({
token: "WEB_CHAT_TOKEN",
host: "WEB_CHAT_URL"
});
For logged in user
window.fcWidget.init({
token: "WEB_CHAT_TOKEN",
host: "WEB_CHAT_URL",
externalId: "EXTERNAL_ID"
});
To restore user
window.fcWidget.init({
token: "WEB_CHAT_TOKEN",
host: "WEB_CHAT_URL",
externalId: "EXTERNAL_ID",
restoreId: "RESTORE_ID"
});
Customization
To apply css classnames for widget states like LOADED
, OPENED
, REPLY_DIALOG
window.fcSettings = {
token: "WEB_CHAT_TOKEN",
host: "WEB_CHAT_URL",
config: {
cssNames: {
widget: 'fc_frame',
open: 'fc_open',
expanded: 'fc_expanded'
}
}
};
window.fcWidget.init({
token: "WEB_CHAT_TOKEN",
host: "WEB_CHAT_URL",
config: {
cssNames: {
widget: 'fc_frame',
open: 'fc_open',
expanded: 'fc_expanded'
}
}
});
Documentation
Setup documentation available here: https://developers.freshchat.com