Create a Brick
Let's create a Brick!
- Once in the builder, click on the arrow to open the side panel, search for the Brick icon and click on it.
Press CREATE A NEW BRICK
- Give it a name so you can recognize it later on.
- To start editing "My new brick", hover over and click on Edit this brick:
- Once clicked, you are in! We don't need a start message, but definitely need to start with something.
- One of the biggest advantages of Bricks is to make complex flows easy to handle, but for this example we are going to show how variables from questions can be displayed outside the brick. That's why we are going to ask only the name and display it in the bot.
What we have done here is adding a Question and continue the flow to the Output. Output is the "EXIT" where the flow continues after it ends. There can be more than one Outputs if needed.
- Once we are happy with the brick, we save it.
- Now we go to the main bot (Back to bot), and we will connect the Brick to a message so we can display the name variable that we created in the Brick itself.
- Finally we connect our Brick with the Welcome Message of the landbot:
- And here is our landbot with the Brick!