Branching based on combination of inputs


#1

I wonder if we could have a bit more control over how branching works? Specifically it would be useful to apply conditions to each branch and to reference user responses from different gambits in the conditions.

For example, say you have a gambit (gid_5) with three branches, to control the branching I would like to specify the conditions for choosing each branch.

I’m thinking something like this (please excuse the psuedo code):

if {{ursp.gid_3}} = “xxx” and {{ursp.gid_4}} = “yyy” then branch_1
else if {{ursp.gid_3}} = “zzz” or {{ursp.gid_5}} > 13 then branch_2
else branch_3
end

It would be very welcome as it would reduce the need for multiple duplicate gambits in branching dialogue paths and thereby reduce the risk of inconsistencies when updating the bot.

Cheers,
Christer


User authentication using a bot?
#2

Hey @Christer,

I have been thinking about this feature for some time. And we recently had a discussion about it internally. This will certainly make the branching and gambit jump logic much more powerful.

I expect to allocate some time next month to build this powerful feature in the product and the builder. Thanks for the suggestion.


#3

Great news Vinit! Looking forward to it.


#4

Hi Vinit,
Any updates on this?
Still holding my breath, starting to turn blue :grinning:


#5

Hey @Christer,

Yes, We are actually working on this right now. Some other things were on more priority so this got delayed a bit. The UI configuration part of this is specially tricky and i want to get it right. I Expect to release it in next 2 weeks. Thanks for following up on this :smile:

Here is sneak preview of the UI:


#6

Wow! You guys are killing it! I wait every week for updates to see what I can do next, and I’m never disappointed when you roll out new features!


#7

That looks great! Looking forward to it!


#8

Hey @Christer,

We have released this feature. You may have to clear your browser cache to see the updates.
You can enable this by going to Settings page on the home: https://admin.hellotars.com/home/#settings

com-2017-09-23-15-49-34-487

Once you enable this you will start seeing an extra option in the Gambit Modals near the bottom like this:

Once you check this on, you will see the section to configure Conditional Jump like this:

Here you can add branches, which represents all the possible gambits that the conversation can jump to, which can be connected to different gambits. In each of these branches you can define one or more conditions, tied together with AND/OR operations. Here is what branches with conditions look like:

com-2017-09-23-16-02-07-449

You use the same double braces syntax {{ursp.gid_name}} in the fields to refer to values in other gambits.

The system checks for conditions in each branch in order and if it satisfies it jumps to the gambit connected to that branch. If it does not satisfy, then it goes ahead and checks the conditions in the next branch in order and tries to do the same.

If none of the branches win, then it jumps to the gambit connected to the last branch (i.e. The Default Branch)

For each branch that you make there will be socket added in the Gambit Box in the FlowChart View, which you can connect to other gambits. So for the example above with 2 added Branches and 1 Default Branch, you will have 3 sockets like this:

com-2017-09-23-16-11-38-011

They are in the same order as created in the Gambit, with the Default Branch at the right most end.

The feature is quite powerful and still very new, so you may encounter some bugs. Feel free to report them, it will be fixed very quickly. We will add more operations in the list as this feature evolves.


#9

Vinit, you’re a Rockstar!
I’m going to check it out right away.


#10

WOW!

Amazing work! Thank you Vinit


#11

Wonderful!
I did a first test with a simple Cluedo-inspired mystery game: https://convbot.hellotars.com/conv/rkzuXa/
It was very easy to understand how to use this new conditional jump feature and the help/instruction is very clear and helpful.
Great work!


#12

Really Cool Bot @Christer :smiley:
Glad you liked the new feature and really happy that it was easy to understand, that was the primary focus :blush:

Feel free to give feedback and throw ideas on what kinds of operations you would want to see.


#13

I ran into a bug. I’m trying to create a simple search for an FAQ topic using the auto-suggestion feature to search around 24 possible questions and then make conditional jumps based on the user selecting a question from the list (it does work by the way!). But when I created the gambit the branches were stacked on top of each other so I could only actual select 4 out of the 24 possible options. The gambit did not stretch out like a button or card gambit would do with multiple branches.


#14

Hey @Levi,

Thanks for reporting this, let me take a look at this.


#15

@Levi Fixed the issue. Clear cache to see the update.


#16

Here is my FAQ bot using the conditional jump and auto-suggestion list to create a pseudo-search. Everyone feel free to give me feedback or other ideas! https://convbot.hellotars.com/conv/ByFUdL


#17

Heads up on the conditional jump logic: I just found out that it glitches in Internet Explorer (I know, big surprise). I don’t expect anything to be fixed with it; I just thought I would let everyone know. I had an state employee testing the fee calculator, and by sheer stupidity, our state government only gives employees access to IE as their web browser unless they can demonstrate a strong need for another browser. How about security and accessibility guys? You’re a government entity…


#18

Hey guys,

I just want to post this video tutorial on this TOPIC, so that others checking this can easily understand how to use the conditional jump feature. Check this quick tutorial: