Category / Section
How to Add BoldDesk Live Chat Widget to the Customer Portal
Published:
The custom JS option allows you to add the BoldDesk live chat widget to your BoldDesk customer portal.
Go to Admin > Customer Portal > Customization and paste the following custom JS code.
Custom JS code
const script = document.createElement("script");
script.src = `https://{{yourdomain}}/chatwidget-api/widget/v1/{{chatwidgetId}}`;
document.head.appendChild(script);
For Pre-filling user email address additionally add this block of code
window['boldChatSettings'] = {
email : localStorage.getItem('loggedUserEmail'),
maintainIsOpen : false
};
- You can add your domain in the place of {{yourdomain}}. For ex: support.bolddesk.com
- Replace {{chatwidgetId}} with the actual widget ID in the code.
Where to find the chat widget ID?
Go to Admin > Live Chat. Click on the widget you want to add and copy the widget ID from the URL. Refer to the following screenshot.
Pasting the custom JS codes
To learn where to paste the above custom JS codes, refer to this article.