WebChat integrate behind login page

Introduction

The WebChat application can be added to your website by adding some scripts to your page or pages. The scripts will load html, css and javascript to your page. If needed, add the scripts to a masterpage, so the WebChat application will be available on multiple pages.

 

Prerequisites

  • Installed WebChat application on your anywhere server with at least version 4.0.16154.01.

    The version can be checked by going to the WebChat folder root: /bin/sfbwebchatplus.dll, open the file details in the properties of the file and check the version number.

 

Add session storage to your software

To send the username of the webchat to the agent, please store the username in a variable in the sessionStorage with the following key "anywhere365_webchatplus_customername". Please note: this session storage item should be added to the software you want to integrate WebChat with.

sessionStorage.setItem("anywhere365_webchatplus_customername", "[username]");

To prevent that the sessionStorage is cleared; enable to following setting in settings.xml keepcustomernameinsessionstorage.

<keepcustomernameinsessionstorage>true</keepcustomernameinsessionstorage>

 

Enable webchat behind login page

Put the following code snippet to your HTML.

<!-- Start Anywhere365 WebChat Scripts -->

<script type="text/javascript" src="[WEBCHATROOTURL]sfbwebchatplus/js/jquery-2.1.0.js"></script>

<script id="anywhere365-sfbwebchatplus-client-index-external" src="[WEBCHATROOTURL]sfbwebchatplus/js/anywhere365_sfbwebchatplus_client_index_external.js"></script>

<script>

default init, uses default settings and determines default url's */

var optionalArguments = [];

Anywhere365WebchatIntegration.Init(optionalArguments);

</script>

<!-- End Anywhere365 WebChat Scripts -->