Dialogflow Basket Multiple order

Viewed 182

I'm new here

I have one question but I can't put her correctly in right words, cause my English is bad, but I'm gonna try

I want to build a shopping basket in dialogflow, like this scheme:

first, the user selects a category (pizza for example) now the user select the pizza he wants (1 = margherita, for example) now I want to send him a message ''do you want to close the basket"? if the answer is ''no'' the bot back to the first line (select category) and the bot gonna add up the items and prices to basket if the answer is "yes'' the bot shows the basket with price ( 1 margherita for 5$)

sorry if you were confused. thanks.

1 Answers

Without revealing the answer, I'll point you in the correct direction.

Dialogflow handles multi-interaction conversations through something called contexts. Contexts allow you to save the state of a conversation through a specified life-cycle.

You might notice in your intent builder on the Dialogflow console, towards the top there is a place to set input and output contexts. Intents that receive input contexts will be triggered when an intent sets that same context as the output context.

This allows you to chain intents together to allow the back and forth of a normal conversation.

For more info on contexts Dialogflow has good documentation

Related