Set slot value and call utter_template - Not working

I want to set slot value in the custom action and then use the same in my response.

In my custom action, I have this code written:

    slots = []
    slots.append(SlotSet("color_suggestion", "Red"))
    dispatcher.utter_template("utter_suggest_color", tracker)
    return slots

in domain, utter_suggest_color is defined as:


  • text: “{color_suggestion} color looks great.”

However, the slot value is not picked up. Response is printed as “None color looks great.”

How to fix this??

I tried one more option too:

Removed dispatcher.utter_template from my custom action. In the story it is used.

  • some intent
    • action_get_color <— this sets the slot color_suggestion
    • utter_suggest_color

this is not even giving me the response.

Same solution as here

1 Like

Thanks. It worked for me.