Is there a way to clear all session variables on DialogFlow CX? | C2C Community

Is there a way to clear all session variables on DialogFlow CX?

  • 26 January 2022
  • 4 replies

I would like to be able to allow a user to go through my bot flow two times. 


The second time, I would like an easy way to clear my session without having to manually set every variable to null in transition.

4 replies

Userlevel 7
Badge +56

@Druva Reddy I’ve seen you answer all the other DialogFlow CX questions.

Can you help @ekaram with this?

A couple of points on this:

  1. There is a symbolic event END_SESSION and if this is transitioned to, then all the variables should be cleared up and you will be sent back to the start page of the default flow.
  2. You can then programmatically invoke this from any of your flows, by defining a custom event+transition that takes you to END_SESSION. This can be done then from any of your flows as per your logic. See this answer for a sample implementation.
Userlevel 7
Badge +56

Thanks for the points you mention @Romin!

@ekaram was your question answered?

Userlevel 4
Badge +3

Hi there! Just wanted to mention that Dataflix will be joining our Coffee Chat on Tuesday, Feb. 15. Learn how organizations can improve customer experience while reducing operational cost using Conversation AI platforms like Dialogflow on Google Cloud. 


Register here!