Learn more about how to get access to Google Action user information.
User information is mainly used to offer a more personalized experience, but you can't access it right away. First you have to ask for permission.
With Jovo, a Google Action
userId is created by generating a random id using
uuidv4, and then saving it to the user storage object.
Note: User Storage only works for Google Assistant users who are verified. For users that are not verified, the data will expire at the end of the conversation. Learn more in the official Google Docs.
Since Google does not provide a way to get user information such as email and name yet, you need to use the Google profile to access their data.
This will return an object containing user information in the following format:
In order to get access to the user profile, you'll need the user to link their account to access their information, if the user is not already linked.
To implement Account Linking in your voice application, we recommend using scenes to handle the individual steps of account linking.
There are multiple ways of setting up the scenes necessary, we recommend creating them inside your model file to deploy them directly to the Google Conversational Actions Console.
These two scenes, located inside your Jovo model, determine how Account Linking is handled for your Conversational Action.
AccountLinkingScene propagates the request to
AccountLinkingScene_AccountLinking, depending on whether the user is verified or not, which in turn sends the result from the Account Linking process to your webhook handler.
To trigger Account Linking, you can instruct your Google Action to handle the next conversation step with the specified scene:
After the user has responded to your account linking request, you will receive a request to notify you about the result, which will be mapped to the Jovo built-in