Is there a way to track user Id between conversations without requiring the user to connect their Google account? Like an anon userId. I don't see any id field in the docs: https://dialogflow.com/docs/fulfillment#request
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
According to the latest usage, conv.user.id is DEPRECATED: Use conv.user.storage to store data instead
For more details, have a look at this answer by Prisoner.
回答2:
you can get userId like this:
let userId = conv.user.id;
Sample intent:
app.intent(INTENT_DEFAULT_WELCOME, conv => {
let id = conv.user.id;
conv.ask(`Welcome ${id}`);
})