https://discord.gg/botpress logo
Botpress + WhatsApp: Flow doesn’t restart on new u...
# 🤝help
m
Platform: Botpress (works perfectly in Studio; issue only on WhatsApp) After a chat is completed or ended, if the user messages again later, the flow resumes from the previous step instead of starting from Step 1. Expected behavior: When a user returns (or when a conversation is considered “ended”), the bot should start from the first question in the workflow. Actual behavior: The bot continues from the last asked question from the previous session on WhatsApp. What I tried / Observations: Studio tests: OK (flow restarts normally) WhatsApp integration: resumes mid-flow Question: What’s the recommended way on WhatsApp to reset conversation state (session/context/workflow variables) so the next message from the user triggers the flow from the beginning? Is there a best-practice trigger or hook to clear session data at “end of conversation” or after inactivity? I will send you prompt from Book a villa workflow. Attachments: Screenshot of workflow Screenshot: Chat 1 (first run) Screenshot: Chat 2 (returning user resuming mid-flow) https://cdn.discordapp.com/attachments/1407358177254572125/1407358178613788783/workflows.png?ex=68a5cff1&is=68a47e71&hm=28b89f9310d8a0f0b1f018519e18d4d065e0dbdcf78a392644c098777172d02e& https://cdn.discordapp.com/attachments/1407358177254572125/1407358180551299092/message.txt?ex=68a5cff1&is=68a47e71&hm=7864998e1612d9c50e2a446b3b6dbb14803ffcac5b4762ce84b8452f3b016434&
p
Have you tried resetting the variables in which the information is collected during your timeout flow or before the main one starts?
m
Yep, i tried something like this but still same . Is there a better way? I know there is //state/reset but that's not really solution since it is not user-friendly. This is right before Autonomous Node https://cdn.discordapp.com/attachments/1407358177254572125/1407366252904579162/image.png?ex=68a5d776&is=68a485f6&hm=202c9cc39d938420ae92467b20677a8eb1e5a01af727397862fb5f44221ae97d&
l
Book a villa has an Exit, but not an End - so technically your conversation is still open. you have a timeout flow. connect Standard12 to End
m
Okay, but there is End node in timeout, since timeout has occurred it should start as new ?
l
that will only work after timeout
2 Views