Ask Address

Prompt users to submit address information in your WhatsApp chatbot using the Ask Address action with error handling and response storage.

Overview

The Ask Address action allows the bot to prompt users to provide their full address information, including fields such as name, phone number, city, state, and postal code. This action is vital for collecting detailed address information in processes like deliveries or registrations.

Step-by-Step Instructions

  1. Compose Your Message:

    • Enter a message to request the user's address. The message can be up to 4096 characters.

    • You can enhance your message using text formatting:

      • Bold: Select 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 text and click the "s" button to enclose it in tildes (~).

    • Add emojis by clicking the emoji icon to enhance the message.

  2. Adding Variables:

    • Insert dynamic content into your message by clicking "Add Variables". For example, you can add user-specific details such as name, making the message more personalized. Tip: Ensure that the variables contain relevant data to display correctly.

  3. Fill Predefined Values (Optional):

    • Enable this option to prefill the form fields with known values. For example, if the user’s city or state is already known, these fields can be automatically filled.

  4. Error Handling:

    • Error Attempt: Define how many wrong inputs (e.g., text or media instead of a valid address form) the bot will allow before triggering an error. This helps ensure that only valid address data is submitted.

    • Error Message: Create an error message to notify the user when they have submitted invalid data. Example: "Please enter a valid address using the form."

  5. Action on Invalid Input:

    • End the Flow: Stop the flow if the user exceeds the number of invalid attempts. The bot will no longer continue to the next action.

    • Fall Back Flow: Trigger an alternative flow when the user fails to provide valid input after several attempts. This helps maintain engagement.

    • Skip the Question: If the user does not provide valid input, the bot will skip this action and move on to the next one in the flow.

  6. Store Response in a Variable (Optional):

    • Select a bot variable from the dropdown to store the user’s submitted address. This makes it easier to use the address in later actions. Example: The user’s full address can be stored in a variable address_message for future use.

{
  "response_json": "{\"values\":{\"in_pin_code\":\"627005\",\"landmark_area\":\"ten\",\"address\":\"110\",\"city\":\"Tirunelveli\",\"name\":\"John Doe\",\"phone_number\":\"8754105632\",\"state\":\"Tamilnadu\"}}",
  "body": "John Doe\n8754105632\n627005, 110, ten, Tirunelveli, Tamilnadu",
  "name": "address_message"
}

Examples

  • Address Request: "Please provide your address including your name, phone number, city, and postal code for delivery."

  • Predefined Fields: Prefill known details like the user's city or postal code if they have been provided earlier.

FAQs

  1. What fields are included in the Ask Address action?

    • The form typically includes fields like name, phone number, address, city, state, and postal code.

  2. Can the user prefill some fields?

    • Yes, the bot can prefill known values like city or postal code, depending on the user’s prior interactions.

  3. What happens if the user provides an invalid address?

    • The bot will follow the error handling steps defined, which can include retry attempts, fallback actions, or skipping the question.

Troubleshooting Tips

  • Invalid Address Submission: Make sure the form is communicated in the message, and all necessary fields are included.

  • Too Many Invalid Attempts: Adjust the error attempt limit to suit your use case if users are having trouble submitting valid addresses.

Last updated