How to use the same intent "deny" for different actions

Here is the rules.yml

Rule to handle user denial for health question permission (conversation end)

  • rule: handle denial to health questions permission condition:
    • slot_was_set:
      • health_question_permission: true steps:
    • intent: deny
    • action: utter_goodbye

Rule to handle user denial in health questions (continue asking)

  • rule: handle user denial in health questions condition:
    • slot_was_set:
      • health_question_permission: false steps:
    • intent: deny
    • action: utter_next_question # Continue to ask the next health question

I have two rules set for “deny” intent but under two different conditions. Like in here there are two scenarios. In first scenario, i am going to ask a permission question to the user whether if its okay to ask question regarding his health. If the user says no, then bot has to perform the action “utter_goodbye” i.e. say bye. In the second scenario , Lets assume that the user proceeded and gave permission to ask the health related questions of him… Now while asking the health related questions to the user (say i have 5 questions to be asked regarding his health), when the user says “no” to the first question, the bot has to proceed asking the next question. So when the bot gets “deny” intent in this scenario, the bot has to give “utter_next_question” response.

So the above explained is my scenario. And i have followed several approaches and nothing is working for me… As you can see , i have set a condition to set the slot when the user gives a response whether if it is “affirm” or “deny” and provide result based on the identified slot. But even this is not working. The bot always gives “utter_next_question” response when “NO” intent is detected, which means in “slot_was_set” is never getting set to “true” . In custom actions.py file, i have conditions to set health_question_permission as “True” or “False” based on the user’s yes or no response.

I believe I was clear in explaining my situation. Any solutions or advise would be greatly appreciated. Thanks in Advance.