Slot values not showing when using them in json response

Hello,

I am trying to output slots in JSON as response to the user:

  utter_tt_transfer_values:
  - text: "{tt_amount} and {tt_to_account}"

works

  - custom:
      amount: {tt_amount}
      to: {tt_to_account}

output as follows:

Custom json:
{
  "amount": {
    "tt_amount": null
  },
  "to": {
    "tt_to_account": null
  }
}

I have logging and I can see the slots are set, if I use them in text (first sample) it is all good. Any idea what’s wrong?

Thanks!

Hello,

I managed to fix it myself thought I still do not understand why it should be like this:

  utter_tt_transfer_values:
  - custom:
      action: "transfer1"
      amount: 
        text: "{tt_amount}"

using text key made it work

What about this?

  - custom:
      amount: "{tt_amount}"
      to: "{tt_to_account}"