Dialogflow CX Beginner Tutorial – 12/14: Assignment 2

Course outline

[m0].

So the next assignment is to allow the user to actually buy a product.

Now.

What I’m going to do is as soon as I start I’m going to say give me a Snickers okay.

And you can see that it says you need at least 25 cents to buy Snickers your current balance is zero cents because we haven’t added anything right.

So I’m going to say add a quarter.

And it says okay I added a quarter you have entered state 25.

Now I’m going to say give me a Snickers .

And you can see that it says okay here is a Snickers bar your balance is now zero cents which is great wonderful.

And the next thing I’m going to do is I’m going to say give me a Twix you can see that it says your balance must be at least 50 cents to buy a Twix your current balance is 0 cents

What I’m going to do is I’m going to add a quarter.

And I’m going to say the same thing again give me a Twix [m1].

And once again it’s not going to allow you to buy because your balance is still not sufficient.

So let’s add another quarter and.

Now I’m going to say give me a 2x.

And this time it’s coming back with okay here is a Twix your remaining balance is 0 cents.

OK, now.

Let’s just change it a bit let’s add a quarter add another quarter and.

Now, the balance is 50 cents and.

If I were to say give me a Snickers you can see that okay here’s a Snickers bar your balance is now 25 cents.

And because I still have 25 cents left I should be able to get another Snickers bar.

So let’s check that give me a Snickers.

And you can see that it says okay here’s a Snickers bar your balance is now zero cents.

If I were to get try to get one more Snickers it should refuse it because [m2] I don’t have any balance left at the moment.

So this is the flow which you should again this you should be able to do all this just using page transitions.

And the state machine concept that you’ve already learned.

And you should be able to move the move the bot from state to state based on what balance is available based on the action that the user has performed.

So this is the second assignment