Ask a Question

Many bots will want to collect more info from the user before they can do something useful. Our Ask a Question action allows you to do this easily and intelligently.

By stringing multiple questions together, as separate actions one after the other, you can ask a series of questions too.

Settings & Outputs

You'll need to set up these inputs:

  • Response Path - this tells Flow XO where to route the message (it's normally the response path output from the trigger).
  • Question Type - choose what type of question this is. You can find a description of each type below.
  • Question - the text you'd like to use to prompt the user.
  • Choices - only if you choose the choice question type. Provide the choices that you'll offer to the user. If the underlying value will be different to the name of the choice, you can define that too. Otherwise, the choice itself will be used as the value.
  • Validation - only if you choose the text question type. Either choose from the available predefined validation formats (more details below), or select Regex to provide a regular expression.
  • Send Reminder - sends a message after a few minutes to remind the user to answer the question.
  • Notify on Expiry - sends a message if the question expires (after 5 minutes, or if an invalid answer is given twice).
  • Skip Question - if you tick this option, we'll tell the user they can write "skip" (or similar words) to skip the question. If they do this, the answer output will be empty.

Here are the outputs you'll be able to use:

  • Date & Time - the date and time that the answer was received.
  • Answer - either the text that the user typed in or the name/value of their choice.
  • Choice - if this is a choice type question, this output will contain the choice itself (as opposed to the value, if one is defined). It will always be empty for none-choice questions.

Question Types

You can choose from 2 question types currently:

  • Text - the next message in the same channel is accepted as the answer (after validation, if enabled).
  • Choice - the user is told what the options are and asked to make a choice. We'll show a set of buttons if the platform supports it. The next answer must be a case insensitive match to one of the choices (or a click of a button). If the user's response isn't recognised, the question will be asked again until a recognised choice has been made.

Validations

By choosing a validation, you can be sure that an answer will only be accepted if a known data type can be parsed from the user's response. The answer will also be standardized.

The available validations are:

  • Email Address
  • Integer
  • Decimal (10,00 - comma decimal mark)
  • Decimal (10.00 - dot decimal mark)
  • Date (mm/dd - American date format)
  • Date & Time (mm/dd - American date format)
  • Date (dd/mm - European date format)
  • Date & Time (dd/mm - European date format)
  • Time
  • Regex

Validations will produce the following standard formats:

  • Integer: 12
  • Decimal (10,00): 34,04
  • Decimal (10.00): 34.04
  • Date: 2017-01-14
  • Date & Time: 2017-01-14T12:30:00+10:00
  • Time: 13:30:00

The 'Date' and 'Date & Time' validations work with natural language expressions such as "tomorrow" or "friday at 10am". Our guide to Date & Time Handling has more details about what formats are understood.

Dates and times are processed and output in the timezone set at the account level, except where a timezone offset is provided as part of the date (for example, -05:00 or +0100).

If the user provides other words around the answer, we'll try to parse the answer itself from the response. For example, email will accept "my email is name@example.com" and output "name@example.com" as the answer.

Quit Interaction

The current interaction quits either on timeout, or if the user enters a recognised quit keyword ("quit", "exit", "goodbye", "bye", or "end"). This is different from skip because the entire interaction stops. The bot can only start again from the top.
The action will show in the logs as abandoned.

Still need help? Contact Us Contact Us