Ask Email

Prompt users to provide their email addresses in WhatsApp chatbot flows with input validation and error handling.

Overview

The Ask Email action prompts users to provide their email addresses during a WhatsApp chatbot interaction. This action is useful for collecting email contact information in a structured way, ensuring that the response is a valid email. You can configure error handling and store the email address for future use in the chatbot flow.

Step-by-Step Instructions

  1. Compose Your Message:

    • Enter your message in the text field (up to 4096 characters). This message will prompt the user to provide their email address.

    • 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.

  2. Adding Variables:

    • Click on the "Add Variables" button to insert dynamic content (such as the user’s name or order details). Choose the appropriate variable from the dropdown list. Tip: Ensure the variable selected contains valid data, or the message may display incorrectly.

  3. Error Handling:

    • Error Attempt: This setting allows you to control how many incorrect attempts the user can make when responding. For instance, if they reply with a non-email format such as an image or a phone number, it will count as an invalid input.

    • Error Message: Provide a clear message when the user enters an invalid input. For example, "Please enter a valid email address."

  4. 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 another action by triggering a different flow when the error limit is reached.

    • Skip the Question: If the user consistently provides invalid responses, the bot can bypass this question and continue to the next step in the flow.

  5. Store Response in a Variable (Optional):

    • Store the user’s email response by selecting a bot variable from the dropdown. This allows the email address to be referenced later in the conversation or for follow-up purposes. Example: Store the response in a variable like user_email and access it using {variable.user_email}.

Examples

  • Email Collection for Newsletter: "Please provide your email to subscribe to our newsletter."

  • Requesting Email for Registration: "Kindly share your email to complete your registration."

FAQs

  1. What happens if the user doesn’t enter a valid email?

    • The chatbot will send an error message and allow the user a set number of retries before moving to an invalid input action.

  2. Can I validate different email formats (e.g., international domains)?

    • Yes, the action supports email formats with various domain extensions, ensuring accurate input collection.

Troubleshooting Tips

  • Invalid Response: Ensure the message asks for an email address, preventing users from sending unrelated content (e.g., images or numbers).

  • Variable Storage: Make sure the bot variable is correctly configured to store the user’s email address for future reference.

Last updated