Skip to main content

Notifications

Announcements

No record found.

Customer Service forum
Suggested answer

Omnichannel chat widget how to configure Chat Widget to display bubble after minimising

Posted on by 12
We are using v2 of the Omnichannel Chat Widget and have configured it to open upon clicking a button on our website. We’ve added the "data-hide-chat-button = true" tag to ensure the chat bubble does not display initially.
 
However, we are encountering an issue: if a user minimizes the chat panel, they cannot reopen it without clicking the custom chat button again.
 
Is there a way to:
  1. Retain the "data-hide-chat-button = true" tag so that the chat can only be initiated by clicking the custom chat button, with no chat bubble showing initially.
  2. Display the chat bubble when the user minimizes the chat panel, allowing them to easily reopen the active chat.
Thanks
Categories:
  • Suggested answer
    Karthik.Sompalli Profile Picture
    Karthik.Sompalli 28 on at
    Omnichannel chat widget how to configure Chat Widget to display bubble after minimising
    Hi, you can achieve the desired behavior by using JavaScript to manage the visibility of the chat widget when a user minimizes the chat panel. 

    You can follow below Solution:

    1. Keep data-hide-chat-button = true to ensure that the chat bubble does not appear when the page loads, as intended.
    2. Use below custom script to detect when the user minimizes the chat panel and display the chat bubble, allowing them to reopen the chat without needing to click the custom chat button again.
    window.Microsoft.Omnichannel.LiveChatWidget.SDK
        .addEventListener("ChatMinimized", function() {
            // Show the chat bubble when the user minimizes the chat panel
            var chatButton = document.querySelector('[data-hide-chat-button]');
            chatButton.style.display = 'block';
        });
    window.Microsoft.Omnichannel.LiveChatWidget.SDK
        .addEventListener("ChatMaximized", function() {
            // Hide the chat bubble when the chat panel is active
            var chatButton = document.querySelector('[data-hide-chat-button]');
            chatButton.style.display = 'none';
        });
     
  • Jas09 Profile Picture
    Jas09 12 on at
    Omnichannel chat widget how to configure Chat Widget to display bubble after minimising
    Hi @VaHix

    Thanks, I did look at that but can't work out how to re-enable the Chat Bubble on the event listener for minimise. Do you have an example code for reference or tried this yourself?

    Thanks

    J
  • VaHiX Profile Picture
    VaHiX 1,388 on at
    Omnichannel chat widget how to configure Chat Widget to display bubble after minimising
    You can modify what you want using lcw events in different status lcw:ready, lcw:minimized or lcw:expanded
     
     
     

    ** Please don't forget to close up the thread here by Like and verify it as an answer if it is helpful **

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,556 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,625 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans