I want to hard code the confirmation intent inside a custom action:
So I can ask the user if he/she wants to confirm the action- from inside the action and continue after the user answers. Is there any way I can do that?
Hey @aj_loki. Can you give an example where you would need such behaviour? It would be better to write your training stories in a way that confirmation message would come before the action execution and then, based on user’s response, the custom action would be execute or not.
Let’s say I want to send some digital shopping credit points to a friend. I want my custom action to check my remaining credits points and ask me again with the remaining points whether I am sure if I want to send the money or not.
I want to hard code just this part to be sure. Is there any way I can do this?
This story would represent the behaviour when a user asks for the points to be sent, the bot runs custom action to check the current points and sets the current points value as a slot. With a follo-up action the bot would ask if the user still wants the points to be set (using the slot value of the current points). If the user agrees, then the bot runs action_send_points.
Another story could be where the use doesn’t want the points to be sent after checking the points balance: