Ask Number
Use the Ask Number action in WhatsApp automation to gather numeric inputs and validate user responses in your chatbot flow.
Overview
The Ask Number action allows you to prompt users to respond with a numeric input. This is especially useful for collecting data like phone numbers, quantities, or other numerical values in a WhatsApp chatbot flow. You can customize the input validation, and error handling, and store the user’s response in a variable for future use in the chatbot journey.
Step-by-Step Instructions
Compose Your Message:
Enter your message in the text field (up to 4096 characters). This is what the user will see as a prompt to respond with a number.
Format the text for better readability and emphasis:
Bold: Select the text and click the "B" button to enclose it in double asterisks (
*).Italic: Highlight text and click the "I" button to enclose it in underscores (
_).Strikethrough: Select text and click the "s" button to enclose it in tildes (
~).
You can also add emojis by clicking on the emoji icon.
Adding Variables:
If you need to insert dynamic content (such as the user's name or account details), click on the "Add Variables" button. Choose the relevant variable from the dropdown list. Tip: Ensure the variable you choose has valid data, or the message may appear incomplete.
Error Handling:
Error Attempt: This setting allows you to control how many incorrect attempts the user can make when responding to your message. For example, if they reply with an image instead of a number, it counts as an invalid attempt.
Error Message: If the user provides an invalid input, you can send them an error message guiding them to provide the correct format. For instance, "Please respond with a valid number."
Action on Invalid Input:
End the Flow: If the user exceeds the maximum number of error attempts, the chatbot flow will terminate.
Fall Back Flow: Alternatively, you can trigger a fallback action, such as redirecting the user to another part of the chatbot flow.
Skip the Question: This option allows the flow to proceed to the next action, bypassing the current question if the user continues to respond incorrectly.
Validation Settings (Optional):
Min Value: Set the minimum numeric value the user must provide. For example, if collecting age, you might set the minimum to 18.
Max Value: Set the maximum allowable value, such as a maximum count or threshold.
Store Response in a Variable (Optional):
Store the user’s numeric response in a bot variable for future use in the chatbot flow. Example: If the variable is named
user_input, you can access it later using{variable.user_input}the chatbot.
Examples
Requesting Age: "Please enter your age." (Min Value: 18, Max Value: 120)
Requesting Quantity: "How many items would you like to order?" (Min Value: 1, Max Value: 100)
FAQs
What happens if the user doesn't respond with a number?
You can set an error message and decide whether to allow multiple attempts or redirect the user to another flow.
How can I store the user's response?
You can store the response in a bot variable, which allows you to access it later in the chatbot flow.
Troubleshooting Tips
Invalid Response: Ensure that your error messages clearly instruct users to respond with a number, not other types of media.
Variable Display: Check that any dynamic variables used in the message have valid data to avoid empty placeholders.
Last updated