# Database Quick Reply Buttons Action

Use this action to display multiple dynamic buttons based on a Xenioo Database collection query.

![](https://2532694803-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvGYwUmVjfELEiJzfmWLC%2Fuploads%2FZz3EA0zgLDnhHGgAIjCZ%2Fimage.png?alt=media\&token=3a13b4af-9d19-4f58-a80d-49a33e6d8111)

### Settings

The action uses the following settings:

| Setting        | Description                                                                                    | [Parsed](https://docs.xenioo.com/actions-and-operations/dynamic-parsing) |
| -------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| Payload        | The unique identifier of the button that can be retrieved when the user clicks it.             | :white\_check\_mark:                                                     |
| Text           | The text of the quick reply button. This is the text of the button.                            | :white\_check\_mark:                                                     |
| Alternate Text | Text to be used on any text-only channel (e.g. WhatsApp)                                       | :white\_check\_mark:                                                     |
| Expression     | Standard Xenioo expression that can be used to trigger this button from standard users message | :white\_check\_mark:                                                     |
| Image          | The url of the image that will be displayed on the button                                      | :white\_check\_mark:                                                     |

### Remarks

This action will display as many buttons as the records returned by the current [Database Query](https://docs.xenioo.com/database/database-api-access/query-collection-1).

The dynamic contents of each button can be set using standard dynamic parsing variables referencing the **cursor\_current\_record** variable. If, as an example, we would like to display the field "ButtonText" of our current collection query inside the Text of our buttons we would just specify it like this:

```
{{cursor_current_record.ButtonText}}
```

Any other current variable is of course supported in all parsed fields.

As the user clicks any of the buttons created by this action, the **last\_command** variable will be set with the Payload value or, if empty, with the Text value.

{% hint style="warning" %}
[Telegram ](https://docs.xenioo.com/basic-concepts/publishing/channels/telegram)does not allow buttons to be displayed without any preceding text. Please make sure to have at [least one text bubble](https://docs.xenioo.com/actions-and-operations/content/xenioo.bots.actions.base.textaction) before any quick button or no button will be displayed.
{% endhint %}

### Trigger

On Click. This action will trigger any child operation as the user clicks the associated chat button.

### Variables

This action produces the following variables after being triggered:

| Variable      | Description                                    |
| ------------- | ---------------------------------------------- |
| last\_command | The parsed content of the Button Title setting |

### Availability

Channel specific availability follows the table below:

| Channel          | Availability                                                                                                                                                                 |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Facebook         | Fully Available. A maximum of 11 buttons can be displayed at once.                                                                                                           |
| WhatsApp         | Fully Available.                                                                                                                                                             |
| Telegram         | Fully Available. Can only be displayed after a [text bubble](https://docs.xenioo.com/actions-and-operations/content/xenioo.bots.actions.base.textaction) has been displayed. |
| Web              | Fully Available                                                                                                                                                              |
| Alexa            | **Not Available**                                                                                                                                                            |
| Google Assistant | *Available only on Screen enabled devices.Other devices will ignore the content.*                                                                                            |
| Slack            | Fully Available                                                                                                                                                              |
| API              | Fully Available                                                                                                                                                              |

This action can be used only inside interactions and not as child of other actions.&#x20;
