# Adding slots in domain.md

**URL:** <https://forum.rasa.com/t/adding-slots-in-domain-md/14019>\
**Category:** Rasa Open Source\
**Created:** [August 7, 2019, 2:46am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019 "2019-08-07T02:46:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![capgos17](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/capgos17/32/3895_2.png) [@capgos17](https://forum.rasa.com/u/capgos17)\
**Post date:** [August 7, 2019, 2:46am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019/1 "2019-08-07T02:46:24Z")

</div>

hey I have two different types of games 1)outdoor\_game

- 

```
  cricket

```

- 

```
  football

```

2)indoor\_games

- 

```
  chess

```

- 

```
  bliend_man_buff

```

- 

```
   luddo

```

game type: indoor\_games outdoor\_games game name: cricket,football,chess,bliend\_man\_buff,luddo

how can add these slot values in domain file so that rasa should understand the order.

stories.md …

- games\_played
  - utter\_ask\_game\_type

- inform{“game\_type”:“indoor”}
  - slot{“game\_type”:“indoor”}
  - utter\_ask\_game\_type\_indoor

- inform{“game\_name”:“chess”}
  - slot{“game\_name”:“chess”} … games\_played
  - utter\_ask\_game\_type

- inform{“game\_type”:“outdoor”}
  - slot{“game\_type”:“outdoor”}
  - utter\_ask\_game\_type\_outdoor

- inform{“game\_name”:“cricket”}
  - slot{“game\_name”:“cricket”}

@Juste @amn41@akelad

---

<div class="post-metadata">

**Author:** ![msamogh](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/msamogh/32/3478_2.png) [@msamogh](https://forum.rasa.com/u/msamogh)\
**Post date:** [August 7, 2019, 7:53am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019/2 "2019-08-07T07:53:53Z")

</div>

> how can add these slot values in domain file so that rasa should understand the order.What order?

The order of what, exactly?

---

<div class="post-metadata">

**Author:** ![capgos17](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/capgos17/32/3895_2.png) [@capgos17](https://forum.rasa.com/u/capgos17)\
**Post date:** [August 7, 2019, 7:59am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019/3 "2019-08-07T07:59:50Z")

</div>

that chess belongs to indoor game and cricket belongs to outdoor game for example in the story:

- games\_played
  - utter\_ask\_game\_type

- inform{“game\_type”:“indoor”}
  - slot{“game\_type”:“indoor”}
  - utter\_ask\_game\_type\_indoor

> - inform{“game\_name”:“chess”}

- slot{“game\_name”:“chess”} … games\_played
- utter\_ask\_game\_type
- inform{“game\_type”:“outdoor”}
  - slot{“game\_type”:“outdoor”}
  - utter\_ask\_game\_type\_outdoor

- inform{“game\_name”:“cricket”}
  - slot{“game\_name”:“cricket”}

At the pointed place if instead of chess(indoor) if the user gives cricket(outdoor) then it should give an error that cricket isn’t an intdoor game because I have only two entities: game\_type and game\_name and for all indoor and outdoor\_games, the entity is game\_name

hey @Juste @amn41 @akelad please help

---

<div class="post-metadata">

**Author:** ![fuih](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fuih](https://forum.rasa.com/u/fuih)\
**Post date:** [August 8, 2019, 2:57am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019/4 "2019-08-08T02:57:41Z")

</div>

You probably should use FormAction for that kind of behavior. Using FormAction you can validate specific slots, utter error messages and make the user enter a slot again. You can read about FormAction here: [Forms](https://rasa.com/docs/rasa/core/forms/#form-basics)

---

<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:** [August 8, 2019, 9:31am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019/5 "2019-08-08T09:31:11Z")

</div>

Hey @capgos17. @fuih made a great suggestion, for such situation you should try out the FormAction. You can validate the slots and implement the slot mapping so that your bot would know better which intents should link to which slots.

---

<div class="post-metadata">

**Author:** ![capgos17](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/capgos17/32/3895_2.png) [@capgos17](https://forum.rasa.com/u/capgos17)\
**Post date:** [August 8, 2019, 9:32am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019/6 "2019-08-08T09:32:47Z")

</div>

but I’m useing node server for custom action I’m not using the rasa-sdk

---

<div class="post-metadata">

**Author:** ![madtrevor](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/madtrevor/32/11108_2.png) [@madtrevor](https://forum.rasa.com/u/madtrevor)\
**Post date:** [November 20, 2022, 9:10am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019/7 "2022-11-20T09:10:45Z")

</div>

Still using FormAction, you can check certain slots, say error messages, and make the user enter the slot again. So give it a try. If it still doesn’t work you can look [here](https://fairgocasinovip.com/bonuses/) for a solution to your problem. If you can’t find a solution, just contact support and they will help you. I don’t see any other options besides these. Unless you start using rasa-SDK. I hope my answer was helpful and that you find a solution to your problem. Good luck.

---

<div class="post-metadata">

**Author:** ![jamescarrey](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@jamescarrey](https://forum.rasa.com/u/jamescarrey)\
**Post date:** [May 31, 2023, 8:22am UTC](https://forum.rasa.com/t/adding-slots-in-domain-md/14019/8 "2023-05-31T08:22:07Z")

</div>

> [@capgos17](#):
>
> that chess belongs to indoor game and cricket belongs to outdoor game for example in the story:
> 
> - games\_played
> - utter\_ask\_game\_type
> 
> - inform{“game\_type”:“indoor”}
> - slot{“game\_type”:“indoor”}
> - utter\_ask\_game\_type\_indoor
> 
> > - inform{“game\_name”:“chess”}
> 
> - slot{“game\_name”:“chess”} … games\_played
> - utter\_ask\_game\_type
> - inform{“game\_type”:“outdoor”}
> - slot{“game\_type”:“outdoor”}
> - utter\_ask\_game\_type\_outdoor
> 
> - inform{“game\_name”:“cricket”}
> - slot{“game\_name”:“cricket”}
> 
> At the pointed place if instead of chess(indoor) if the user gives cricket(outdoor) then it should give an error that cricket isn’t an intdoor game because I have only two entities: game\_type and game\_name and for all indoor and outdoor\_games, the entity is game\_name

You probably should use FormAction for that kind of behavior. Using FormAction you can validate specific slots, utter error messages and make the user enter a slot again
