# Rules are not recognized if custom slots are defined

**URL:** <https://forum.rasa.com/t/rules-are-not-recognized-if-custom-slots-are-defined/51735>\
**Category:** Rasa Open Source\
**Created:** [March 4, 2022, 4:12pm UTC](https://forum.rasa.com/t/rules-are-not-recognized-if-custom-slots-are-defined/51735 "2022-03-04T16:12:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HDotzaue](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@HDotzaue](https://forum.rasa.com/u/HDotzaue)\
**Post date:** [March 4, 2022, 4:12pm UTC](https://forum.rasa.com/t/rules-are-not-recognized-if-custom-slots-are-defined/51735/1 "2022-03-04T16:12:34Z")

</div>

## Good scenario: Form with slot retrieved from entity value

I have build an example bot with one form to retrieve one slot. This form is activated/submitted by rules. When form is the active\_loop and the “bot\_challenge” intent is hit, the response of this shall be returned and the form continnued afterwards. Example dialogue:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/4/7/475674cf58edcff73d137e068b5924adf0970bb0.png)

## Bad scenario: Form with slot retrieved by custom action

The exact same example as above I want to construct with custom slot filling. Example dialogue in this scenario is:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/6/8/682474bb692fc057a1771537bfd6dc2d27c6eb16.png)

Issue here is, rule policy does not recognize the rule for the bot\_challenge. I’ve tried several things like \* adding conditions to the rule

```auto
- rule: Say 'I am a bot' anytime the user challenges
  condition:
  - active_loop: form_request_day
  steps:
  - intent: bot_challenge
  - action: utter_iamabot

- rule: Say 'I am a bot' anytime the user challenges
  condition:
  - slot_was_set:
    - day_slot: None
  steps:
  - intent: bot_challenge
  - action: utter_iamabot

- rule: Say 'I am a bot' anytime the user challenges
  steps:
  - intent: bot_challenge
  - action: utter_iamabot

```

- or setting influence\_conversation param to the slot

```auto
slots: 
  day_slot:
    type: text
    initial_value: "None"
    influence_conversation: true
    mappings:
    - type: custom

```

As I need custom slots within my application I want to get the “bad scenario” to work. I’ve attached zip archive with both projects. I also attached the shell –debug logs for positive/negative examples. [log-positive.txt](https://forum.rasa.com/uploads/short-url/kJyjhqZHwL03N1QAQQoYePdQpbH.txt) (26.9 KB) [log-negative.txt](https://forum.rasa.com/uploads/short-url/ArPKyUysEZzoMrSpv4ZGEBX1JUE.txt) (21.1 KB) [test\_issues.zip](https://forum.rasa.com/uploads/short-url/rPzhoDtwjl6ueIz5Hza1myRo3KA.zip) (17.3 KB)

Any help is appreciated 🙂

---

<div class="post-metadata">

**Author:** ![andres\_pineiro](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/andres_pineiro/32/20388_2.png) [@andres\_pineiro](https://forum.rasa.com/u/andres_pineiro)\
**Post date:** [May 5, 2022, 12:18pm UTC](https://forum.rasa.com/t/rules-are-not-recognized-if-custom-slots-are-defined/51735/2 "2022-05-05T12:18:09Z")

</div>

Hi @HDotzaue, I think I’m having the same problem with my rules after the slot set. I’ve talked about it on this [post](http://forum.rasa.com/t/chitchat-or-rules-not-working-after-a-slot-was-set/49784/5) and I’ve asked about it on this [post](http://forum.rasa.com/t/conditional-rule-does-not-trigger-when-slot-is-set-by-action/46296/16), but I still don’t understand why this is happening.

Basically, all my rules start to fail if I set a slot that influence conversation from a custom action. Right now, I solve the problem by using conditions in my rules (only for booleans slots) or I move my rules to the stories, where there is no such problem.

Did you manage to understand what is happending? I guess that the reason of that problem is a silly thing, but I haven’t found an explanation yet.

Thanks,

Andrés
