Hi there. I have a custom action to cancel an order. For that, I first show all the eligible orders for cancellation as “buttons” which are created dynamically through a MySQL query. Once the user clicks the order he wants to cancel, I store its order id in a slot. I’m now stuck here. I want to halt the action execution until I get my slot value and when I get the slot value, I want to go ahead and use it to cancel the order. Can someone please help me with this?
Hi @PraneethVasarla!
I’m assuming that you want to take the user’s input in the same action where you are rendering your buttons. I’m afraid you could not halt an action for taking input and then continuing execution.
You should write a separate action for reading slot value after it is set and using it for your task.
Your stories should look something like this:
* greet
- utter_greet
- action_utter_buttons_for_order_cancellation
* inform{"order_id": "value1"}
- action_read_slot_to_cancle_order
- action_restart
Hope that helps.
1 Like