Trigger a story (intent) based on entity value

Is there any method using which I can check the presence of a slot value (irrespective of the running story) and take decision accordingly? For eg, I implemented the sentiment analysis based on this custom component, now, whenever the sentiment is negative, I want to trigger a particular story.

To perform the above task by looking at the entity value in an action everywhere in every story at every user input would be a messy thing to do. Any pointers/ideas how to implement the same? Any documentation around it?

Thanks

Hey @abhiarora, would you want the exact same story triggered for this negative sentiment no matter what the intent? In that case you could write a story like:

* intent_1{"sentiment":"neg"} OR intent_2{"sentiment":"neg"} OR ...
  - utter_something

Of course you would also have to make sure that you add a slot to your domain, of the categorical type.

how can i specify them in rasa 2.0 stories.yml file?

Does that mean if I have 50 intents then I have to write 49 OR statements? That doesn’t look nice and is difficult to maintain.

Is there any way roundabout? Like defining a rule that is triggered when a specific condition is met. (I don’t know. I am a newbie)