Step 3: Handle unwanted answers

This step shows how you can handle answers that need a response but which aren't a direct reply to your question.

Result of step 3

This solution makes use of intentions:

  1. Create the intention:
    1. In the left panel on the Canvas, click Intentions.
    2. In Intentions, enter a name for the intention and then click add.
      For example, enter other flavors.
    3. In Utterances, enter an unwanted answer and then click add.
      For example, enter mint.
    4. Repeat this step for each unwanted answer. For example:
    5. When you have added all the unwanted answers, click OK to save the intention.
  2. Add a message interaction that uses the intention:
    1. Drag a message onto the canvas.
    2. In the Intention field, select your intention.
    3. In Send to user, enter the text that you want to send whenever the bot receives an answer that doesn't match the question but matches the intention. You could also randomize the message that's sent (use the Advanced tab to add these).
      For example That's interesting but it's not part of our current range.
    4. In Next, select your question interaction. This means that after displaying the message, the bot will show the question again.
      The bot should look similar to this:
  3. Use Live Preview to test the bot.
In reality it is not good practise to create a bot that leaves a user stuck in a loop like this. It's preferable to advance the conversation by providing a way for the user to leave feedback. The Example: using counters and conditions shows how to count the number of times a user has seen a particular interaction and then show a different interaction depending on the result.