About the Widget Settings API

The Widget Settings API allows you to manage your AI Site-Chat's settings. Learn more about configuring your AI Site-Chat's settings.

With this API, you can:

  • Retrieve current AI Site-Chat settings.
  • Update AI Site-Chat settings.

Note: Wix AI Site-Chat is currently only available in the Wix Editor.

Before you begin

It's important to note the following point before starting to code:

Use cases

Did this help?

Setup

@wix/ai-site-chat

To use the WidgetSettings API, install the @wix/ai-site-chat package using npm or Yarn:

Copy

or

Copy

Then import { widgetSettings } from @wix/ai-site-chat:

Copy
Did this help?

Widget Settings: Sample Use Cases and Flows

This article shares some possible use cases your app or site could support, as well as a sample flow that could support each use case. This can be a helpful jumping-off point.

Retrieve and update widget settings

To retrieve and update the widget settings:

  1. Call Get Widget Settings to retrieve the current settings.
  2. Update the settings retrieved. For example, update the intro message.
  3. Call Set Widget Settings, specifying the updated settings, to save the updated settings.

Display a message if the AI assistant is offline.

To display a message if the AI assistant is offline:

  1. Call Get Widget Settings.
  2. Check the value of assistantOnline in the response.
  3. If it's false, display a message on the site.
Did this help?