# Buttons

Buttons offers a rich UX for users by showing them a list of predefined options to choose from. This makes the chat more conversational.

<figure><img src="/files/7BHXqAwFuoRFcny0HepO" alt=""><figcaption></figcaption></figure>

The button action block is made up of 3 things:

### Question <a href="#question" id="question"></a>

A question that explains the user to choose from the list of buttons displayed.

For example, “What do you need assistance in?”.

### Options <a href="#options" id="options"></a>

Along with the question, we show a list of pre-defined options that the user can choose from.

These buttons are generally of two types:

#### Branch buttons <a href="#branch-buttons" id="branch-buttons"></a>

Adding a branch button, adds a grey color node on the canvas. Using this node you can create different paths for each button in the chat flow.

For example, you can have a question like “How often do you shop online?” with the buttons,

* Every other day
* Once in a week
* Once in a month
* Rarely

NOTE: You can add up to 10 buttons only.

#### URL buttons <a href="#url-buttons" id="url-buttons"></a>

Adding a URL button, allows you to open a webpage when that button is selected.

For example, you can have a button which says “Read case study” which when clicked opens a webpage on a new tab.

#### Variables <a href="#variables" id="variables"></a>

Variables are used to store the button selected by the user, so you can reference it for later use.

You can either choose an existing variable from the dropdown or create a new one.

[Learn more about varaibles here.](/wotsabot-help-articles/variables.md)

### Some more button settings <a href="#some-more-button-settings" id="some-more-button-settings"></a>

#### Search <a href="#search" id="search"></a>

Enabling it shows a searchbox on top of the list of buttons, so that users can easily find the option they are looking for.

This is really helpful when you have a huge list of buttons.

<figure><img src="https://help.wotnot.io/~gitbook/image?url=https%3A%2F%2F360969599-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FsrMxU8nO3RjusUiYuXBB%252Fuploads%252FVv5e2S2Gj9LjmR2H4xFh%252FCleanShot%25202024-05-04%2520at%252018.54.36.png%3Falt%3Dmedia%26token%3D6f7401cd-6cf6-46cb-98f8-44772c38a11b&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=f8969baaad4fb61be38f7842b58118b3894f013c6b9b5b90d058e67664c86be9" alt=""><figcaption></figcaption></figure>

#### Multi-select <a href="#multi-select" id="multi-select"></a>

Allows the user to select multiple buttons at a time. After choosing the required buttons, user would need to hit “Send” to proceed to the next step in the chat flow.

When using multi-select, the flow will always route to the “Default” branch.

When using variables for multi-select, all values will be stored in a comma separated format i.e. “Fever, cough”.

<figure><img src="https://help.wotnot.io/~gitbook/image?url=https%3A%2F%2F360969599-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FsrMxU8nO3RjusUiYuXBB%252Fuploads%252FxfaQ1vy6bjlzdmh5nma8%252FCleanShot%25202024-05-04%2520at%252018.56.56.png%3Falt%3Dmedia%26token%3D1db3dd4d-bc40-403d-872b-3c953196338c&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=7c8a5ac308cebb311dc0a891898d0fe23096b005d23689b4148fa8e241693cca" alt=""><figcaption></figcaption></figure>

#### Buttons layout <a href="#buttons-layout" id="buttons-layout"></a>

Renders the button in the specified format:

* **Horizontal** – Horizontal placement of buttons as per available space.
* **Vertical** – Each item is displayed in a new line.

<figure><img src="https://help.wotnot.io/~gitbook/image?url=https%3A%2F%2F360969599-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FsrMxU8nO3RjusUiYuXBB%252Fuploads%252FhBErbCulnpMu3dx3tmmX%252FGroup%25201.png%3Falt%3Dmedia%26token%3D5b91f25f-5493-41af-9686-c6bbd2424bd3&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=caffea61a1746c1fff96f29906254655cc38fe13217fee3d488478379c7bde4a" alt=""><figcaption></figcaption></figure>

#### Buttons sorting <a href="#buttons-sorting" id="buttons-sorting"></a>

You can choose to sort the list of buttons in the following order:

* A - Z – In an ascending order starting from A.
* Z - A – In a descending order starting from Z.
* Random – Button list will be randomized
* As defined – The order as displayed in the action panel.

\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.wotsabot.ai/wotsabot-help-articles/bot-builder/action-blocks/buttons.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
