How are default variables USER_ID and SESSIONS handled/initialized/set by/on on Google Assistant?

Hi guys. I’m building for Google Assistant, trying to understand how to identify/recognize individual users so I can save/retrieve their data from a DB (Sheets, Airtable, etc), and deliver a personalized experience.

How are the system’s built-in variables USER_ID and SESSIONS set, initialized or handled when the user enters or renters my voice app?

Is the system’s built-in variable USER_ID automatically set or provided by Google when the user enters or renters my voice app?

Is the system’s built-in variable SESSIONS automatically set or provided by Google when the user enters or renters my voice app?

Any advice would be highly appreciated,
Greetigns from Bali, K

Hi @klemenstruc !

During your tests in the Voiceflow test tool or shared prototype, USER_ID will always be ‘TEST_USER’, and SESSIONS start at 1 on every new test.

On the Alexa/Google platforms, these two variables are automatically populated/saved and are persistent between sessions. The SESSIONS variable will be auto-incremented on each new session.

1 Like

Merci @Nicolas . This answers my question and raises my know-how. K