Skip to main content
Solved

Requirements for 9-Digit Game Numbers from Players

  • October 29, 2024
  • 9 replies
  • 87 views

Arman Shayan

Hi Community!

We need to collect information from players; their game number consists of 9 digits. The task is: how to phrase the requirement so that the bot asks for exactly 9 digits? If the user enters fewer or more than 9 digits, the bot should prompt them to enter a 9-digit game account number.

 

Best answer by Fabio Gaulke

Hi, @Arman Shayan!

 

You can build something like this:

  1. You will ask the user for the 9 digit number and store it into a Custom User Field (TEST_NUM_FIELD in my example)
  2. As @Gustavo Boregio said, a Condition checking if the Custom Field (TEST_NUM_FIELD) is greater than or equal to 100000000 and less than or equal to 999999999.
  3. If the number has more or less than 9 digits, it goes back and asks again for a number
  4. If the number has 9 digits, it will continue your flow.
  • To create the Custom User Field go to Settings/ Fields/ User Fields (remember to create it as Number type 😉)

 

Hope it helps! 🙌

 

9 replies

Gustavo Boregio
Forum|alt.badge.img+6
  • Manychat Community Moderator
  • October 29, 2024

You could use a number user field, and check if the number is between 100000000 and 999999999.

This will work if the numbers never start with 0.

If the numbers can start with 0, then you need to use a text user field and external validation.

You can use tools like Make.com to validate the length.


Arman Shayan
  • Author
  • Channel Explorer
  • October 29, 2024

Thank you for your attention, dear Gustavo.


“You could use a number user field, and check if the number is between 100000000 and 999999999”

What method can I use to give these requirements?


Gustavo Boregio
Forum|alt.badge.img+6
  • Manychat Community Moderator
  • October 29, 2024

Hey @Arman Shayan you need to use the condition block in your Manychat flow:

https://help.manychat.com/hc/en-us/articles/14281142518556-Condition-Block

 


Arman Shayan
  • Author
  • Channel Explorer
  • October 29, 2024

Okay, I tried, but it didn't work. Can you explain in detail what section I can find this? I'm doing this for a Telegram bot.


Arman Shayan
  • Author
  • Channel Explorer
  • October 29, 2024

I can't find the place where I can set these digits.

 

 


Gustavo Boregio
Forum|alt.badge.img+6
  • Manychat Community Moderator
  • October 29, 2024

You won’t set the digits, you’ll need to check with a condition that the number is higher than 100000000 and lower than 999999999. If this is true, then we know the number has 9 digits.


Arman Shayan
  • Author
  • Channel Explorer
  • October 29, 2024

And how can I set these conditions?

 


Fabio Gaulke
Forum|alt.badge.img+3
  • Manychat Community Moderator
  • Answer
  • October 30, 2024

Hi, @Arman Shayan!

 

You can build something like this:

  1. You will ask the user for the 9 digit number and store it into a Custom User Field (TEST_NUM_FIELD in my example)
  2. As @Gustavo Boregio said, a Condition checking if the Custom Field (TEST_NUM_FIELD) is greater than or equal to 100000000 and less than or equal to 999999999.
  3. If the number has more or less than 9 digits, it goes back and asks again for a number
  4. If the number has 9 digits, it will continue your flow.
  • To create the Custom User Field go to Settings/ Fields/ User Fields (remember to create it as Number type 😉)

 

Hope it helps! 🙌

 


Arman Shayan
  • Author
  • Channel Explorer
  • October 30, 2024

Thank you, dear Fabio and dear Gustavo everything worked 👌🤝