Szczegóły lekcji

In this video we'll discuss different use cases of saving chatbot answers as attributes in the system. Learn how to effectively collect data about your users and save them as their attributes.


Let’s now discuss in a little more detail the possibility of saving data pieces collected by a chatbot as user attributes. It’s extremely convenient and, if correctly set up, can gather useful information for you 24/7 and so saves time of your support agents. I’m in the Automations section, already in one of the chatbot automation paths we created. As you already know, in the module “Bot message”, right below specifying the answer type, there is a toggle we can activate if we want to save a given answer as an attribute. This option is always available, regardless of the answer type selected. After activation, we can access the full list of standard and custom user attributes existing in our app. Remember that to be able to save an answer as a custom attribute of your choice, you need to first create this attribute in the system. You can easily do that by going to Settings -> User data & events and User attributes. So let’s say you want to ask about user’s name and save it as “First name” attribute. I’m setting an answer type to text and selecting “First name” as the attribute that needs to be updated. So we see a new anonymous person has just entered my site. But now, after providing their name, the attribute has been successfully updated. A great thing is that you can use an attribute that you’ve just collected in the same conversation! Important note: a user’s attribute data type, like for example “string” or “integer”, is superior to the answer type. In other words, if a chatbot asks a user about their age and in the automation we set “answer type” to “text”, but the custom attribute “Age” has its type set to “integer”, a user’s answer will be saved as an integer, as long as it really is an integer!!! If a user types in an answer not matching the data type of an attribute, like for example 45.5, the number won’t be saved and the attribute value for “age” won’t be updated! To avoid that and to unable users to provide incorrect formats, remember to select a proper answer type! For example if we want to collect a user’s shoe size and save it as a float attribute, set answer type to “float”. Thanks to this, users will be able to provide only numbers or numbers with decimal place, it won’t be possible to type in letters. And we see it’s been successfully saved as a shoe size! Another useful example is asking users to provide their birthday. Everyone likes receiving birthday wishes and special bday offers :). To make sure the date is saved correctly as a “birthday” date attribute, select “date” as an answer type. And we now see the answer has been saved as a user’s attribute. I hope we’ve cleared saving answers as attributes up! Thanks for your time.