Migrating from legacy Webchat

Description

From version 3.3 on, Cognigy features a reworked version of the Webchat which is technically different from the previous version.

Within the Cognigy UI, the previous version of the "Webchat" Endpoint was renamed to "Webchat [LEGACY]" and the icon is greyed out. Those Endpoints will continue to work as before.
If you create a "Webchat" Endpoint, this will use the new Webchat 2.0.

Endpoint Configuration

If you previously used the Cognigy Webchat, your Endpoints will now have a greyed-out icon and the Endpoint type will say "Webchat [LEGACY]". They will work as before and were not touched for the new Webchat.

❗️

Compatibility

The old and new Webchat bundles and Endpoints are not compatible with each other.

You cannot use the old Webchat bundle with a new Webchat Endpoint and vice versa.

Compatibility Matrix

cognigyWebChat.js (v1.x)

webchat.js (v2.x)

"Webchat [LEGACY]" Endpoint

YES

NO

"Webchat" Endpoint

NO

YES

Create a new Webchat Endpoint


In order to upgrade, you need to create a new "Webchat" Endpoint (the one with the colored icon) and copy your Endpoint settings from the old one.

Endpoint Settings - Get Started Button

The Get Started Button functionality changed. It is no longer a simple toggle to disable / enable the button, but a dropdown menu where you can select a starting behavior.
Start with a Text Field is like setting the Display Get Started Button button to off.
Start with a Button is like setting the Display Get Started Button to on.
Auto Send a Message to the Bot is a new option that will initialize the conversation immediately by sending the "Get Started" message to the bot automatically.

Endpoint Settings - Plugins

The new Webchats' functionality can be extended by loading additional Plugins.
When embedding the Webchat into your page, you would load the source files of those plugins manually, for the builtin Webchat page, you may specify URLs to webchat plugin bundles by adding them in this new Section.

Embedding

In order to upgrade to the new Webchat, you also need to replace the embedding-code on your Website with code that implements the new Webchat.

Get a new Webchat bundle.


You can find the latest release for the webchat.js bundle you need to embed in our GitHub release page.

Compatibility Builds


Since the release of the new Webchat, we offer two versions of the webchat, that have exactly the same features. The webchat.js bundle contains code for modern browsers and is smaller in size, where the webchat.legacy.js bundle contains code that is backwards-compatible to old browsers that do not support modern JavaScript features.

Host the new Webchat bundle


We no longer host the bundle files at a central place, so you will need to host them on your own web server. This puts you in full control over the code that is loaded into your website and assures the Webchat is available whenever your website is.
For development purposes, you can link to the release files directly in GitHub, but it is not recommended to use that in production.

Embed the new Webchat bundle


On your website, where you previously loaded the legacy Webchat code, you need to load the webchat.js bundle for the new Webchat instead. After the new Webchat bundle has been added to the site, you can initialize it via initWebchat.

Webchat Version

Webchat Bundle File

Initialize command

old (legacy) v1.x

cognigyWebChat.js (v1.x)

Cognigy.init("https://example.url");

new v2.x

webchat.js (v2.x)

initWebchat("https://example.url");

A guide how to initialize the new Webchat on your Website can be found here.


Did this page help you?