Prevent Typebot Return

Hi, I'm chaining typebots together using the "Link to Typebot" block, in the docs it says "You do NOT need a Return block when using the Link to Typebot block. It automatically returns when the linked flow finishes.". I'm actually looking to do the opposite at one point in the flow and have it NOT automatically return to the calling Typebot, is there a way to end execution at that point with some sort of stop/exit block/command?
12 Replies
Baptiste
Baptiste3mo ago
That's a good point Well no, I don't understand It's only a matter of where you place the Link to typebot block If you expect the bot to finish there, then avoid having other blocks after the link to typebot block
DirkGently
DirkGentlyOP3mo ago
I think the problem is I don't know if the typebot should finish there or not as it's based on a user answer. In the simplistic example shown in the image, you traverse a problem solving chatbot made up of multiple typebots (as each one can be fairly complex) and at any point you may be asked "Did this solve your problem?", if Yes, then we can just exit/stop at that point. If No then it's fine to return and continue on the other paths.
No description
Baptiste
Baptiste3mo ago
Maybe then share a variable called Problem solved and add a condition block after the Link to Typebot block? Would that work?
DirkGently
DirkGentlyOP3mo ago
Yes, that might work, I was unsure about variable scope (I’m unable to try it at the moment but will do tomorrow). So if I set a variable in say TYPEBOT 1B to 0, then set it to 1 in TYPEBOT 1C then on return TYPEBOT 1B will see the variable as set to 1? Thanks for your help by the way.
DirkGently
DirkGentlyOP3mo ago
I gave this a try but unless I'm fundamentally misunderstanding something it didn't work. I created an isolated test case with 2 typebots, both have a variable set called problem_resolved. I initialize it to 0 in typebot1, then Link to typebot2 where I set problem_resolved to 1, when it returns to typebot1 problem_resolved is still set to 0. I hope the attached image highlights the scoping issue I'm having.
No description
Baptiste
Baptiste3mo ago
Yes, should be Interesting, let me try to reproduce, might be a bug then!
Baptiste
Baptiste3mo ago
Ok my bad, it would only work if you enabled the Merge answers option (https://docs.typebot.io/editor/blocks/logic/typebot-link#merge-answers)
DirkGently
DirkGentlyOP3mo ago
Ah, excellent, I’ll give that a try, thanks!
darmitage.
darmitage.2mo ago
Merge is not working for me. In this simple example, I have a variable in the sub-typebot named chat_history. I have even tried initializing it in the calling typebot but that also didn't help. What am I missing?
No description
Baptiste
Baptiste2mo ago
Could not reproduce!
Baptiste
Baptiste2mo ago
No description
No description
Baptiste
Baptiste2mo ago
If you can export your bots so that I try with your specific set up 🙂

Did you find this page helpful?