Automatically open the Virtual Agent chatbot when user logs and lands on portal.

sreeshsurendran
Tera Guru

Automatically open the Virtual Agent chatbot when user logs and lands on portal the first time on each new session. Users should be able to close the Virtual Agent chatbot if they don't want to use it.

 

Please find below the HTML code of the Virtual Agent widget:

 

 

 

<div class="conversation-button-container">
	<div class="conversation-region fade" 
       ng-class="{'open': $ctrl.isWindowVisible}">
    <div class="sn-connect sn-connect-floating">
      <div class="sn-connect-floating-wrapper loaded">
        <div class="conversation-container">
          <iframe title="${Chat Support}" class = "chat-frame" scrolling="no"  horizontalscrolling="no" verticalscrolling="no" frameborder="none" ng-src="{{$ctrl.vaSource}}">
          </iframe>
        </div>
      </div>
    </div>
  </div>
  <button aria-label="{{$ctrl.helpButtonAriaLabel}}"
          class="help-button"
          ng-attr-tabindex="0"
          ng-class="{'state-open': $ctrl.isWindowVisible, 'state-unread': $ctrl.hasUnreadMessages}" 
          ng-click="$ctrl.toggleWindow()"
          ng-style="{'background-color': $ctrl.options.button_color}"
          ng-attr-tabindex="0">
    <div class="hover-overlay"></div>
    <span aria-hidden="true" ng-class="$ctrl.isWindowVisible ? 'help-icon icon-close icon-cross' : 'help-icon icon-open sn-va-widget-icon'"></span>
  </button>  
</div>

 

 

 

 

Any help on this would be grateful.

 

Thanks,

Sreesh Surendran

1 REPLY 1

Paul Curwen
Giga Sage

For a less intrusive user experience just use proactive triggers. Zero customisation is needed, and is a better user experience: 

 

https://docs.servicenow.com/bundle/xanadu-servicenow-platform/page/administer/proactive-triggers/ref...

 

https://www.servicenow.com/community/virtual-agent-nlu-articles/introduction-to-proactive-triggers-a...

 

 

 

 

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul