# Waiting for user response from inside action

**URL:** <https://forum.rasa.com/t/waiting-for-user-response-from-inside-action/2728>\
**Category:** Rasa Open Source\
**Created:** [November 16, 2018, 10:51am UTC](https://forum.rasa.com/t/waiting-for-user-response-from-inside-action/2728 "2018-11-16T10:51:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aj\_loki](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@aj\_loki](https://forum.rasa.com/u/aj_loki)\
**Post date:** [November 16, 2018, 10:51am UTC](https://forum.rasa.com/t/waiting-for-user-response-from-inside-action/2728/1 "2018-11-16T10:51:58Z")

</div>

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?

Any help is appreciated. Thank you

---

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [November 22, 2018, 2:53am UTC](https://forum.rasa.com/t/waiting-for-user-response-from-inside-action/2728/2 "2018-11-22T02:53:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aj\_loki](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@aj\_loki](https://forum.rasa.com/u/aj_loki)\
**Post date:** [November 22, 2018, 8:45am UTC](https://forum.rasa.com/t/waiting-for-user-response-from-inside-action/2728/3 "2018-11-22T08:45:23Z")

</div>

Hey @Juste, Thank you for replying.

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?

Thank You

---

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [November 22, 2018, 1:50pm UTC](https://forum.rasa.com/t/waiting-for-user-response-from-inside-action/2728/4 "2018-11-22T13:50:36Z")

</div>

Right. So in order to achieve this behaviour with Rasa Core, you should write the tories accordingly. For example, a story could look like this:

```auto
* send_points
- action_check_points
  - slot{"points":200}
  - action_confirm
 * affirm
  - action_send_points

```

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:

```auto
* send_points
- action_check_points
  - slot{"points":200}
  - action_confirm
 * deny
  - utter_goodbye

```
