Handle multiple slot values in one utterance

I am building a simple pizza ordering project.
I would like the user to be able to state several toppings in one utterance
e.g. I would like a large tuna, onion and olives pizza for delivery
I have created custom slots {toppingone} {toppingtwo} {toppingthree} with the same 3 ingredients as slot values for each slot.
How do I get the system to answer tuna, onion and olives instead of “tuna onion olives” especially given that the word “and” will not always be necessary if the user only selects one ingredient for example.

Secondly, when the user states an order and Alexa confirms it back, if the user changes his/her mind and places a different order, e.g. a small tuna pizza, the previous ingredients are not cleared from the memory. How do I clear the slots and reflect the new order from the user. In this example, Alexa replied, “Great a small tuna onion olives pizza”. Instead of “a small tuna pizza”.
Thanks for your help!

1 Like

Hi @angg

You will have to use the Code block with some Javascript to do the logic of checking the filled slots and generate the corresponding confirmation message.

About your second question, you can reset your slots by using a Set block to set the slots values to 0 before your Choice/Intent block.