Often your user may be too slow to answer the assistant. It’s a good practice to reprompt a user with the kind reminder - “Hey, here’s what I need to know in order to continue”. For such cases you can use reprompt action.

The text inside of the reprompt action will be played to the user if either of the following conditions are met:

  • the assistant did not hear the user
  • the user’s response did not match the intent we’re expecting in the next section

Consider the following example:

- name: Start of the Scenario Logic
    - sendText: >
        Let us start with the scenario logic right here!
        Do you want to continue?
    - reprompt: >
        I don't think I got it quite right.
        Do you want to continue with the game?
    - getInput:
    yes_next: Start of the Scenario Logic
    no_thanks: Exit

We start the step asking the user if she would like to continue the game. Then we put a reprompt action - just a kindly reminder about what we actually want to hear. For the case that the user either takes a long time to answer or answers our question with something other than ‘Yes’ or ‘No’.

Written by Andrey Esaulov on 12 March 2019

Updated on 12 March 2019