1

I have been reading through the documentation and cannot find the answer to this question for Watson Assistant.

I have a digression that I only sometimes want to return back to the previous place in the dialog.

Specifically, after the user enters the digression, if the user responds "Yes" then I do not want the digression to return back, but if the user responds "No" then I do want the digression to return to the previous place.

Is there a way to do this? Perhaps by manually editing the JSON to somehow override the directive to return from the digression in some cases?

Below is a diagram of the issue:

Dialog Flow

A H
  • 11
  • 2
  • I find this a very relevant question and I agree that the given answer does not solve the problem. I tried to find a workaround with context variables - but did not succeed. If interested check out this post: https://stackoverflow.com/questions/56128002/how-to-set-a-jump-to-target-node-dynamically-i-e-using-context-variables Issues are closely related. – max_headroom May 14 '19 at 10:24

2 Answers2

1

There is a function <? clearDialogStack() ?> that when called it will erase all the digressions that are set in dialog and hence the dialog will not return from digression. So just call this function in a node where you don't want WA to return.

Here it is in the doc: https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-runtime#dialog-runtime-digressions

Michal Bida
  • 1,316
  • 9
  • 24
  • While you are pointing the user to the right documentation page, it should be noted that in order to conditionally act, the condition 'returning_from_digression' needs to be checked in order to fully implement this behavior. Examples of how to check this condition are in the docs page you have pointed to. – pgoldweic Jan 03 '23 at 19:02
0

If I understand you correctly, you could create two different nodes for handling the user response of "yes" or "no" based on the way digressions are setup today. If yes, the node needs to be configured to not return back (don't click the checkbox). If no, click the checkbox.

enter image description here

akaykay
  • 185
  • 1
  • 11
  • 1
    Thanks but this would not work. Here's the sequence: 1. User says something that enters the conditional digression node. This node must be set to return conditionally 2. User answers yes or no. Based on this response, we decide whether (1) above should return or not. What I'm hoping to be able to do is to cancel the "Return after digression" that was set in (1) in a child node of (1) if the answer was "Yes". – A H May 30 '18 at 17:29