Is it possible to automatically open the chatbot in Service Portal landing page?

Rajini2
Mega Sage

We are in Utah and trying to automatically open the chatbot on the service portal landing page.  Is this possible?

1 ACCEPTED SOLUTION

Rajini2
Mega Sage

Found out the issue. I had Proactive Triggers installed and I had this system property set as true "com.glide.cs.advanced-chat-popover".  I doubted if this was interfering and gave the value "false". Then the chat opened onload of the index page. 

View solution in original post

10 REPLIES 10

Just download the share item.

Sohail Khilji
Kilo Patron

Hi @Rajini2 , 

 

Yes it is possible , refer this article which explained on how to open a chat bot on portal while landing.

 

https://www.servicenow.com/community/virtual-agent-nlu-forum/how-to-open-virtual-agent-chat-bot-auto...

 

I hope this helps...

Yes, I tried "Toggle Chat client automatically", it is not working for me. This is my script, 

 

 

Server Script:
(function() {
	/* populate the 'data' object */
	/* e.g., data.table = $sp.getValue('table'); */
	
	data.chatbottime = gs.getProperty('toggle_chatbot_time');

})();

Client Controller:
api.controller = function($scope) {
    /* widget controller */ 
    var c = this;
		
	$scope.showChat = false;
	$scope.toggleChat = function() {
		$scope.showChat = !$scope.showChat;
		$('a#va_chat').toggleClass(' active-chat');
		var isOpen = $('button.sp-ac-btn.open').length != 0;
		if($scope.showChat){
			if(!isOpen) {
				$scope.$$postDigest(function(){
					$('button.sp-ac-btn').trigger('click');
				});
			}
		} else {
			if(isOpen) {
				$scope.$$postDigest(function(){
					$('button.sp-ac-btn').trigger('click');
				});
			}
		}
	};

    c.toggleWindowAuto = function() {
        $scope.toggleChat();
    };
	
};

Link:
function link(scope, element, attrs, controller) {

	var c = scope.c,
		$timeout = $injector.get('$timeout');

	$timeout(function(){
		if(!c.isOpen) {
			c.toggleWindowAuto();
		}
	}, c.data.chatbottime);
	
}

 

 

 

Just download the share item = works.

Mark Roethof
Tera Patron

Hi there,

 

Yes thats possible. You already found my article on this, just download the share item and add the widget to your portal page.

I also just tested it, still works fine.