https://discord.gg/botpress logo
WhatsApp session expiration not working for some u...
# šŸ¤help
b
Hi guys, I'm facing a strange issue with my WhatsApp bot. I've configured the session timeout to 50 minutes, but I’ve received reports from users stating that even after being inactive for several days, the bot continues the conversation from where it left off instead of starting a new session. Has anyone encountered this before? Any advice on how to force a session reset or troubleshoot this behavior would be greatly appreciated. Thanks!
l
Hey @brave-thailand-77973 //state/reset can force reset the conversation
b
Thanks for the tip! Can I add a command or a hook at the beginning of the chat to specifically force a reset of the Summary Agent? I’ve noticed that it sometimes 'recovers' or carries over information from past conversations within the same WhatsApp thread, even after the session should have expired. I want to make sure the Agent starts with a completely clean slate for every new interactio
I’ve noticed another issue when escalating a conversation to Freshchat. It seems that parts of previous WhatsApp interactions (from days ago) are appearing in the handoff transcript. I’ve attached an image as an example of how this looks. Is there a way to ensure only the current session's transcript is sent during the escalation? It looks like the bot is pulling data from old records instead of a clean session https://cdn.discordapp.com/attachments/1504504410158530672/1504553779444580383/image.png?ex=6a076866&is=6a0616e6&hm=1e05a84cdd990580eed9af4a1d3c1fa5ee727ad5e75ad98b97d52138cd2b3c40&
l
hmmm
let me check on webchat
this behaviour is intentional it seems
b
I’m trying to ensure the Summary Agent starts with a clean slate at the beginning of every new interaction. Is there a specific way to reset the Agent's memory or context using an Execute Code card? I suspect the Agent is pulling information from previous sessions within the same WhatsApp thread, and I want to force a reset at the entry point of my flow to avoid leaking old context into current conversations or handoffs
l
for testing can you try this and see if it works?
Copy code
// Reset the Summary Agent data 
if (conversation.SummaryAgent) { 
  conversation.SummaryAgent.transcript = ""   // remove old transcript 
  conversation.SummaryAgent.summary = ""    // remove old summary 
} 
// (optional) also reset any custom turn variables you may have used 
turn = {}
l
does the timeout have an end node to really end the conversation?
8 Views