# Configuration

## General information

The settings panel has a few options to allow you to configure the Assistant. Each Assistant must have a name, and you can also add an optional description and logo.

## Welcome flow

When a user arrives on the page, the chatbot welcomes them with a flow. It can be any flow, but by default it is the **Default flow**.

If you do not want a welcome interaction at all, create an empty flow and use that as the Welcome flow!

## Menu

The Assistant channels lets you add shortcuts to either flows or external websites:

<figure><img src="https://2862118938-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6OZMoZlXP9VSWYMW_T%2Fuploads%2FOKqP6MQWSMVpH7yWX8Pt%2Fimage.png?alt=media&#x26;token=c4dfb03c-d132-48e4-ab20-603c0aad4830" alt=""><figcaption></figcaption></figure>

This will show as a list of searchable shortcuts in the sidebar in full-screen view, or at the top of the input bar in mobile/widget view:

<figure><img src="https://2862118938-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6OZMoZlXP9VSWYMW_T%2Fuploads%2FBQU0oZpnylm431GeHb64%2Fimage.png?alt=media&#x26;token=5d4eafb5-263b-4a1a-9383-aa6b7f061bc9" alt=""><figcaption><p>Full-screen view</p></figcaption></figure>

<figure><img src="https://2862118938-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6OZMoZlXP9VSWYMW_T%2Fuploads%2Fjqm47V7Rn3ZsgIp3K7Hs%2Fimage.png?alt=media&#x26;token=b9513a0d-e22b-4417-a628-42354f8c9c25" alt=""><figcaption><p>Mobile / Widget view. The + icon on the right side opens a panel with the searchable list of all shortcuts!</p></figcaption></figure>

## Autocomplete

The autocomplete feature helps your chatbot provide a list of up to 5 items that are contextualized to what the user is currently typing. Think of it as quickly hitting one of the first google search results!

![](https://2862118938-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6OZMoZlXP9VSWYMW_T%2Fuploads%2FvdSI1j9mLLPhCzhicmh5%2Fimage.png?alt=media\&token=70943732-21b8-45a1-9927-fa75791b557c)

To configure Autocomplete, you need to have a backend endpoint that will handle the requests and respond accordingly. You can configure this endpoint in the Assistant's configuration panel:

![](https://2862118938-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6OZMoZlXP9VSWYMW_T%2Fuploads%2FZBYSsgxLcayMwbWR4q1i%2Fimage.png?alt=media\&token=cf952ed6-14a5-4ad2-9b89-6309bc9ff9f6)

The request that will be performed by the Assistant will be as follows:

```
curl -X "POST" "https://my.example.com/autocomplete?token=some-auth-token" \
     -H 'Content-Type: application/json;charset=utf-8' \
     -d $'{"text": "Give me the best result"}'
```

Your endpoint must return results within 5 seconds as an `application/json` content-type, formatted as an array of maximum 5 results containing a title, optional highlighting matches, and the corresponding payload.&#x20;

```json
[
  {
    "title": "What is the best result?",
    "matches": {
      "highlights": [
        {
          "word": "What",
          "highlight": false
        },
        {
          "word": "is",
          "highlight": false
        },
        {
          "word": "the",
          "highlight": false
        },
        {
          "word": "best",
          "highlight": true
        },
        {
          "word": "result",
          "highlight": true
        },
        {
          "word": "?",
          "highlight": false
        }
      ],
      "text": "What is the best result?",
      "has_highlights": true
    },
    "payload": "RESULT_ONE_PAYLOAD"
  },
  {
    "title": "Another good result",
    "matches": {
      "highlights": [
        {
          "word": "Another",
          "highlight": false
        },
        {
          "word": "good",
          "highlight": false
        },
        {
          "word": "result",
          "highlight": true
        }
      ],
      "text": "Another nice result",
      "has_highlights": true
    },
    "payload": "ANOTHER_RESULT_PAYLOAD"
  }
]
```

When a user selects a result, it will behave as a button click where the text is displayed and the payload is sent to the chatbot.

### Enabling/disabling autocomplete

If an autocomplete endpoint is set, it will be enabled by default. However, it can be disabled or reenabled dynamically in your CSML script:

```cpp
say Autocomplete(false)
say Autocomplete(true)
```

{% hint style="info" %}
Autocomplete status is not persisted across page reloads. When reloading the page, this will always be set to `true` by default!
{% endhint %}
