<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2634489&amp;fmt=gif">

Al and Machine Learning

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

By erin karam | May 26, 2022

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.


Best answer by Romin

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.

Recent Articles

Google Cloud Strategy

AI Cheat Sheet

AI is no more and no less the drive to create robots with human minds so they can do everything we do and more. Use this cheat sheet to help decode the space.
By Leah Zitter
AI and Machine Learning

CarCast with Bruno Aziza: What Makes Us Better Than AI?!

Unlock the secrets of human cognitive superiority over AI in this compelling CarCast with Bruno Aziza and Kenneth Cukier.
By Bruno Aziza
AI and Machine Learning

CarCast with Bruno Aziza: The Metrics You CAN'T Afford To ...

Discover essential CEO metrics: Rule of 40, CAC Ratio, NRR/GRR, and more. Optimize your business for success now!
By Bruno Aziza