Steps: Collect Custom Data

Ask custom questions and save the visitor's answer to an attribute.

You can use this step to ask questions to your visitors and save their responses to custom attributes to use them later on. 


steps-collect-custom-data-card


If you are unfamiliar with the concept of an attribute, please refer to this article.


Consider an attribute to be like a folder that can be named and where you can save "things". In this case, "things" are values (texts, numbers, dates, etc...).


To start, drag and drop the step. It will open the Edit tab. First, you need to select an entity to define what kind of data you want to collect from your visitors. 


If you are unfamiliar with the concept of an entity, please refer to this article.


steps-collect-custom-data-drag


After the entity selection, you need to type the attribute that you want to save the responses to.


steps-collect-custom-data-edit


Since you want to ask questions to your visitors with this step, you need to enter random prompts to be shown to your visitors. What do you want to ask them? Just type and come back.


steps-collect-custom-data-random-prompt

Validation Message


If your visitors don’t give responses like you want them to, you can ask them differently. For example, if you are asking for a number, your visitors should give you a number. If they don’t, the system will not accept the response for the validation and will ask the same question again. This validation message helps you to ask the question in a different way so that you don’t need to ask the same question again and again. 


steps-collect-contact-property-validation


Custom Validation Regex Expressions


Searching for patterns in a stream of text can be done by using regular expressions. You can create patterns to help you locate a specific pattern.


If you add custom regex validations in this step, you can be more proactive in double checking the responses of your visitors.


steps-collect-contact-property-regex


If you are unfamiliar with the concept of regular expressions, please check here.


For example, if you want to ask about their Social Security Number, a regex rule can be added to limit the user to typing a certain format. In the United States, this would be a 9-digit number; while in Turkey this would be an 11-digit number.


In this case, if a Turkish citizen is asked for their Social Security Number, it is expected to get an 11-digit number. If the visitor enters anything but an 11-digit number, the validation message will be shown. 


Fallback Rules


If your visitors don't give you the responses you want, you can set fallback rules to show the bot what to do in these scenarios and when. 


steps-collect-contact-property-add-fallback


Click on the Add fallback rules button. Now you need to select the fallback count: How many times should the bot ask the question to get the right response? If this count is reached, the bot will direct the visitors to another step that you define.

steps-collect-contact-property-fallback


Please note that if you select sys.date, sys.time, or sys.datetime, there is a selection for the popup calendar that only works with the Web Widget, and for the date period that allows you to select the date range: All, Past, Future.

For example, if you select all, your visitors can select a date on the calendar without any restrictions. If it’s Past, your visitors can only select a date from the past.


steps-collect-custom-data-calendar

As a last step, click on the Save button to save all your changes.