If you want to save data from your users other than the data Facebook provides you, you would have to ask your users for this data.

You can do this through attributes.

If the information you’re going to gather from your user is limited to options, you can use Quick Replies and save the value to an attribute.

However, there are other types of data that you cannot restrict, so you can gather it as free text and validate it.

User Input

It is how you can accept free text from users and save it to a user attribute.

You can add user input to the flow after any message content: text, image, gallery, etc.; however, you cannot add it before or after a quick reply.

You can also validate the free text inputted by your user. By default, it will validate based on the input type, i.e., if the input type is email, then the bot will only accept email text format.

You can also add conditions to the user input according to attribute types. These conditions can help you organize your flows and customize your users' experience better as they can help you direct which flow the conversation follows based on whether the user input follows the condition or not.

Below are all the existing attributes and their relevant conditions:

If your user's input is invalid, you can guide them to providing valid information.

An example to clarify: you want to request your clients’ phone numbers. Your business only supports specific regions, so you want to make sure the entered phone number starts with a relevant country code.

Another example: you need to request a user’s company email, so you need to invalidate input from famous email providers such as Gmail, Hotmail, Outlook, or Yahoo to ensure you receive the correct data.

Did this answer your question?