Actions-on-Google user.storage not saved on Dialogflow SDK

dialogflow save data
dialogflow save data to firebase
dialogflow store user data
dialogflow firebase fulfillment
dialogflow save user input
dialogflow api
dialogflow get user location
actions on google permissions

I've developing an action by using Dialogflow SDK and Firebase Functions. I'm using conv.user.storage to save user ID between conversations. However, every time user comes to action, Action can not recognize saved ID and shows it "undefined". I've been developing this action for a while and users that I created for test 2-3 months ago, have conv.user.storage and they can be recognized. Is there a limit for storing data or something else?

Here is my code:

if (!conv.user.storage.userId || typeof conv.user.storage.userId === "undefined") {
  conv.user.storage.userId = uuidv1();
  console.log("new implemented userID.", conv.user.storage.userId);
}
else {
  console.log("ID from storage", conv.user.storage.userId);
}

I think this conv.user.storage does not work properly! It did not work for me even with the voice match and allowed privacy setting! You can also see it here. Google support suggested me to use Google account linking to get unique user id from the users and save it to the db. This is the documentation for account linking: https://developers.google.com/actions/identity/google-sign-in

User storage | Conversational Actions, It's possible your workflow is not setup to allow for storing user data consistently. You can check the documentation on expiring the data. If you're using a smart speaker, ensure voice match is setup. If you use the Actions on Google Node.js client library, you can interface with the conversation token as a JSON object using conv.data, where conv is your instance of Conversation. Note: The Conversation.conversationToken field is not supported by Dialogflow webhook requests. Instead, your fulfillment can use a Dialogflow context to persist

i was facing the same problem as you.. I found the fix in this comment in a github issue. Basically when enabling the Web & App permissions in the Activity Center you need also to check " include chrome history .... "

Actions-on-Google user.storage not saved on Dialogflow SDK , Defined in service/actionssdk/conversation/user.ts:206 else { conv.ask(`I won't be able to save your data, but what do you want to Properties will be undefined if not request with conv.ask(new Permission) someProperty = 'someValue' }) // Dialogflow app.intent('Default Welcome Intent', conv => { conv.user.storage. Dialogflow is a natural language understanding platform that makes it easy to design and integrate a conversational user interface into your mobile app, web application, device, bot, interactive voice response system, and so on. Using Dialogflow, you can provide new and engaging ways for users to interact with your product.

It's possible your workflow is not setup to allow for storing user data consistently. You can check the documentation on expiring the data.

https://developers.google.com/actions/assistant/save-data#user_storage_expiration

If you're using a smart speaker, ensure voice match is setup. And make sure you have all the necessary permissions turned on.

User, I am using dialogflow-fulfillment version 0.6.1, and action-on-google version 2.5.0 . Latest documentation shows that user storage does not work if user status is GUEST If I perform the save onto conv.user.storage using the google home for me, assistant on 2 different phones, on actions on google sdk,� User storage. Use user storage when you want to persist a value across conversations for a single verified user. For example, a game can save a user's high score in user storage and present the high score in the welcome message each time the user starts a new conversation. Home storage

How to persistently store value in conv.user.storage? � Issue #196 , Following the Actions on Google documentation regarding saving and clearing data across conversations, I tried to update the values set at Conversation.user. storage to persist a set of parameters for future use: const app = dialogflow({d Contact GitHub � Pricing � API � Training � Blog � About. You can't� Important: Do not use home storage to store any personal data. Home storage data applies across multiple individuals in the same household who use the same Action. For user-specific data, instead use user storage and ask for the user's consent before saving any personal data.

Conversation.user.storage does not update across conversations , I have integrated the dialogflow API by providing a webhook URL and an access- token. Since, the userId is not being sent in the payload, we are relying on the conversationId present in Woraround is to use the userStorage facility provided by Actions on Google. Your response was recorded. The general process for using a helper with Dialogflow and Actions SDK is described below for Dialogflow and the Actions SDK. See the specific helper sections for more information about each helper. Note: Only the List and Carousel helper option includes a simple response that supports SSML. For more information about SSML support, see Responses.

userId is missing from the Dialogflow API response, In userStorage, I have saved the userId to recognize the user next time they open the app, but Create An Action For The Google Assistant With the New Actions Builder Video Tutorials - Learn to build using Actions Builder & Actions SDK! of the users' sentences and the intent they activated (as happens on Dialogflow). Following the Actions on Google documentation regarding saving and clearing data across conversations, I tried to update the values set at Conversation.user.storage to persist a set of parameters for future use: const app = dialogflow({d

Comments
  • Thanks @Frosty! I used same method. Yet, I still need some data to store. I'm in contact with support. I'll let you know if I get some useful help from support.
  • Thanks! Yet, I am not the one facing this problem. The main issue here is users can not be recognized by application and how can I make them to check or change on their phone?
  • Hi Nick! I don't use smart speaker. And checked for user preferences to save data. What else may cause this problem, do you have any idea?