How to build an ordering chat bot to have many items for the same customer order

How to build an ordering chat bot to save multiple values for the same slot. For example: A customer can have an order like this:

  • Customer_Name: Khalid Yousif
  • Order_Date: 05-05-2021
  • Order_Items:
    •    Item_name: Milk                - Qty: 1
    •    Item_name: Chocolate      - Qty: 3 
    •    Item_name: Baby Diapers - Qty:2
  • Amount: $25.00

Another order can be like this:

  • Customer_Name: Jacob Isaq
  • Order_Date: 04-05-2021
  • Order_Items:
    •    Item_name: Juice               - Qty: 2
    •    Item_name: Bread              - Qty: 4 
    •    Item_name: Tiolette Paper - Qty: 5
    •    Item_name: Ice Cream       - Qty: 1
    •    Item_name: Tooth Paste     - Qty: 2
  • Amount: $76.00

Thank you

Hello @khalid there is Duckling which is a pre-trained model that will help you capture the amount of money each time you add it to your pipeline. check the docs Components hope this helps :slight_smile:

Thank you Amina I don’t think duckling will help in this issue. Duckling is mainly used to recognize specific type of entities. I mainly need to save multiple values of the same slot. The user will insert them using intents repeatedly.

@khalid okay what about you put the type of your slot a “list” ?

Great Every time the “shopping_items_inform” intent will be recognized, the custom action will run. Now the question is : will the list slot save the previous values every time the action will run.

I have never used a slot with the type list so I don’t have an answer but you can always try and see

if it doesn’t work try to find some examples or tag someone from the rasa staff

I hope you find a solution :slight_smile:

1 Like