Hold the custom action until the user gives the right answer

i am just making a simple bot on online order system.how can i hold the action until user give the right order number in case of order cancel.if users give the invalid number they must get three chance to give order number. in case what should i use. please suggest me as soon as possible. suppose any user wants to cancel his order.the bot ask for order number but it is not valid.and the bot comes out of that action. user must get three chance to give the right answer for that what should i use. example: user: cancel my order bot : please give your order number user: my order number is ab1234 ###after searching in the database bot : this is not a valid order number. please give me the valid order number. user: ab3465 bot: sorry i am unable to understand ### giving reply through default action

in above example i just want that the bot does not use fallback actions it takes order number and again search in the database.

Hello @soumya-SR, If you could format your text better in the future it would make it easier to follow.

If I am reading this correctly it sounds like you might want to look into Actions where you can run a custom action server to verify the slot data, etc.

Have you tried to build the bot yet? What types of issues are you running into?

yes i m trying to make a dummy bot.its all about online order . a user can order products and cancel it too through chatbot. i successfully run the order module but in cancel order module i m facing some issues. when user tells the bot to cancel the order the bot reply whats your order number.in this case when user enter correct order number the bot reply according stories but when the user mistakenly wrong order number then it doesnt reply correctly and when user again give the correct order number the bot doesnt reply correctly.how can i solve this issue? have you any idea about?

hope my problem is clear to u now

thanks @btotharye for responding to my issues

I think you should be handling all of this in the custom action. The bot isn’t going to know what order number is right or wrong, that should be in your custom action server logic to check for that and validate the order numbers no?

yeah! you right. how can i achieve my goal? have you any idea.the bot is behaving like it stories content. i arranged stories in that manner so its behaving like that.you got my issue or not?

this is the issue i am talking about.how can i resolve this issue

Well without seeing your code that is doing this I am not really sure what is going on here, is this custom action code you are running?