On Premises

Integrate WebChat 2.0 FrontEnd into HTML

Note

An Enterprise license or higher is required to access these features.

Note

An additional AnywhereNow WebAgent for Omnichannel license is required.

Introduction

The WebChat application can be added to your SharePoint by adding some scripts to your page or pages. The scripts will load WebChat into your page.

Enable webchat into HTML

  1. Edit the HTML where you want to add the WebChat.

  2. Use the URL where you have deployed the WebChat Frontend and include the webchat.bootstrap.js file from the webchat folder on your website:

    Note

    Without the correct configuration object the WebChat FrontEnd will by default be set to hidden. See the next step.

    Copy
    HTML
    <script src="path/to/webchat/webchat.bootstrap.js"></script>
    <script> WebChat.load() </script>
  3. With the following Typescript definition of the configuration object:

    Note

    We will discuss the various properties of this configuration object in additional configurations , see: WebChat 2.0 for WebAgent Additional Configuration

    Copy
    Script
    interface Configuration {
        teaseMessageSettings?: TeaseMessageSettings;
        templates?: Templates;
        parent?: HTMLElement;
    }
  4. Save the Page.

Example with configuration object to show the WebChat FrontEnd

Copy
HTML
<script src="path/to/webchat/webchat.bootstrap.js"></script>
<script> 
    const config = {
        available: {
            state: 'Enabled'
        },
        away: {
            state: 'Enabled'
        },
        busy: {
            state: 'Enabled'
        },
        offline: {
            state: 'Enabled'
        }
    };
    WebChat.load(config);
</script>