# Multiple entities values to single slot in rasa form

**URL:** <https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842>\
**Category:** Rasa Open Source\
**Created:** [April 26, 2022, 8:14am UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842 "2022-04-26T08:14:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [April 26, 2022, 8:14am UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842/1 "2022-04-26T08:14:44Z")

</div>

Hi All,

I have to build a conversational chatbot where user is trying to create a preference using some filters and the **workflow** goes like this

**User :** I would like to create an preference

**Bot :** Provide filter criteria? e.g HSQ, IEA, 10GE etc…

**User :**  **HSQ, EEA, IEA, 10GE, Ethernet, 100GE** are the filters for my preference.

**Bot :** Provide preference name? e.g quick\_checks, my\_preference etc…

**User :** my\_test\_preference.

These **HSQ, EEA, IEA, 10GE, Ethernet, 100GE** are the values of multiple entities (`portSpeed, productType, deviceType, deviceUsage and deviceModel`) and user will always provide multiple filter values in single message, so I used form to collect the user input and trying to store all the user filter values in a slot (type as list).

I have define my slot and forms like this

```auto
slots:
  filter_criteria:
    type: list
    influence_conversation: false
  preference_name:
    type: text
    influence_conversation: false

```

```auto
forms:
  create_preference_form:
    filter_criteria:
      - type: from_entity
        entity: portSpeed
      - type: from_entity
        entity: productType
      - type: from_entity
        entity: deviceType
      - type: from_entity
        entity: deviceUsage
      - type: from_entity
        entity: deviceModel
    preference_name:
      - type: from_text

```

When I tried to get slot value in custom action like this, I always get `filter_criteria` value as `None`.

```auto
        filter_criteria = tracker.get_slot('filter_criteria')
        print('User filter criteria : ', filter_criteria)

```

How can I store multiple entities `portSpeed, productType, deviceType, deviceUsage and deviceModel values in filter_criteria slot` ?

Thanks in Advanced 🙂

---

<div class="post-metadata">

**Author:** ![soerenetler](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@soerenetler](https://forum.rasa.com/u/soerenetler)\
**Post date:** [April 26, 2022, 10:44am UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842/2 "2022-04-26T10:44:54Z")

</div>

Hi @naveensiwas, may I ask why you are not using multiple slots? On slot for each entity. They can still be filled in one message. Do all entities need to be provided?

---

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [April 26, 2022, 11:17am UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842/3 "2022-04-26T11:17:40Z")

</div>

> [@soerenetler](#):
>
> Hi @naveensiwas, may I ask why you are not using multiple slots? On slot for each entity. They can still be filled in one message. Do all entities need to be provided?

Hi @soerenetler good question,

It’s not necessary to provide all entities values at a time, but most of the time it will be multiple entities only, by user in one message.

If I need to define one slot for each entity, then how to define those entity blocks for each slot. Since those slots still be filled in one message only, can you please help me with sample code ?

Thanks in Advanced 🙂

---

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [April 28, 2022, 5:13am UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842/4 "2022-04-28T05:13:05Z")

</div>

Hi @itsjhonny,

It would be great, if you can help me on this please.

---

<div class="post-metadata">

**Author:** ![itsjhonny](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/itsjhonny/32/20201_2.png) [@itsjhonny](https://forum.rasa.com/u/itsjhonny)\
**Post date:** [April 28, 2022, 1:07pm UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842/5 "2022-04-28T13:07:36Z")

</div>

Hi @naveensiwas ! 😃

I will check the problem and try to reproduce in my local environment to make a better investigation 😃

What is your rasa version? 3.1 ?

---

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [April 28, 2022, 1:55pm UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842/6 "2022-04-28T13:55:15Z")

</div>

Hi @itsjhonny,

Yes please and I am using **RASA 2.8.14** version.

---

<div class="post-metadata">

**Author:** ![karan](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@karan](https://forum.rasa.com/u/karan)\
**Post date:** [October 12, 2022, 12:59am UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842/7 "2022-10-12T00:59:58Z")

</div>

hi @naveensiwas! You found the way?

---

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [October 17, 2022, 10:48am UTC](https://forum.rasa.com/t/multiple-entities-values-to-single-slot-in-rasa-form/52842/8 "2022-10-17T10:48:47Z")

</div>

No @karan I wrote my own code to handle this scenario.
