Trigger a story (or intent) from a custom action?

Hello @oluwoleilesanmi and @jonathanpwheat

to have the bot be able to switch/trigger intents or fire off a different story based on some outside logic or factors.

To distinguish different stories and “trigger” them with a custom action, you should use a slot. (Definitely do not use FollowupActions - we only have them for backwards compatibility and they break your policies if you put the stories they generate into the training data.) You can then go down different story paths using rules or stories.

For example, your stories could be

stories:
- story: 1
  steps:
  - intent: utter_greet
  - action: action_choose_path
  - slot_was_set:
    - conversation_path: 1
  # The story of the first path
  - action: # ...
  # ...
- story: 2
  steps:
  - intent: utter_greet
  - action: action_choose_path
  - slot_was_set:
    - conversation_path: 2
  # The story of the second path
  - action: # ...
  # ...

Here, the conversation_path slot should be a categorical slot with one category for each path.

Each user that tries out the bot is meant to get a different story from the bot Latin Square Approach. At the end of the cycle of story selection it restarts from the first story and the sequence continues.

This sounds like you want to cycle through the order or questions in a form? To do this, you can use the requested_slots method and have it return the requested slots in an order determined by the number stored in your conversation_path slot. For this application, your conversation_path slot does not need to be featurized (so you can set influence_conversation = false).