How to Link and Call Flows
This guide will teach you how to use the Link and Call steps in Rasa Studio to connect and reuse flows effectively. You’ll learn the differences between these steps and when to use each one for better flow management and reuse.
How to Use the Link Step
What is a Link?
A link is a mechanism in Rasa that connects flows together, enabling smooth transitions between business logic.
- Add a Link Step: Select the "Link" option from the menu.
- Choose a Target Flow: Select an existing flow or create a new one.
- Fill in Details (if creating a new flow): Enter the necessary information in the modal that opens.
The Link step transfers control completely to the target flow. This means that once the target flow is activated, there is no automatic return to the original flow.
How to Use the Call Step
What are Call Steps?
A call step is a mechanism in Rasa that enables one flow to switch to another, complete tasks there, and then return, treating the second flow as a seamless extension of the first.
- Add a Call Step: Select the "Call a flow and return" option from the menu.
- Choose a Target Flow: Select an existing flow or create a new one.
- Fill in Details (if creating a new flow): Enter the necessary information in the modal that opens.
- Return to the Original Flow: The conversation returns seamlessly to the original flow once the target flow completes.
Choosing Between Link and Call Steps
Use Link when:
- You want to completely transfer control to another flow.
- The target flow is independent and meant to take over the conversation, with no return to the current flow.
Use Call a Flow and Return when:
- The target flow is a part of a larger conversation that should resume once the secondary task is complete.
- You need to reuse functionality without interrupting the continuity of the original flow.
By using these two steps appropriately, you can build modular and efficient flows that enhance your assistant’s scalability and maintainability.