# How to invoke action based on required\_slot when using forms?

**URL:** <https://forum.rasa.com/t/how-to-invoke-action-based-on-required-slot-when-using-forms/14942>\
**Category:** Rasa Open Source\
**Created:** [August 28, 2019, 1:46pm UTC](https://forum.rasa.com/t/how-to-invoke-action-based-on-required-slot-when-using-forms/14942 "2019-08-28T13:46:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gskprasad1](https://avatars.discourse-cdn.com/v4/letter/g/bcef8e/32.png) [@gskprasad1](https://forum.rasa.com/u/gskprasad1)\
**Post date:** [August 28, 2019, 1:46pm UTC](https://forum.rasa.com/t/how-to-invoke-action-based-on-required-slot-when-using-forms/14942/1 "2019-08-28T13:46:58Z")

</div>

I have written below story: This starts a form and collects slots for Occasion, target and sole. I want to make it more interactive. So, written an intent ‘seekinghelp’ which is supposed to work based on the context for of the slot being filled. if the slot is ‘occasion’, ‘action\_get\_occasions’ to be invoked and if the slot is ‘sole’, ‘utter\_explain\_soles’ to be invoked. it is working as expected. But, some times, ‘action\_get\_occasions’ is invoked for ‘sole’ slot. How to fix it ??

- search\_shoe
  - shoe\_search\_form
  - form{“name”: “shoe\_search\_form”}
  - slot{“requested\_slot”: “occasion”}

- seekinghelp
  - action\_get\_occasions
  - action\_listen
  - shoe\_search\_form
  - slot{“requested\_slot”: “target”}

- search\_for\_others
  - utter\_confirm\_target

- search\_for\_others{“target”: “girls”}
  - shoe\_search\_form
  - slot{“requested\_slot”: “sole”}

- seekinghelp
  - utter\_explain\_soles
  - action\_listen
  - shoe\_search\_form
  - slot{“sole”: “full rubber”}
  - slot{“specifications”: “”}
  - slot{“feedback”: “”}
  - form{“name”: “null”}
  - utter\_slots\_values
