Genesys Cloud - Main

 View Only
Discussion Thread View
  • 1.  Web Chat Widget V2 - Using html to make a schedule decision

    Posted 05-06-2021 16:12
    hi folks, 

    I'm looking at a webchat implementation where there is a specific schedule involved (e.g. chat is open 8am until 10pm)

    I appreciate that the V1 and V1.1 widgets have this schedule feature, but I am keen to use the V2 widget for mobile optimization and domain limiting features

    I'm wondering if anyone has managed to use html / JS to limit the time when the "Start Chat" button is presented with a V2 widget

    I have managed to configure schedules within the flow which can present a message to the customer that states the queue is closed, but they've already started their chat by then, I would prefer to simply not display the button at "closed" times if possible

    Any hints much appreciated - I'm not a html coder by nature so please be gentle with me :)
    #DigitalChannels
    #Implementation

    ------------------------------
    Mark Elliott
    Lemon Business Solutions
    ------------------------------


  • 2.  RE: Web Chat Widget V2 - Using html to make a schedule decision

    Posted 05-07-2021 05:34
    This Javascript will give some level of indication as to what i am looking for, but gives popups where I basically want the chat button to either appear or not based on time of day. 

    var currentTime = new Date().getHours();
    if (currentTime >= 8 && currentTime <= 22) {
    window.alert("Our chat is currently open");
    } else {
    window.alert("Our chat is currently closed");
    }

    I've tried a few different ways of pasting the chat widget into this code but it doesn't seem to want to work for me.

    ------------------------------
    Mark Elliott
    Lemon Business Solutions
    ------------------------------



  • 3.  RE: Web Chat Widget V2 - Using html to make a schedule decision

    Posted 09-28-2021 05:39
    hi @Mark Elliott,

    Finally, did you get this?

    I am in the same situation as you were, I see that schedules are only available for chat in version 1.0 and 1.1 and I don't know how to apply time schedules in version 2.

    Thanks in advance.
    Best regards.​

    ------------------------------
    Carlos Camacho Jimenez
    Evolutio Cloud Enabler S.A.
    ------------------------------



  • 4.  RE: Web Chat Widget V2 - Using html to make a schedule decision

    Posted 10-19-2021 13:47
    hi @Carlos Camacho Jimenez

    Sorry for late response! Better late than never hopefully.

    I couldn't find a way to do this in GC. But, as a workaround we could hide the web chat button on the web page by using html code which has the same effect. 

    I produced a simple version (I'm not a web dev and this become obvious :)) and it was improved by actual web dev guys for us. 

    Within the button html implemented on the website there is this segment of code which decides when or not to show the button based on getHours

    x-show="londonDate.getHours() >= 8 && londonDate.getHours() < 22"

    And londonDate is defined by the below script which is implemented into the web page separately. 

    <script>
    const londonDate = new Date((new Date()).toLocaleString("en-US", {timeZone: "Europe/London"}));
    </script>
    </div>

    Hope this is of some use
    Mark

    ------------------------------
    Mark Elliott
    Lemon Business Solutions
    ------------------------------



  • 5.  RE: Web Chat Widget V2 - Using html to make a schedule decision

    Posted 10-20-2021 02:32
    Hi @Mark Elliott,

    Sure, better late than never, thank you very much.

    Unfortunately, from Genesys Cloud it is not possible as you indicate.
    I imagined that the only way was through the code on the website, thank you very much for your confirmation and help.

    Your contribution has been very useful to me.

    Regards.

    ------------------------------
    Carlos Camacho Jimenez
    Evolutio Cloud Enabler S.A.
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources