Clear session allows you to delete variables and reset the conversation. This is helpful when you want to start a new conversation or remove any stored information from the current session.
For example, a train booking bot could end by saving a train ticket in the ticket ordering system. Afterwards, users should be able to book a new ticket to a different location. You can achieve this with the 'clear session' action, which removes the values of set session variables. This is useful when a user asks to correct a value or wants to start over and delete all variables.
The main difference between "close conversation" and "clear session" in a bot builder is as follows:
🚨 Please avoid using Close Conversation as it's not functional. 🚨
- Clear session: allows you to reset the conversation within the same session. It deletes variables and stored information from the current session, but keeps the chat session open for further interaction. This is useful when you want to start a new conversation or remove any stored information, while still allowing the user to continue chatting.
To clear your session:
- Open your block.
- Add an Action step, choose Clear session.
- Under Clear variables, choose the variables that you would like to erase.
- Save your changes.
See also:
[New chatbot builder] Save a variable under button click
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content