During a conversation with your action, you can temporarily store the data in the conversationToken. For the Node.js client, the token can easily be accessed from the
conv.data object. This allows the developer to retain data between intents.
To store data between conversations you can use the userStorage. However, to store the data you need to ask for consent from the user. Once granted the data can be retrieved in a new conversation.
Summary of content
- Reading the hero information from userStorage
- Checking the last seen object
- Displaying a welcome back message for a user that has already used the action
- Changing the welcome intent to display the custom response
- Testing the welcome intent in the simulator