How to say goodbye to the user, with the condition of checking the slot?

I haven’t found an answer to a simple question. How to say goodbye to the user, with the condition of checking whether the slot with the username is filled? If the PERSON slot is empty, then say goodbye “Hello”. If the slot is full, then say goodbye "“Hello, {PERSON}”. It would seem that this is a simple rule, and should be in all bots. But I could not find an answer.

If so, it gives an error:

#rules.yml

  • rule: Say goodbye, no name condition:

    • slot_was_set:
      • PERSON: null steps:
    • intent: goodbye
    • action: utter_goodbye
  • rule: Say goodbye including name condition:

    • slot_was_set:
      • PERSON steps:
    • intent: goodbye
    • action: utter_goodbye_username

You can use a Custom Response Variation.

1 Like