Triggering a custom action for a particular intent

I am using rasa 1.4.3 and was wondering if this version or any other version has the functionality to insert triggers: custom_action for a certain intent inside domain file.

Yes, this functionality is described here: Policies

1 Like

Thank you very much. Moreover, I will like to explain my situation. I have an intent called “affirm” which basically captures the text like “Ok”, “Yes”, “Sure”. so, I have a story like:

Story: 1

- utter_affirm_response

In addition to that, I have a few specific tasks such as asking about a meeting schedule of a certain person. If a user asks for a meeting schedule of a person say “Sharmila Upadhyaya” and user asks: What is meeting schedule for “Sarmila Upadhyaya” (which is the slightly wrong spelling), then my custom component will detect the word and asks “Do you mean Sharmila Upadhyaya”. In such case.

Story 2:

* meeting{"autocorrect_user":"abc"}
- utter_doyoumean
* affirm
- action_meeting

So I have these sorts of multiple examples. However, every time bot asks do you mean Sharmila Upadhyaya and user response yes(which is intent: affirm), rasa responses with utter_affirm_response, instead of action_meeting. My config file looks like this:

  - name: "autocorrect_entity.AutocorrectNouns"
  - name: "SpacyNLP"
  - name: "SpacyTokenizer"
  - name: "SpacyFeaturizer"
  - name: "RegexFeaturizer"
  - name: "CRFEntityExtractor"
  - name: "SpacyEntityExtractor"
  - name: "EntitySynonymMapper"
  - name: "SklearnIntentClassifier"

  - name: KerasPolicy
    max_history: 5
  - name: AugmentedMemoizationPolicy
    max_history: 5
  - name: MappingPolicy
  - name: "FallbackPolicy"
    nlu_threshold: 0.009
    core_threshold: 0.009
    ambiguity_threshold: 0.01
    fallback_action_name: "action_default_fallback"

What might be the problem? I also tried modifying Story 2 as:

Story 2:

* meeting{"autocorrect_user":"abc"}
- action_some_simple
- utter_doyoumean
* affirm 
  - slot{"autocorrect_user":"abc"}
- action_meeting.

But no luck.

@sarmilaupadhyaya have you tried running rasa test against your stories with your trained model to see if there’s any conflicting stories?