virtual agent URL

RanjanRP
Tera Contributor

Hi everyone,

 

I have configured Virtual Agent (VA) and using an external link into my custom chat widget of VA. However, I am encountering an issue: when a user logs out or their session expires while the chat window is still open, any subsequent interaction with an agent starts as a guest user.

 

Is there a way to prevent this from happening and ensure that users do not get labeled as guests after their session ends or they log out? Any suggestions or solutions would be greatly appreciated!

 

 am looking for a solution where the chat window closes or the whole page reloads when user clicks refresh

 

Thanks in advance!

 

below is the code am using on the custom chat widget

 


function($log, $scope, $element, $document, spModal, $q, $timeout, $window) {
var c = this;
var englishChatWindow = null;
$scope.openPopUp = function() {
if (c.data.isLoggedIn && c.data.userSessionID) {
var url = c.data.chaturl + "&sessionID=" + c.data.userSessionID + "&usersysid=" + c.data.usersysid;
if (englishChatWindow && !englishChatWindow.closed) {
englishChatWindow.focus();
} else {
englishChatWindow = window.open(url, "popup", "width=300, height=500px");
}
}
};
}

0 REPLIES 0