1
votes

I am creating a complex dialog that has some "shared" dialog branches that will be "jumped to" in several places from the main dialog.

For example, I have a shared branch, "Gather lead" to gather a person's name and email address. When it is complete, I would like the dialog to return back to where it was in the original dialog stack.

So far, I've only been able to set a context variable such as "returnToNode" and then create child nodes at the end of "Gather lead" for every possible "returnToNode" which themselves have "Jump Tos"

Ideally, Watson Conversation would return where it left off before the jump?

Is that possible?

What I'm trying to achieve:

Main Dialog 1: 
    A -> B -> C -> Shared -> D -> end
Main Dialog 2:
    E -> F -> G -> Shared -> H -> end

Shared:
    X -> Y -> Z -> end

In Main Dialog 1, I want the dialog to return to D after Shared is complete. In Main Dialog 2, I want the dialog to return to H after Shared is complete.

1

1 Answers

3
votes

In this case, you have to use the conditions from Watson conversation in your favor. For example:

In your Dialogs, you will create one condition to Jump to Shared, and use the condition(user need input something) for jump to for your Shared flow.

And the D and H, you need to create some nodes with conditions to jump to H or jump to D, inside the same flow. I created one example for you, download inside the link above.

Like:

Dialog 1: A -> B-> C-> Shared-> conditionShared+Jump to Shared -> D

Dialog 2: E -> F-> G-> Shared-> conditionShared+Jump to Shared -> H

Shared:

X-> Y-> -> END-> condition for jump to H dialog 1 D //and create for other above
               condition for jump to dialog 2 H //above

See one Workspace example.

You need to follow the same logic for the nodes. If you want just set the condition and give the text for the node you want to use jump to. But remember, your user needs to input something for choice the dialog.