What is an optimal way of sending extra information (metadata) in the response message (from bot side) in restful api (webhooks/rest/webhook).
To be clear, I want to send some metadata along with the form question (and every other bot utterance) so that the mobile side could know how to configure the interface based on that info.
For example, now the response has the following structure:
[
{
"recipient_id": "1",
"text": "What color do you prefer?"
}
]
But I would like it to be like this:
[
{
"recipient_id": "1",
"text": "What color do you prefer?",
"type": "color_question"
}
]
I looked it through but there is still one problem. I have a form action and there is nowhere to manually write dispatcher.utter_custom_json({"payload": "something"}) line. I would like my form action to send specific payloads with each question in the form.