Backtracking

Image of an author
Luiza Jurczyk
2 min read
updated: Jun 24, 2025

Avoid random bot responses by blocking unwanted interactions.

Backtracking resets the history of previously entered interactions to help you control the conversation flow and narrow the context.

You can limit the available interactions to the subsequent interactions or to the subsequent interactions and the root.
You can limit the available interactions to the subsequent interactions or to the subsequent interactions and the root.

How does it workLink icon

Let’s look at an example to better understand how this bot action works.

If you’re unsure what is the context, please go to this article.
If you’re unsure what is the context, please go to this article.

A story that has four nested interactions: A, B, C and D. A user chats with the bot and arrives at C where all the three other interactions are reachable. A as this is the story root, B because it has been previously entered and D as this is the child interaction.

Backtracking example story tree where the bot can match root A, entered B and child D interactions

What happens if we add the backtracking action that allows root and subsequent interactions to the current C interaction? We’ll be still able to reach A, because this variant of the action doesn’t block root interactions and D, because this is the child of our point in the tree, but we won’t be able to return to B.

Backtracking action that does not block root interactions, with child D reachable in the story tree

Let’s analyze the same scenario but with another action’s settings that allow only subsequent interactions.

Backtracking action set to allow only subsequent interactions, so the bot matches only child D

Now, the bot will try to match the inquiry only with the following D interaction.

ConfigurationLink icon

  1. Select the interaction that you want to add the Backtracking action too from the story view.
  2. Move to the Bot responses. Select Backtracking from available actions and decide if you want to block subsequent interactions or subsequent interactions and the root.

Backtracking configuration options to block subsequent interactions or both subsequent and root interactions

  1. Click save to keep your work.

Was this article helpful?

Got it!

Thanks for your feedback.

Thank you!

We’re happy to help.

Ready for more than a chatbot?
Try AI Agent in Text.

AI Agent trains on your data, resolves issues across live chat and help desk, and takes real actions in your business systems.

14-day free trial No credit card required