How to make tracker register dispatcher.utter_message?

Hi,

I need a Custom Action to dynamically build an action’s name and then utter it, like this:

try:
     dispatcher.utter_message(template = "utter_react_"+tracker.get_slot("element"))
except:
     pass

Works fine like this. But now, I also wanna build stories depending on the concrete action that was “built” and uttered. Like this:

- story: password why story
  steps:
  - action: utter_react_password
  - intent: ask_why
  - action: utter_explain_safepw

Unfortunetly, the tracker does not register messages/actions, that were uttered through the dispatcher. Is there anyway I can work around this?

If you featurize your element slot, then stories will depend on it. So your story would be something like

- story: password why story
  steps:
  - intent: inform
  - slot_was_set:
    - element: "password"
  - action: react
  - intent: ask_why
  - action: utter_explain_safepw

The last action can be predicted correctly only if element is featurized. It also looks like you could make good use of the Resonse Selector component.