A working script essentially equal to the Example Page at https://developer.mypurecloud.com/api/webchat/ stopped working for me recently. I see a console error that triggers when I call ININ.webchat.create.
It works fine if I run as an separate page on my developer machine, so I guess it some conflict on the page its embedded on is a possibility.
The webchat API does change from time to time. Be sure to compare what you've written to what's on the doc page you linked. If you need additional assistance, please post more information about your code and config.
I see the same error when I include the webchat js files to my production page.
It seems that there is a conflict between requirejs and the jsapi-v1.js file.
When I comment out requirejs the webchat works fine. But requirejs is needed on my production page.
I can see requirejs is used in our production site as well, so likely Thomas and me are seeing the same issue here. Our web service is managed by a partner, but I'd expect to be able to drop the web chat source script in existing environments conflict-free.
We hadn't had conflicts with other 3rd party scripts, except the PureCloud web chat widget now. Any solution would be appreciated.
We asked our partner to open a ticket toward Genesys and they have, so it's pending investigation for now. If I get some useful info about this topic, I will share it in this thread.
This looks to be an incompatibility between a library we are using for scheduling (moment-js) our dependency loading system (lasso) and a library you are probably using for dependency loading (probably requirejs). A fix is in the works.
FYI for those following this thread, it was recently resolved on PureCloud's end, and I have confirmed the script is now working in our instance where we had the issue before. So anyone else with this issue might want to revisit and see if it might work for you now.