1

I'm trying to personalize the welcome message after a second return of the user into my app. To identify the User I save the "userId" which is generated and sent by google in the Action-Request.

It works all fine in the simulator where the userID looks something like this:

ABwppHGLJJ-odPadAddq-HOIqpS_tee0jFGJsMV5r-uTCaC9_4Hpz9hi-7YR9823Ulf9PkO7AWJjsotr0989A 

When I test my Alpha-App on a real device, the "userId" is always same to the conversationId. Both ID's change on the next visit, which makes it impossible to identify the User.

{
  "user": {
    "userId": "1529659908330",
    "locale": "de-DE",
    "lastSeen": "2018-06-22T09:31:45Z"
  },
  "conversation": {
    "conversationId": "1529659908330",
    "type": "ACTIVE",
    "conversationToken": "[]"
  },
  "inputs": [
    {
      "intent": "actions.intent.TEXT",
      "rawInputs": [
        {
...
...
..
}

Is this a normal behavior in the Alpha stage? Will this behavior change after the App is released to Beta/Production?

I have to mention, that the action is not released yet (Alpha).

//Edit: The "userId" is a Unixtimestamp in miliseconds

Gianni C
  • 53
  • 6
  • Can you store data in the `conv.user.storage` that is persistent? Does `conv.user.last.seen` always remain undefined? What device are you using for testing? – Nick Felker Jun 22 '18 at 17:50
  • I use the official Google Home Mini device. – Gianni C Jun 25 '18 at 06:20
  • Did you do voice matching to match your account to the device? If not, the Mini will not guarantee that the same person is using the action every time. – Nick Felker Jul 23 '18 at 20:15

1 Answers1

0

Note: userId is deprecated.

As Nick mentioned, you can use userStorage to remember a user. This should give you all information you need around Saving Data in a Conversation.

However, the content of user storage is cleared at the end of conversation if...

  • Voice Match is set up but the user couldn't be matched (e.g. background noise or whatever)
  • The user disabled personal data

Hope this helps.

lisa p.
  • 2,138
  • 21
  • 36