# Entity recognition to trigger form requirement

**URL:** <https://forum.rasa.com/t/entity-recognition-to-trigger-form-requirement/19965>\
**Category:** Rasa Open Source\
**Created:** [October 17, 2019, 2:16pm UTC](https://forum.rasa.com/t/entity-recognition-to-trigger-form-requirement/19965 "2019-10-17T14:16:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaravo](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jaravo](https://forum.rasa.com/u/jaravo)\
**Post date:** [October 17, 2019, 2:16pm UTC](https://forum.rasa.com/t/entity-recognition-to-trigger-form-requirement/19965/1 "2019-10-17T14:16:03Z")

</div>

Is there a way of using the detection of an entity (required for a form) to trigger the intent for the form completion?

In the [restaurant example](https://rasa.com/docs/rasa/core/forms/) rather than triggering `request_restaurant` with

_“im looking for a restaurant”_ or similar, I’d like to be able to use the recognition of an entity required for the `restaurant_form` e.g. _“I prefer sitting outside”_ gives the entity `seating: outdoors` and triggers the form to ask about the other required entities ( `cuisine` , `num_people` etc).

I suppose that I could add multiple entries for the `request_restaurant` intent, but in my use case I’m likely to have a large number of entities that could be recognised. It would be good to have any of them trigger the associated form.

---

<div class="post-metadata">

**Author:** ![Tobias\_Wochinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tobias_wochinger/32/4580_2.png) [@Tobias\_Wochinger](https://forum.rasa.com/u/Tobias_Wochinger)\
**Post date:** [October 22, 2019, 9:54am UTC](https://forum.rasa.com/t/entity-recognition-to-trigger-form-requirement/19965/2 "2019-10-22T09:54:23Z")

</div>

So basically any intent with this entity should trigger the form action? I guess it’s probably worth looking into [OR statements](https://rasa.com/docs/rasa/core/stories/#or-statements) then?

---

<div class="post-metadata">

**Author:** ![jaravo](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jaravo](https://forum.rasa.com/u/jaravo)\
**Post date:** [October 22, 2019, 4:14pm UTC](https://forum.rasa.com/t/entity-recognition-to-trigger-form-requirement/19965/3 "2019-10-22T16:14:54Z")

</div>

Ok, so if I have:

```auto
## intent:request_restaurant
- im looking for a restaurant

## intent:inform
- id like [moroccan](cuisine) food

```

How would I use an OR statement in the stories.md? Something like?

but, how to only trigger inform when a related entity (cuisine) is recognise?

```auto
* request_restaurant OR inform
  - action_restaurant

```

---

<div class="post-metadata">

**Author:** ![jaravo](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jaravo](https://forum.rasa.com/u/jaravo)\
**Post date:** [November 1, 2019, 3:06pm UTC](https://forum.rasa.com/t/entity-recognition-to-trigger-form-requirement/19965/4 "2019-11-01T15:06:32Z")

</div>

Any further thoughts on how this might work?

My use-case is that I want to take an initial statement from the user, and then select the most appropriate form to fill in based on their response.

Grateful for any suggestions on how I might be able to do this.

* * *

further detail:

`welcome_form` - e.g. “how can I help?”

I then have a number of forms:

`form_1` with slots: `slot_1a`, `slot_1b`, `slot_1c`

`form_2` with slots: `slot_2a`, `slot_2b`, `slot_2c`

if the response to `welcome_form` contains `slot_1a` , `slot_1b` or `slot_1c` I want to trigger `form_1` to collect the rest of the required slots for that form. If `welcome_form` contains `slot_2a` etc I want to trigger `form_2`.

I then want to extract the remaining `slots` for that form from the response.

---

<div class="post-metadata">

**Author:** ![teresalazar13](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/teresalazar13/32/11081_2.png) [@teresalazar13](https://forum.rasa.com/u/teresalazar13)\
**Post date:** [March 27, 2020, 11:56am UTC](https://forum.rasa.com/t/entity-recognition-to-trigger-form-requirement/19965/5 "2020-03-27T11:56:12Z")

</div>

> [@jaravo](#):
>
> tities that could be recognised. It would be good to have any of them trigger the associated form.

Is there another way to do this without stating every possible combination of entities that might be retrieved in an OR statement? @Tobias_Wochinger
