Dialogflow CX Beginner Tutorial – 10/14: Ask for balance after transition

Course outline

[m0].

All right.

So now let’s modify our bot to report the balance amount at each state.

So let’s go to the start state.

And – you know – that if you have to click on what is my balance it’s just going to say you haven’t added any money please begin by adding a quarter right.

So now let’s go to state 25. we don’t go to state 0 yet in this flow diagram so we don’t have to worry about it.

Now I’m going to add an intent.

And I’m just going to select what is my balance just like I did for the previous type.

Now here the agent is just going to say your balance is 25 so notice that there is no transition to any new state.

Because all we are doing is asking for the balance right so it’s just going to come back with what is your balance is 25 cents it’s just going to give you a response.

And not do any page transitions let’s save that let’s go to state 50.

And [m1] do basically the same thing you just ask add what is my balance.

And then say provide the answer here your balance is 50 cents save it no need to do any page transitions here either.

And in this case you have to add a new intent.

And go to what is my balance.

And the dialogue should be balance is 75 cents.

OK, so that’s all we have.

And we have effectively hard coded the responses into each of these states so that.

Now, if you were to test the agent you say add a quarter and.

If I were to ask what is my balance you can see that it says your balance is 25 cents then you add a quarter again [m2] what is my balance you can see that it says your balance 50 cents add a quarter what is my balance.

And you can see that it says your balance is 75 cents.

So this is how you are going to modify the bot so that it reports the balance that the vending machine has at each state

<— End of article —>


This website contains affiliate links. See the disclosure page for more details. 
Check out the Learn Dialogflow ES and Learn Dialogflow CX courses if you would like to learn Dialogflow in depth.
"The magic key I needed as a non-programmer"

The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn.

- Kathleen R
Cofounder, gathrHealth