# Ask Text

> **Who can use this Card?**
>
> * Gallabox Users having permission to either build and deploy bots or manage bots.
> * Available on all Paid Plans.

## **Understanding "Ask Text"**

"**Ask Text**" Card in Gallabox lets bots ask users open-ended questions, making conversations more fun. Users can share their thoughts, opinions, or give info based on the questions. This user-generated text can be stored in a designated variable, allowing you to use that data in your BotFlow.&#x20;

{% hint style="info" %}
You can ask the customer a question as a **Text** or as a **Voice**.
{% endhint %}

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2Ff85CRjqZKcxyviQBSTq8%2FAsk%20-%20Text.gif?alt=media&#x26;token=c61690cc-5b7c-4e3b-be9e-a87e45e099c6" alt=""><figcaption></figcaption></figure>

## **Ask as Text Essentials**

Learn the basics of the "Ask as Text" option in Ask Text Card to make talking to users more interesting.

### **Question Text**

This is the question you want to ask users. Make it clear and short so users know what you're asking.

{% hint style="info" %}
The **Question text** can be made **Bold**, *Italic*, or ~~strikethrough~~ using the options provided. The text will add the asterisk(\*) for **Bold**, Underscore(\_) for **Italic text**, and Tilde(\~) for **Strikethrough** around the text.
{% endhint %}

## **Ask as Voice Essentials**

The Ask as a Voice feature in Gallabox's Ask Text Bot Card lets users talk to submit their answers, making it easy and fun to interact.

You can either choose **AI voice** or a **Record** option.

For generating AI voice, you have to type in the Question Text, select the desired voice from the drop-down, and click on Generate Voice Button.

The Question text will be changed into voice. You can listen to it, change playback speed before saving the card to be used in the bot.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FiqvwlHPjJOAx8oKE29vO%2FAI%20Voice%20-%20Ask%20Text.gif?alt=media&#x26;token=f9329083-ec3c-46c6-b8b4-18300627f987" alt=""><figcaption></figcaption></figure>

If you want to send a message in your voice, use Record option. Just press the record Button to record. To stop recording, click on Stop Recording.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FS05H2XbtGO8V3fGVgAov%2FRecord%20-%20Ask%20Voice.gif?alt=media&#x26;token=9d2eb6bd-9a4f-4608-804d-4cf298872f22" alt=""><figcaption></figcaption></figure>

To know about Storing User Responses, go to [#creating-variables](https://docs.gallabox.com/bot-essentials#creating-variables "mention") and know about validation settings [here](https://docs.gallabox.com/bot-essentials#validation-settings-for-cards).&#x20;

{% hint style="success" %}
PRO TIP: Use Variables in the **Question Text** and in the **Validation Error Message** to make it more personalized.
{% endhint %}

## **Implementation Example:**

Imagine you are asking your customers for their **PAN Card** to evaluate their Financial profile. The Ask Text question type with validation settings will make sure users give helpful responses within a specific character limit.

For the **Question Text** you can enter: *Enter your PAN Card details to evaluate your profile.*

You have the option to **store the user response** in the variable. You can create a variable - `user_details` for example to store the user response.

<figure><img src="broken-reference" alt=""><figcaption></figcaption></figure>

Now for the **validation settings**, you could provide the **attempt** limit as 1, Validation Error Message is optional. Provide the **Action on Invalid Response**, and turn on the Additional Validation Settings.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2F5pf4FqW4k7MzhMyskpF3%2FValidation%20Settings%20in%20Ask%20Text.gif?alt=media&#x26;token=c2be782a-f6aa-4d49-a42b-656ab79febce" alt=""><figcaption></figcaption></figure>

In the additional validation settings, provide the **Minimum character, Maximum character, Regex.** The PAN Card number is of 10 digits meaning the minimum characters and the maximum characters are 10.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FS3uk8BNPKpom6Ugvrb2Q%2FMaximum%20and%20Minimium%20Characters.gif?alt=media&#x26;token=f1e0c730-018a-4d17-9e18-8e86c0356aa6" alt=""><figcaption></figcaption></figure>

The first five characters of a PAN Card are letters (**in uppercase by default**), followed by four numerals, and the last (tenth) character is a letter. To capture this you could use a regex -  <mark style="background-color:blue;">**^\[A-Z]{5}\[0-9]{4}\[A-Z]{1}$**</mark>  to make sure that the user enters a valid **PAN Number** which matches the following criteria's:

* The PAN Card number must be ten characters long.
* The first five characters must be uppercase letters.
* The next four characters must be numbers.
* The last character must be an uppercase letter.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2Fwum5s26Jj2qfrwr1W5BW%2FRegex%20in%20Ask%20Text.gif?alt=media&#x26;token=fefa2e88-dcb5-4add-9008-6fdcca8abdc4" alt=""><figcaption></figcaption></figure>

## Sample Flow Using Ask Text Card

### In Gallabox Bot Interface:

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FPugs8E1crvTNYDvnZQze%2FAsk%20Text%20Card%20in%20Gallabox%20Interface.png?alt=media&#x26;token=99fe7b91-2b31-4596-8a33-5c507e427801" alt=""><figcaption></figcaption></figure>

### In WhatsApp:

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FjZyFgIvKJRy5kOz52VER%2FAsk%20Text%20Sample%20Flow.gif?alt=media&#x26;token=d6c8f428-1ee2-4200-a3f0-7924c7086b83" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The above sample flow is for you to understand how "**Ask Text**" Card works and it's usage. It is not a representation of what can be achieved with Gallabox.&#x20;
{% endhint %}
