Number
Ask for a number, phone, ID, price, percent or code, check the answer, and route customers who keep getting it wrong.
What it does#
Number asks a question and checks that the answer is the kind of number you expect: a whole number, a decimal, a phone number, an Israeli ID, a price, a percent, or your own code format. A wrong answer gets a clear message and the question is asked again.
Use it for guest counts, quantities, phone numbers, prices and order codes. For free text, use Text. For dates, use Date.
Set it up#
- 1
Add Number and name it
Drag Number onto the canvas and click it. Set Step name (letters and numbers), for example
guests, and write your question under Message. - 2
Choose Format
Under Format, pick the Number type: Whole number (the default), Decimal, Phone number, Israeli ID, Amount / price, Percent or Custom pattern. For a phone number, also choose Accepted numbers and Save as. For a custom pattern,
#is a digit,Aa letter and*either:AA####accepts ab1234. - 3
Set Rules
Under Rules, set Minimum and Maximum, and if needed Number of digits or Digits after the decimal point. Turn on Allow negative numbers only if you need it.
- 4
Review Messages
Under Messages, write what the customer gets when the answer doesn't fit (Not readable, Out of range and so on). Leave a message empty to use the default in the bot's language. You can use
{min}and{max}in your text. - 5
Connect the outputs
Under Output, choose After invalid answers: Keep asking, or give up after 1, 2 or 3 wrong answers in a row. If you choose a number, connect Valid to the next step and Not valid to a fallback, such as Talk to a person.
- 6
Use Try it, then preview the flow
Under Try it, type Sample answers, one per line. Each shows Accepted or Rejected with the message the customer would get. Then click Preview to test the whole path.
What your customer sees#
The customer gets your question. A fitting answer moves the chat on. Any other answer gets the matching message (for example Please send a whole number, e.g. 42.) and the question again, until they get it right or reach your After invalid answers limit.
For a step named guests, use the clean answer as {{@guests}} and the answer exactly as typed as {{@guests_raw}}. Examples of clean answers:
| Number type | Customer types | Saved as |
|---|---|---|
| Whole number | 1,250 | 1250 |
| Whole number | 007 | 7 (use Custom pattern if zeros matter) |
| Phone number | 050-123-4567 | +972501234567 (or 0501234567 with Save as) |
| Amount / price | ₪99.90 | 99.90 (the currency is removed, not converted) |
| Percent | 15% | 15 |
Words like twenty are not accepted: the customer is asked to send digits.
Messages#
Click the step and open Messages at the bottom of its settings to change what the bot says on its own here. Without rules, Messages has Not a number, Thousand or million? and the "Got it" note when words became a number (Got it: 2,000 in English chatbots). With rules, the step's own Messages section above is used for that step.
Each field shows the default in grey. Leave it empty to keep the default, or write your own: it applies to every Number step in this chatbot and goes live with Publish. Use for all my chatbots makes it the text for all your chatbots (account owner or admin). More texts are in Settings > System messages.
Common problems#
| Problem | Why | Fix |
|---|---|---|
| Connect a step into this one and connect it to the next step. Fix the number / date check settings listed below. | A connection is missing or a setting is invalid | Connect both sides and fix the field marked in red |
| The minimum is larger than the maximum. | The two limits are swapped | Swap them |
| Customers keep getting asked again | Their answers don't fit your rules, and After invalid answers is Keep asking | Check the rules with Try it, or choose 1 to 3 and connect Not valid |
| Not valid never runs | It isn't connected, so the bot keeps asking | Connect Not valid to a step |
| 1.234 is read as 1234 | With Decimal separator on Auto, one dot followed by three digits counts as thousands | Set Decimal separator to 1,234.5 or 1.234,5 |
| A code like 007 loses its zeros | Whole number saves the number, not the digits | Use Custom pattern (for example ###) |
| The step says it uses the original number check | It was made before the new check | Click Upgrade to the new number check, review What changes, then Upgrade. Nothing changes for customers until you publish |
Example#
Party size for a clinic visit. Name the step guests and ask How many people are coming? Choose Whole number, Minimum 1, Maximum 6. Set After invalid answers to 2 and connect Not valid to Talk to a person. In Try it, 3 is accepted, 0 is rejected as out of range, and three is rejected as not readable.