Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Issue with the size of the chat popup

    Posted 03-26-2019 08:59
    No replies, thread closed.
    Hi all,

      I tried to implement the web chat popup in a dummy web site for demonstration purposes. I followed explanations of the associated tutorial. The chat div is populated alright and the messages and the conversation is established with the queue as expected. However the size of the window part where the messages are displayed is very small, only a few pixels. The rest is fine. Is there a way to have this part of the popup window larger ?
       Here is a screen copy of the window where a "hello" message is barely seen. My javascript code follows the tutorial explanation:

    screen copy of the chat window

    In the HTML part, there is a modal window, invisible when the page is loaded:

    <!-- Chat popup -->
    <div id="chatPopupModal" class="modal">
    <div class="modal-content">
    <span class="close">&times;</span>
    <div id="chat-container"></div>
    </div>
    </div>

    then a button can trigger the start of the chat session:

    <input id="btnStartChat" type="button" value="start chat">


    finally, before the end of the body, the javascript call to the PureCloud part:

    <script
    id="purecloud-webchat-js"
    type="text/javascript"
    src="https://apps.mypurecloud.ie/webchat/jsapi-v1.js"
    region="eu-west-1"
    org-guid="(...)"
    deployment-key="(...)">
    </script>
    <script>
    
    var modal = document.getElementById('chatPopupModal'); // name of the popup
    var btn = document.getElementById('btnStartChat');
    var span = document.getElementsByClassName('close')[0];
    btn.onclick = function() {
    document.getElementById('chat-container').innerHTML = ""; // to erase the content of the modal window
    modal.style.display = 'block';
    window.PURECLOUD_WEBCHAT_FRAME_CONFIG = {
    containerEl: 'chat-container'
    };
    var chatConfig = {
    webchatAppUrl: 'https://apps.mypurecloud.ie/webchat',
    webchatServiceUrl: 'https://realtime.mypurecloud.ie:443',
    orgGuid: '(...my org guid...)',
    orgId: '(...my org id...)',
    orgName: '(...my org name...)',
    queueName : '(...my queue name...)',
    chatNowElement: 'start-purecloud-chat',
    logLevel: 'INFO',
    reconnectEnabled: true,
    reconnectOrigins: [ '(...my dummy web page...)' ]
    };
    
    window.ININ.webchat.create(chatConfig).then(function(webchat) {
    return webchat.renderFrame({
    containerEl: 'chat-container'
    }).catch(function(error) {
    console.error('Error starting chat');
    console.error(error);
    });
    //};
    }).catch(function(error) {
    console.error('Error initializing chat');
    console.error(error);
    });
    }
    span.onclick = function() {
    modal.style.display = 'none';
    }
    window.onclick = function(event) {
    if (event.target == modal) {
    modal.style.display = 'none';
    }
    }
    
    </script>


    Has anyone already experienced the same issue and found the solution ?


    #Integrations

    ------------------------------
    Bastien PUYGRANIER
    Orange Applications for Business
    ------------------------------


  • 2.  RE: Issue with the size of the chat popup

    Posted 03-26-2019 10:29
    No replies, thread closed.
    I'm not saying you won't get an answer here, but the best place to ask this type of question is on the Developer Forum at https://developer.mypurecloud.com.

    ------------------------------
    George Ganahl CCXP, GCA
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 3.  RE: Issue with the size of the chat popup

    Posted 03-27-2019 02:20
    No replies, thread closed.
    Bastien,
    You will need to handle this part in the CSS.
    PM me if you want some examples.

    ------------------------------
    Mathieu Poulain
    AXA General Insurance Japan Limited.
    ------------------------------



  • 4.  RE: Issue with the size of the chat popup

    Posted 03-27-2019 04:36
    No replies, thread closed.
    Hi Mathieu,

      I already tried to change the CSS class of this part of the window (class="webchat-conversation-messages") but that did not work. I will investigate ​that deeper. However, this indicates that the "standard" delivered popup is not bullet-proof...

    ------------------------------
    Bastien PUYGRANIER
    Orange Business Services S.A.
    ------------------------------



  • 5.  RE: Issue with the size of the chat popup
    Best Answer

    Posted 03-28-2019 01:35
    No replies, thread closed.
    You can try to play around those two options in your chat config:
                    // CSS class applied to the chat window
                    cssClass: 'webchat-frame',
    
                    // Custom style applied to the chat window
                    css: {
                        width: '100%',
                        height: '100%'
                    }
    It is taken from:
    https://developer.mypurecloud.jp/api/webchat/

    ------------------------------
    Mathieu Poulain
    AXA General Insurance Japan Limited.
    ------------------------------



  • 6.  RE: Issue with the size of the chat popup

    Posted 04-05-2019 05:46
    No replies, thread closed.
    Hi,

      I did not find the time to test it but indeed that was the solution. Thank you !

    ------------------------------
    Bastien PUYGRANIER
    Orange Business Services S.A.
    ------------------------------