Hi All - We are using a Database.set plugin to gather a few info from the customer which is working fine for the fresh chat. The requirement is to show the form again when the chat is launched by the customer within the thread timeline.
We tried adding the below (Messenger.clear) but it still shows the chat window.
window.addEventListener("beforeunload", function (event) {
console.log("Page is unloading (refresh, navigation, or close).");
Genesys("command", "Messenger.clear");
event.preventDefault();
event.returnValue = ""; // Required for showing a warning in some browsers
});