Template shows 'None' even thou, slot is filled


I am using the FormAction for similar use, as shown in the formbot example, only difference is, that during the SlotFilling I need to fill one additional slot with value calculated from received value. Currently, I am using validation part of the FormAction to calculate and Set the aforementioned slot and then send template, which displays value of that slot. But even though, all loggings shows that rasa received and set that slot, template renders it with ‘None’ value.

For better understatement:

  1. Users says, that it has 1000 dollars.
  2. FormAction validates, the value, sets slo ‘amount’ to 1000, and sets the slot ‘guarantee’ to 1000 * 0.9 = 900
  3. Bot receives the Actions [SetSlot(amount, 1000), SetSlot(guarantee, 900), UtterTemplate(submit)] from Action endpoints (Template submit: “Service guarantees only 90% of your assets (which in your case would be {guarantee})”)
  4. Bot responds with: Service guarantees only 90% of your assets (which in your case would be None)

is it the last slot?

Hey @Kyras. Can you send us how your validation function and stories for the form look like?

Hi! Sorry I cannot, it is part of internal tool and I posting parts of that would require an owner explicit permission. I found out, that the problem can be solved, by explicitly setting the value in Dispatcher.utter_template('template', tracker, my_slot=value), because the actual value must be pre-calculated anyway, only shame is that, this is not mentioned anywhere in the actual documentation.

We made some fixes in the documentation and for the examples for using forms. You could also change the value saved for a slot by changing it in a validate_{requested_slot} function as shown in the formbot example here: