> For the complete documentation index, see [llms.txt](https://docs.ownchat.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ownchat.app/bot/ask-action/ask-number.md).

# Ask Number

The **Ask Number** action allows the chatbot to collect **numeric input from users** during a conversation.

This action ensures that users enter **valid numbers only**, preventing text or unsupported input types. It is useful when collecting data such as quantities, order numbers, or numerical responses.

The entered value is stored in a variable and can be used later in the chatbot workflow for automation, calculations, or conditional logic.

{% embed url="<https://app.supademo.com/demo/cmm8zss1d5lu9dtfhh97a03ns?utm_source=link>" %}

### **When to Use Ask Number**

Use the **Ask Number** action when the chatbot requires **numeric input from the user**.

**Common Use Cases**

* Product quantity selection
* Number of guests for reservations
* Order ID collection
* Customer age input
* Survey rating values

Example interaction:

Bot: How many items would you like to order today?\
\
User: 3

The chatbot stores the number **3** in a variable for further processing.

### **How to Add Ask Number**

Follow these steps to add an Ask Number action to your bot workflow.

* Open **Bot Builder**
* Click **Add Node**

{% embed url="<https://app.supademo.com/demo/cmp6g76rc00xt1q0jxhoz7r3l?utm_source=link>" %}

* Select the **Ask** tab
* Choose **Ask Number**

{% embed url="<https://app.supademo.com/demo/cmp6g8h0u00vc3x0jymy74hvl?utm_source=link>" %}

* Configure the required fields
* Click **Create**

Once added, the chatbot will pause at this step until the user provides a valid numeric response.

### **Ask Number Configuration**

When configuring the Ask Number action, several fields must be completed.

#### **Action Name**

The **Action Name** identifies the Ask Number action inside the bot workflow.

{% embed url="<https://app.supademo.com/demo/cmp6h9jws01571q0jrvedxum3?utm_source=link>" %}

This name is visible only within the bot builder.

Example:

Ask Numeric Response\
Order Quantity\
Guest Count Input

#### **Message**

The **Message** field contains the question displayed to the user.

{% embed url="<https://app.supademo.com/demo/cmp6haob900rxzx0jzapoluii?utm_source=link>" %}

Example:

Hi {{customer.name}} 👋\
\
How many items would you like to order today?

The message supports:

* Dynamic variables
* Text formatting
* Emojis

Variables can be inserted using the **Add Variable** option.

#### **Adding Variables**

The **Add Variable** feature allows dynamic values to be inserted into the message.

{% embed url="<https://app.supademo.com/demo/cmp6hbqox01591q0jnp06wyrq?utm_source=link>" %}

Examples include:

{% embed url="<https://app.supademo.com/demo/cmp6hfs0z00rzzx0jc71vhr7o?utm_source=link>" %}

* Customer name
* Phone number
* Email
* Contact information

Example:

Hi {{customer.name}}

This helps personalize the chatbot interaction.

#### **Error Attempt**

The **Error Attempt** field defines the number of invalid responses allowed.

{% embed url="<https://app.supademo.com/demo/cmp6hgqhy00x13x0jc3dn16kg?utm_source=link>" %}

Example:

Error Attempt: 2

If the user enters invalid input multiple times, the chatbot will trigger the configured **Action on Invalid**.

#### **Error Message**

The **Error Message** appears when the user enters an invalid response.

{% embed url="<https://app.supademo.com/demo/cmp6hjuoy016h1q0j3mjyiikf?utm_source=link>" %}

Example:

Please enter a valid number between 1 and 50.

This guides users to provide the correct type of input.

#### **Action on Invalid**

This option determines what happens if the user exceeds the allowed error attempts.

{% embed url="<https://app.supademo.com/demo/cmp6hx9gz01aa1q0jwmkf5q8o?utm_source=link>" %}

Available options include:

**End the Flow**

Stops the chatbot conversation.

**Skip the Question**

Allows the chatbot to continue without collecting the response.

**Fall Back Flow**

Redirects the user to another predefined action.

#### **Validation Settings**

The **Validation Setting** ensures that the number entered by the user falls within a defined range.

{% embed url="<https://app.supademo.com/demo/cmp6hyc0t01ac1q0jr373b4lb?utm_source=link>" %}

When enabled, you can configure:

**Minimum Value**

Defines the smallest acceptable number.

Example:

Min Value: 1

**Maximum Value**

Defines the largest acceptable number.

Example:

Max Value: 50

If the user enters a number outside this range, the system will display the error message.

{% embed url="<https://app.supademo.com/demo/cmp6i0tq600xl3x0jeiip865l?utm_source=link>" %}

### **Store Response in Variable**

The **Store Response in Variable** field saves the numeric input for later use.

{% embed url="<https://app.supademo.com/demo/cmp6i1pou01aq1q0jpzfqsf2a?utm_source=link>" %}

Example variable:

order\_quantity

This stored value can be used for:

* Order processing
* Conditional logic
* Reporting and analytics
* Personalized chatbot responses

### Save and Deploy &#x20;

After configuring the action:

1. Click **Create** to add the action to the flow<br>

{% embed url="<https://app.supademo.com/demo/cmp6i2qnt002z1s0jhvgek8ih?utm_source=link>" %}

2. Connect the node appropriately

Click **Publish** to deploy the configuration

#### **Example Ask Number Interaction**

Example chatbot conversation:

Bot: Hi John 👋\
How many items would you like to order today?\
\
User: 4

The chatbot stores the response in the variable:

order\_quantity

and continues to the next step in the workflow.

### **Best Practices**

Follow these recommendations when using Ask Number.

**Ask clear numeric questions**

Ensure users understand they must enter a number.

**Use validation ranges**

Set minimum and maximum values when applicable.

**Provide helpful error messages**

Guide users when incorrect input is entered.

**Personalize messages**

Include dynamic variables such as the customer's name.

**Store numeric responses**

Save responses in variables for future automation.

### **Summary**

The **Ask Number** action enables chatbots to collect **numeric responses from users** with built-in validation.

{% embed url="<https://app.supademo.com/demo/cmp6i458e00v2zx0juv2vqskx?utm_source=link>" %}

With Ask Number, you can:

* Collect numeric data from users
* Prevent invalid text input
* Define minimum and maximum numeric ranges
* Handle invalid responses automatically
* Store numeric responses for automation and workflow logic

This feature helps ensure **accurate and structured numeric data collection in chatbot interactions**.
