Skip to content

Collecting data: Input and phone number

Video coming soon — step-by-step guide below

Ask for age and phone with format validation and keep the answers in variables.

What you need

  • A bot with a connected messenger

Steps

  1. Add an Input for age and set the value type (integer).
  2. Connect the Prompt output to a question screen “How old are you?”.
  3. Connect the Invalid output to an “Integer required” screen: it is shown when the format is wrong.
  4. The Next output continues; the value is available as #node.{id}.{key}.
  5. Add a Share phone screen to request the phone number with one button.
  6. To accept a phone number entered as text, add an Input with type Phone. Set Phone check region (for example, UA) and enable Save as member phone: the number is validated and the result (for example, 380671234567) is saved to the member profile and #member.phone.
  7. Show the collected data in a summary Screen using variables.

Resulting scenario

Input(age)
  ├─ Prompt  -> Screen "How old are you?"
  ├─ Invalid -> Screen "Integer required"
  └─ Next    -> Share phone screen -> Screen "Thanks, #node.12.age"

Learn more