Widget flow
In widged.io, the logic of your widget can be described using a widget flow. A widget flow is a DAG (directed acyclic graph), and you can easily set it up using our drag-and-drop editor.
A widget flow consists of widget flow nodes and the connections between them. As users progress through the widget flow, different widget flow nodes perform various actions, resulting in the generation of events and collected records. We offer several types of widget flow nodes. Each widget flow node performs a specific function and has its own configuration. Some widget flow nodes also perform operations. You can find more information about the specific function, configuration, and features of each widget flow node in the relevant section of the documentation.
Currently, in the context of widget flow, you only need to know about one type of widget flow node — Entrypoint. Unlike other types, there must be exactly one entrypoint node (it always exists by default, and it cannot be added, copied, or deleted). The flow of your widget begins with this entrypoint node. A minimal widget flow consists of an entrypoint node, and while this will work, it doesn’t do anything on its own.
Each widget flow node can have inputs and outputs. Either or both may not exist, depending on the configuration and the function being performed. There is one important rule for inputs and outputs: one input/output can only be connected to one output/input. Two outputs cannot lead to one input, and vice versa. Also, keep in mind that not all inputs/outputs need to be connected. You can leave them unconnected if that suits your needs.
Based on the above, you can think of the widget flow as the path of your user. It starts with the entrypoint, then, for example, you can render a form and collect data with view, send it to the server with collect, and finally perform a redirect to a thank you page. Here’s an example of such a flow:
In reality, the widget flow not only gives you control over the execution flow but also over the flow of data. On the next page, you can learn about context values.