Sys.phone-number

Luiza Jurczyk
2 min read
updated: Mar 9, 2022

Getting your clients` phone number is an easy and natural way to stay in touch. Thanks to the system entities, your bot can do it for you.

The phone-number entity helps your bot to recognize phone numbers in all popular standards — with country code, dashes, and brackets. The system checks if the user input is correct and memorizes the given contact number so you can reuse it in the ongoing conversation or pass it to your web services and databases.

Chatbot example with the sys.phone-number entityLink icon

Your bot isn’t omniscient and even its best configuration may leave some of your clients without the answer. In this quick example, we’ll build an interaction that collects the phone number from clients that ask questions that cannot be recognized by the bot.

Type double curly brackets {{ to trigger the entity window and select the one you you need.
Type double curly brackets {{ to trigger the entity window and select the one you you need.
  1. Create a new story and name it Get phone number. Inside the story add a new interaction with the same name. Ask a Question is the best bot action to collect user data. Add it to the bot responses.

  2. Type your message and select the phone-number system entity as the validation type. Also, decide the name for the new attribute.

  3. Add a text message to confirm that the phone number has been saved.

  4. Let’s connect this interaction with the default fallback interaction. Add the following filter: Lifespan > 0 to your default fallback response.

  5. When the fallback equals 0, order your bot to ask for the phone number. To do so, add the go to action that jumps to our Get phone number interaction.

  6. Save your work and test out the bot.

Was this article helpful?

Got it!

Thanks for your feedback.

Thank you!

We’re happy to help.

Start a free ChatBot trial
and build your first chatbot today!

Free 14-day trial No credit card required

Discover our other products