Skip to content

Commit

Permalink
📝 (typebotLink) Add instructions about shared variables and merge ans…
Browse files Browse the repository at this point in the history
…wers
  • Loading branch information
baptisteArno committed Sep 29, 2023
1 parent cd97da2 commit 1a4b8bb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions apps/docs/docs/editor/blocks/logic/typebot-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ sidebar_position: 5

The typebot link logic block allows you to go into another typebot flow. This ultimately helps keep your flows clean and be able to reuse a flow in multiple places.

<img
src="/img/blocks/logic/link.png"
width="100%"
style={{ maxWidth: '600px' }}
alt="Link to typebot logic block"
/>
<img src="/img/blocks/logic/link.png" width="100%" style={{ maxWidth: '600px' }} alt="Link to typebot logic block" />

Variables are shared by default, you just need them to make sure they are present in the variables dropdown on both flows.
## Share variables between bots

## Link to the current typebot
The existing variable values are automatically shared to the linked bot. It means that if this linked bot contains similar variable names, it will be automatically pre-filled with the values from the previous bot.

You can also use this block to "clean" your flow of any long edges (connected arrows). For example, if you want the user to start the current bot again. Instead of connecting a gigantic arrow to the first group, you could add a "Link to typebot" block, choose "Current bot" and select the first group of your flow.
Example: My first bot asks for the user's name and stores it in the `Name` variable. Then, I link to another bot that displays a `Name` variable in a text bubble. This will display the name collected in the first bot.

## Merge answers

The Merge answers option allows you to merge the answers collected from a linked bot to the current bot. This is useful if you want to collect answers from multiple bots and then send them all at once to a third-party app. Or if you just want to collect all the answers into a unified results table.

0 comments on commit 1a4b8bb

Please sign in to comment.