Where will the reply of a Carousel Selector be sent when using Dialogflow fulfillment server?

一曲冷凌霜 提交于 2019-12-02 03:55:01

For starters - rest assured. You need only one webhook and that is the one that you're already using to work with Dialogflow. Responses will go through Dialogflow, but you need to make sure you've added an Intent to handle it.

The intent needs to be set to use an Event of actions_intent_OPTION. You should not give it any training phrases, but do make sure you set the Action and turn on the fulfillment selector.

When you handle this in your webhook, if you're using the Node.js API, the key of the option will be in a context named actions_intent_option. You can access it with something like this:

const param = app.getContextArgument('actions_intent_option', 'OPTION').value;

If you prefer to use JSON, you can find the information under

originalRequest.data.inputs[0].arguments[0].textValue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!