Is there a way to use a condition like "last dialog node before this == xyz" in a dialog node?
For example: In dialog node A, I ask the user a question. They answer the question and I call dialog node B, asking the next question. To dialog node B, they can either respond by answering the question B OR they want to go back to question A. So I'd like to create a condition for dialog node A like "last dialog node active = dialog node C" AND intent="back". If the last dialog node active is dialog node C and the intent is NOT "back", dialog node D should be called.
Is there any way to do this?! I've been looking for a solution here for a few days already.
BTW I'm using the classic assistant.
I searched through the Watson documentation and the internet but didn't find anything.
It sounds like you like to go up a node when someone says "Go back" or chooses some option (after filling a slot), is that right? In classic dialog, you could have a "tracker" variable of your choice (Refer Context Variables). In each node, you can register a value for the node that's executing. (e.g.,
$node_visted=node_B) and then in Node A, you could condition like(#go_back && $node_visited=="node_B")as one of the condition.Assistant always (re)processes the tree top down. Since you're using classic dialog, take extra care in your dialog setup to reset answers to questions that were previously asked. In some cases, after going back and user entering a different answer, context may need to be cleared up. In Actions, you could take advantage of Re-Ask feature that will take manage associated context more effectively for use cases like this.