Skip to content
English
  • There are no suggestions because the search field is empty.

Enhancing interaction between the website and the chat widget

Forward website enquiries directly to the chat widget to start context-sensitive conversations

To address users’ specific enquiries on the website, the chat widget can launch directly with predefined information. Input into search fields, button selections or form submissions on the website are passed to the AI chatbot as context. In this way, the conversation in the widget begins seamlessly with the relevant topic. This saves time and makes the conversation flow significantly more efficient for users.

  1. Preparation in the Hub

  2. Technical implementation on the website

  3. Use cases

 

1. Preparation in the Hub

Before the handover can be set up on the website, the relevant targets must be defined in the Hub:

  • Intents: Intents include topics and agents that are to be triggered when the widget is launched. These must be created and published in the Hub in advance. How topics are defined and created is described in this article. Information on creating AI agents is described in this article.

  • Forms: If a form is to be launched, it must be created in the Hub under the ‘Forms’ menu item and its technical name (ID) noted down. What forms are and how they are created is described in this article.

The technical name of the intent or form is the most important element for data transfer. It must be copied exactly as it is stored in the Hub. The technical name can be found in the URL when opening the editorial topic or the form in the Hub.

Form: Everything between the second slash "/" and “?” (the question mark).

Topic: Everything between second slash "/" and “?” (the question mark).

2. Technical implementation on the website

A minor code adjustment is required on the website to enable the integration. The following information should be forwarded to the technical department or the person responsible for website maintenance:

  • The function: The startWith() function of the moinAI JavaScript API is used.

  • The documentation: A detailed technical description, including code examples, can be found in the API documentation.

  • Input: Text (e.g. a search term), forms or intents can be passed as input.

3. Use cases

  • Search bar: Users enter a term into the website’s search box. When they submit the search, the chat widget opens and the AI chatbot directly answers the relevant question based on the search term.

  • Quote button: Clicking a ‘Request a quote’ button on the website opens the chat widget directly and loads the relevant contact form, without users having to search for the form manually.