| by Arround The Web | No comments

Collecting User Information in Botpress

Botpress offers a powerful tool called the “Capture Information Card” which enables bots to pause and gather a specific information from the users. This data can be utilized to tailor responses, offer recommendations, and create a more engaging experience. This blog explores how this feature works and the various prompt field types available in Capture Information Card.

Capturing Information with Capture Information Card

The Capture Information Card in Botpress allows chatbots to pause during a conversation and prompt the user for specific information. This information can include essential details such as the user’s name, full address, email address, phone number, or any other type of user input. The process involves creating a prompt node which can contain multiple prompt fields to gather various pieces of information.

Once the user responds to the prompts, the extracted data is stored in flow variables. These variables can then be used later in the conversation or passed on to other systems which allows for a more personalized experience and provides valuable insights to chatbot developers.

Prompt Field Types in Capture Information Card

Capture Information Card supports a wide range of prompt field types, each serving a specific purpose. Let’s explore the prompt field types available in Botpress:

  1. Single Choice: It gives the user a range of possibilities from which to choose. User selection is limited to one choice, which is then recorded as a value in a variable. This type is ideal for scenarios like survey questions or preference selection.
  2. Multi Choice: It is similar to the Single Choice type, except that the users can choose one or more options from a list. It works perfectly in situations where the users must select several items from a list of options.
  3. Boolean: It captures a binary value/data from the input and stores it in a Boolean variable. It is used for extracting values like true/false or yes/no.
  4. Confirmation: The Confirmation type seeks the user confirmation or agreement on a specific matter. It captures a binary value (true/false) to be used in the bot’s logic.
  5. Number: It obtains numerical values/data from the user input and stores them in a number-type variable. This is useful for calculations or any other scenarios that require a numerical data.
  6. Email Address: The Email Address type captures the email addresses from the user input and stores them in a string variable. This enables us to use the obtained address in other parts of the logic in the bot such as saving the email address for later use or sending an email confirmation.
  7. Phone Number: The Phone Number type extracts the phone numbers from the user’s input and saves them in a variable of type string. It’s helpful for scenarios where the phone numbers are required such as contact verification or appointment scheduling.
  8. Full Address: The Full Address type collects the user’s complete address details including the house number, street, zip code, city, and country name. The data is stored as an object variable, giving a detailed address profile.
  9. Price: It extracts the user’s price input and stores it as a number-type variable. Regardless of the currency, the amount of money is contained in the extracted information.
  10. Raw Input: The RawInput extracts the user input in its original form and stores it in a string-type variable. Any user input can be obtained such as text, strings, numbers, and special characters.
  11. Percentage: It captures the percentage value that the user enters in decimal format. This value is then stored as a number-type variable. It can extract the percentages like 20%, 45%, or any other value that the user provides.
  12. Quantity: It gathers the quantity data from the user and stores it in a number-type variable. For example, if the user enters “I can eat 2 mangos”, the Quantity type will extract 2 and save it as a numerical value, regardless of the units of measurement used.
  13. Color: The Colour type captures the color data from the user’s input and stores it in an object-type variable. The retrieved data includes the RGB values, hexadecimal code, and the name of the color.
  14. Time Measurement: The Time Measurement type extracts the date/duration values from the user’s input and saves it in a variable of type “Number” after converting it to the chosen format. It is helpful for making meetings, setting reminders, and much more.
  15. Weight Measurement: The WeightMeasurement collects the weight data from the user input and converts it to the specified format before saving it in a variable of type number. The formats that are offered are mg, mcg, mt, g, kg, oz, lb, and t.
  16. Cron Schedule: It extracts a specific period of time input by the user and transforms it into a format that the computer program can understand. It allows for scheduling tasks at particular intervals.
  17. Operating System: It captures the operating system that the user is currently using from their input, storing it in an object-type variable. This information can be valuable for troubleshooting problems that are specific to certain OS.
  18. Quantity of People: It extracts the number of people from the user input and saves it as a numerical value. For instance, if the user enters “5 students” or “3 members”, the function extracts the number 5 or 3 and stores it as a number variable.
  19. Volume Measurement: It extracts a value that represents the volume from the user’s input and stores it in a number variable after converting it to the desired format.
  20. Temperature Measurement: Using the TemperatureMeasurement type, a temperature value can be extracted from the user input and is stored in a “Number” variable. The extracted data can be in Kelvin, Celsius, or Fahrenheit.
  21. Person: It is used to extract a person’s name from the user input such as when you ask to provide the name of a customer or a contact. The “Person” type captures the first and last names once the user enters the name, then stores it in an object variable.
  22. DateTime: It can extract the date or duration values from the user input and stores them in an object-type variable. This versatile prompt field can capture various date and time expressions such as “after 1 week”, “in two months”, “in 10 days”, “four working days”, or any other duration or date value provided by the user.

The extraordinary capacity of Botpress to collect a range of user data enables the development of personalized and contextually relevant interactions. Chatbots can personalize their responses, make useful recommendations, and deliver an information that matches the users’ preferences by making use of this data. The user experience is considerably improved by incorporating personalized greetings, targeted offers, and context-aware responses which increases the customer satisfaction and loyalty.

Conclusion

In Botpress, the Capture Information Card empowers chatbots to gather the important user information which leads to personalized interactions. With a variety of prompt field types, chatbots can cater to different user inputs. Using this data to personalize the responses, chatbots create an engaging and user-centric experience, making them valuable tools for businesses across industries. As technology progresses, capturing and using the user information will continue to be crucial for delivering exceptional chatbot interactions.

Share Button

Source: linuxhint.com

Leave a Reply