Can a custom action influence or divert from a story

Chris, Thanks for you reply. I guess I didn’t formulate my question precisely. What I want to do is to implement a custom action that can divert the conversation towards another intent. Take as an example the foloowing story:

- story: tell dirty joke
  steps:
  - intent: tell_dirty_joke
  - action: action_custom_can_tell_dirty_joke
  - action: utter_dirty_joke1
  - action: utter_dirty_joke2

As you can see, after the intent “tell_dirty_joke”, we trigger the custom action “action_custom_can_tell_dirty_joke” that should check (based on some algorithm) weather the bot should tell a joke or not, if the algorithm on the custom action rules the user can’t get a dirty joke, the bot will not execute “utter_dirty_joke1” and “utter_dirty_joke2”, but send a message, he can’t tell the joke now and say goodbye.

Obviously, this is just a example, but it serves to illustrate the general use case we have.

I have been looking on this forum and I have found this thread with a very similar need Trigger intent from custom action - #3 by Polaris000

I understand that we can have the action to fill a slot, and use for that, but in our use case we may have hundreds os stories like that that need verification before executed, so that is why using slots and alternative paths seems too overkill, also given all the possible paths a user take in a conversation. So I am wondering if there’s something we can do to enhance this.

BTW, I am using Rasa Core 3.1

Any advice on this is greatly appreciated.

Thank you Emerson