Need help with Transition to card
# 🤝help
Hi. I'm building an ecommerce chatbot agent which will work exact like a sales man. I have worked enough from displaying products to placing order by chatbot itself. I'm facing a bug on transition to card.
Hey @cuddly-gpu-96563, what type of bug are you facing on the transition to card? If you can share with us an image of what's happening and what you expect to happen that'll help us start figuring it out.
this is my flow. chatbot displays the product with name, id and price
user can input either product name or id
then AI will check if the input given by user exist in our product list or not
if exist, then it will ask for quantity and will push into checkout array
but what if user input random numbers or names
now check here, it asked for product and I gave random number 12. so it displayed me all products and gave me option to add, and added all the products in one time
in this case it should redirect to product does not exist.
I have implemented via transition it was working fine before but today its messing again
Here is the flow. first card display products. 2nd card captures product via user and if product does not exist then user should be redirect to 3rd card 'confirm-product' (temp name)
and below is the AI task in 'user-product-name' card.
and this is transition to condition workflow.checkProduct == 'product does not exist or typing error'
Thank you, Moonshot. @acceptable-kangaroo-64719 @acceptable-gold-88171 Any idea of what could be going wrong here?
@acceptable-kangaroo-64719 @acceptable-gold-88171 ?
Hey @cuddly-gpu-96563, you'd probably be better off using a list entity and a capture card for this use case. A list entity is basically a collection of keywords you want to train the bot to extract. You can make one by going to Library > Entities and clickign the "+" button. Then, add your drink names and any other synonyms (like id numbers). Finally, make a capture card, and under "Type of variable to extract" select your new list entity. Add an output variable, and you're good to go.
The reason this might work better is because with entities, you're limiting the scope of possibilities from one of any starbucks drinks to one from a curated list of starbucks drinks. You also have easier options for retries and fallbacks with a capture card.