Dialogue Cloud

WebChat Persistence

Note

An additional AnywhereNow WebAgent for Omnichannel license is required.

Note

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

To provide the customer with a persistent chat experience, we have added the option to define the storage location:

  • Session storage: The conversation Id is stored in Session Storage.

    The Session Storage will remain stored when:

    • Navigation the website
    • Navigation off the website and back on the websites (in the same browser tab)

    The Session Storage will be cleared when:

    • Closing the browser tab
    • Closing the browser
    • Clearing the browser cache
  • Local storage: The conversation Id is stored in Session Storage.

    The Session Storage will remain stored when:

    • Navigation the website
    • Navigation off the website and back on the websites (in the same browser tab)
    • Closing the browser tab
    • Closing the browser

    The Session Storage will be cleared when:

    • Clearing the browser cache

Configuration

This storage can be configured with the following settings:

Copy
Script
interface storageLocation: string

These values can be set as follows:

  • Session storage: The conversation Id is stored in Session Storage.

  • Local storage: The conversation Id is stored in Session Storage.

Example

Below an example script that can be loaded into your website's html. In this example we loaded a webchat with local storage:

Copy
HTML
<script type="text/javascript" src="webchat.bootstrap.js"></script>
<script>
window.onload = function() {
    const config = {
            storageLocation: localStorage
        }
    };
WebChat.load(config);
};
</script>