The Open Field feature allows the chatbot to collect personalized user information.
This setting can be used to capture any type of textual input or validate specific data, such as emails and phone numbers.
In this article, we will explain how to configure the open field in your chatbot using a sample flow.
Example flow
The flow presented above uses the Open Field in the chatbot's initial block to collect user information.
The chatbot starts with a greeting message and asks the user to enter some information.
The user responds with free text, and the chatbot stores this input.
Next, the chatbot displays a personalized message using the collected data.
The flow then moves on to the inquiry option and ends the conversation.
Now, let's see how to configure it in practice.
How to configure the Open field
In the bot builder, click on the block where you want to add the field. The block details modal will open.
Click on Add Content > Open Field.
Defining the field type
The Open Field can be configured in two ways:
Free: Allows the chatbot to receive any text input from the user without restrictions.
With validation: Allows the chatbot to validate the user's input in specific formats, including:
🚗 Vehicle license plate
🔢 Regular expression (Regex)
📄 CPF or CNPJ
📞 Phone number
📍 ZIP code
You can also set the maximum number of attempts (up to 3) and customize error messages for each one, guiding the user to provide valid data.
Using Variables in the Open Field
Whenever you request data from the user and want to use it during the interaction, you need to use the corresponding variable.
For example, if you ask for the user's name and want to use it to personalize the response, you should insert the variable <?$name?> .
This way, the chatbot will replace <?$name?> with the previously collected user name, making the interaction more personalized.
Finally, after configuring everything, click Save Changes and then Test Chatbot to see how the flow works in practice.