Flow Builder — Set slots
The "Set slots" step is used to assign a value to a slot or to clear a slot value.
This is useful for creating logic independent of user input. For example, if the user mentions their birth year during a conversation, we can automatically set the age_category
slot to Minor
and clear the permission_granted
slot, streamlining the interaction accordingly.
![image](/docs/studio/img/set-slot-panel.png)
You can set multiple slots in one step. Simply click on "Set another slot" button to add more. You can see how many slots are set in one step by reading the number on the node.
![image](/docs/studio/img/set-another-slot-button.png)
When you choose to clear a slot's value, its current value is reset, and the system will treat it as if it were null
. This action is typically used to unset a slot value. For instance, if a user attempts to transfer more money than they have available, you can respond by informing them of the issue. Instead of ending the flow, simply add a step to reset the amount
slot.
![image](/docs/studio/img/set-slot-operators.png)