Reputation: 27
I'm trying to set up Dialogflow interaction with my Go service. Is there any way to use 'formatting' in response? The perfect solution for me is if I could get some data from my service, let's say the manager's name, and then substitute it as if it was an input parameter. And use it like this I know there is a way to process it and compile the answer on my own at webhook but it's not possible with multiple responses where I can substitute the calculated answer. Is there any way to do it? Thanks
Upvotes: 1
Views: 899
Reputation: 50741
Yes, but the way you "get some data" from your service is via a webhook.
The webhook, however, can then save values into a Context parameter which can be used with a Response from the UI using the format
#contextName.parameterName
However, once you are using webhooks, it is usually better to do the response formatting there, since it can be much more powerful. You can still randomly pick a response from a list, do other filtering and conditionals, and even adjust the response to correctly handle plurals.
Upvotes: 1
Reputation: 732
This is unfortunately not possible. Dialogflow should really only be used for detecting intents, parameters etc. Whenever something needs to be calculated or formatted you will need to use your webhook to do that. You can use multiple responses in your webhook, it will just not show up in the Dialogflow console which only shows 1 reply.
I would suggest you to link your bot to the messaging channel where you will deploy it to. Personally I link it to Telegram or Crisp.chat (an omnichannel platform).
Upvotes: 0