We are helping our Genesys Cloud customer migrate from Chat to Web Messaging. Currently, we are storing the following as Participant Data on Chat interactions:
OS (context._genesys_OS)
Browser (context._genesys_browser)
Source (context._genesys_source)
Page Title (context._genesys_pageTitle)
We need to store this same data with Web Messaging interactions. I found a similar topic:
We added the code snippet and Web Messaging interactions now store the URL and Language. I would like to inquire if it is possible to store the above as Participant Data on Web Messaging interactions, and what other data can be stored with Web Messaging interactions using the Database.set command.
Yes, that method is used to store any data to Participant Data. You do not need the context part anymore, it is just the key name as explained. Any data that you can find in javascript and execute the command will work. The big difference is you can execute this at any time in the browser session and not just on the page they click to start.
Some examples are window.navigator.userAgent to get the OS, but all of these are public javascript samples and not specific to Genesys. How did you get the values in the first place?
Thank you for that example. I believe another engineer obtained those key names when we originally implemented web chat for our customer. Would you happen to have the code/javascript for browser, source and page title? Thank you!
Sorry, if you point me to the page I can look. Examples might be:
var genesys_OS ="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) genesys_OS ="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) genesys_OS ="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) genesys_OS ="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) genesys_OS ="Linux";
Not sure what source is in this context. This isn't Genesys code and so I cannot find it for you or ask the engineer as I don't know where it came from. All the samples above are from Stack Overflow and any web developer could write them.