Ask Phone Number
Prompt users to provide their phone numbers in WhatsApp chatbot flows with validation and error handling.
Overview
The Ask Phone Number action prompts users to provide their phone numbers in a WhatsApp chatbot flow. This action is useful for collecting user contact details in a structured way, ensuring that the response is a valid phone number. You can configure input validation, error handling, and store the phone number for future use in the chatbot flow.
Step-by-Step Instructions
Compose Your Message:
Enter your message in the text field (up to 4096 characters). This message will prompt the user to provide their phone number.
Format the message to improve readability and emphasis:
Bold: Select the text and click the "B" button to enclose it in double asterisks (
*).Italic: Highlight the text and click the "I" button to enclose it in underscores (
_).Strikethrough: Select the text and click the "s" button to enclose it in tildes (
~).
Add emojis by clicking on the emoji icon to make the message more engaging.
Adding Variables:
Click on the "Add Variables" button to insert dynamic content (such as the user's name or account details). Choose the appropriate variable from the dropdown list. Tip: Make sure the variable you choose contains valid data, or the message may display incorrectly.
Error Handling:
Error Attempt: This setting controls how many incorrect attempts a user can make when responding. For example, if they respond with an image or non-numeric text, this will count as an invalid attempt.
Error Message: Provide a clear message when the user enters an invalid input. For example, "Please enter a valid phone number."
Action on Invalid Input:
End the Flow: If the user exceeds the maximum allowed error attempts, the chatbot will stop the current flow.
Fall Back Flow: Redirect the user to an alternative action by triggering a different flow upon reaching the error limit.
Skip the Question: If invalid inputs persist, the bot can bypass this question and continue to the next step in the flow.
Validation Settings (Optional):
Min Characters: Set the minimum number of characters required for the phone number (e.g., 10 digits for local phone numbers).
Max Characters: Set the maximum allowable characters for the phone number (e.g., 15 digits for international numbers).
Store Response in a Variable (Optional):
You can save the user’s phone number in a bot variable for future use in the chatbot flow. This is especially useful for referencing the number in later stages of the conversation. Example: Store the response in a variable like
phone_numberand access it later using{variable.phone_number}.
Examples
Collecting Contact Details: "Please provide your phone number to proceed with your registration."
Requesting Phone Number for Support: "To continue with support, kindly share your phone number."
Last updated