Unique identifier for active channel users

Please i need to know what is the unique identifier that Botpress uses for differentiating between active users using my chat bot
how users saved in DB and how it select this specific user again to update in its info?

If it didn’t change since then :

If you want to get the user id, you can call event.state.user.id to retrieve it. But only after before_incoming_middleware since this is the one which loads user attributes from the database.

From this page, it says :

After everything is processed, any changes to the user object will be persisted to the database.
This means that you can alter the user object using middlwares and actions, and it will be saved at the end.

Additionnaly, you can take a look at this tutorial from Botpress for more information about user data.

Thanks a lot all for you valuable information :slight_smile: