Genesys CTI User Forum > Genesys-related Development

Genesys Widgets - Chat

(1/3) > >>

GoodONE:
Hey team,

I need your help in a doubt, I'm checking a test sample provided in the Genesys widgets docs, specifically for chat, I can see that when I fill the required fields to create a chat session I get a script and I can copy/paste it in the index.html in my other page, but I do not understand where to set it, I tried to put it into the window.onload  event, but it did not work,  any suggestion you may have?

The reason for doing this is to maintain the chat session alive when the user is moving across the website pages.

This is the sample page:
[b]Launcher:[/b]
https://docs.genesys.com/Documentation/GWC/Current/Deployment/GWCConfig

Thanks.

cavagnaro:
you put in your HTML main code, but in that same HTML you need to reference the Genesys JS too


Follow first this:
https://docs.genesys.com/Documentation/GWC/Current/Deployment/Welcome

GoodONE:
Thanks for the reply,

It is in the same doc, and it loads correctly, but the script does not do anything else, maybe I'm waiting for something that won't happen, I think I should see the same open window chat, Am I wrong?

cavagnaro:
You should see a side bar.
Check with the debug mode (developer) on your browser, maybe a missing reference? You should be able to see what is wrong in there

GoodONE:
Actually, there's no error, it just won't load it, look at my sample, let me know if it's wrong:

This is the second page after I created a chat session then I move to this one so I put the generated script into a script tag:

[code]<!DOCTYPE html>
<html>
<title>Service</title>

<script id="genesys-widgets-script" src="/chattest/widgets.min.js"></script>

<script>

//Auto generated Script
window._genesys.widgets = {
      main: {
            debug: true,
            theme: "dark",
            lang: "en",
            customStylesheetID: "genesys_widgets_custom",
            plugins: [
                  "cx-webchat",
                  "cx-webchat-service"
            ]
      },
      webchat: {
            dataURL: "http://10.70.90.56:8080/genesys/2/chat/Test",
            apikey: "",
            userData: {},
            cometD: {
                  enabled: false
            },
            autoInvite: {
                  enabled: true,
                  timeToInviteSeconds: 5,
                  inviteTimeoutSeconds: 30
            },
            chatButton: {
                  enabled: true,
                  openDelay: 1000,
                  effectDuration: 300,
                  hideDuringInvite: true
            },
            uploadsEnabled: false
      }
};

</script>



<body>

<a href="/chattest/Sales.html">Sales</a>

<hr />
<a href="/chattest/Launcher.html">Launcher</a>

</body>
</html>[/code]

Navigation

[0] Message Index

[#] Next page

Go to full version