Collect customer phone numbers with a chatbot.
The phone-number entity helps your bot recognize phone numbers written in all popular standards — with country code, dashes, and brackets. The system checks if the input written by a user on chat resembles the phone number. You can then save the collected phone number and reuse it in the ongoing conversation or pass it to your databases.
How to use the phone number entity
Let’s say you want to use a chatbot to collect leads. The phone number entity can help you validate and gather phone contacts so your agents can call your leads later.
-
Open a Story you want to use to collect leads.
-
Add a Question action in a place where you want to ask the user about their phone number.
-
In the Question variant field, ask the user about their phone number.
-
Now, you need to verify the user input. Select the system Phone number entity in the Validate response with entity to do so.
-
Once the user input is validated, you can save the user response as an attribute.
-
For the purpose of this Story, create a custom phoneNumber attribute. Then click Add attribute and close the window.
-
Now, you decide what should happen if the user fails to provide the phone number.
-
Once you successfully collect the phone number, you can confirm the collected data with the user. To do so, add a Bot response after the Success block.
-
Now, compose the bot’s response. You can use a custom phoneNumber attribute you created to display the user’s number on chat.
-
Finally, test your chatbot to see if everything works as expected.