Custom Chat Widget

Besides directly supported chat platforms, Product Fruits also supports the custom integration of any widget. It requires a bit of programming, but overall it's easy to implement.

To use the custom integration, follow these steps:

  1. In the Life Ring Button settings under "3. Tools Buttons settings", select Custom as the chat provider. 
  2. In your code, listen for the productfruits_button_ext_widget_init event on the window object. This event is triggered when the user clicks on the Chat button in the Life Ring Button. You'll need to call your chat platform API to open the chat window.
  3. Listen to an "on close" event on your chat platform. This event should be triggered when users close the chat window. Check your chat platform documents to figure out this event.
  4. Then, when the custom widget is closed, use the Life Ring button API to show the button again.

Here is a quick example:

window.addEventListener('productfruits_button_ext_widget_init', () => {
    openMyChatWidget(); // your function that opens a custom widget

// your function that calls the callback when the custom widget is closed
whenMyChatWidgetIsClosed(() => {

Additional example

Here is an example of a working integration:

<!--Start of Script-->
<script type="text/javascript">

var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();

           // Hide Product Fruits when chat is maximized 
window.Tawk_API.onChatMaximized = function () {
        if (window.productFruits.api.inAppCenter.isOpened()) {

      // Show Product Fruits when chat is minimized
      window.Tawk_API.onChatMinimized = function () {;

      // Initially hide the widget when it loads
      window.Tawk_API.onLoad = function () {

      // Event listener for Life Ring Button chat button to open custom chat widget
      window.addEventListener("productfruits_button_ext_widget_init", () => {

var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
<!--End of Script-->

To finish off this above example integration of, you will also need to hide the presence of the default widget by changing its visibility settings.