<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

Data Analytics

Generative AI: Are You Behind?!

Review the latest insights from the AI Readiness Report.
By Bruno Aziza
Industry Solutions

Make "Gen AI Work": Landscape, SLMs vs. LLMs, Cost & More...

Discover the 5 metrics you need to know in order to be an exceptional CEO and Operator.
By Bruno Aziza
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