User Variables
User Variables hold a separate value for each viewer, like points or wins. Streamer Variables hold one value for the whole channel.
Types match Streamer Variables: text, number, boolean and list variants. Each value belongs to one viewer's Twitch account.
Managing User Variables
- Open User Variables in the sidebar
- Pick a viewer from the list, or enter their Twitch user ID
- Add, edit or remove their variables
Flows can also create and update values, so this page is mainly for inspecting and correcting data.
Using in Flows
- Get User Variable reads the value for the viewer involved in the flow: main flow editor, Chatbox Flow Editor
- Set User Variable writes a value: Set User Variable
- Check User Variable compares a value and routes the message, in the Chatbox Flow Editor: Check User Variable
Using in Chatbox Messages
A Custom Message block prints a viewer's variable with {{userVar.<name>}}:
{{userVar.points}} prints the current viewer's points value.
Add a fallback for when the viewer has no value yet:
{{userVar.points ?? "0"}}
Use || instead of ?? to also fall back when the value is empty or 0, for example {{userVar.points || "0"}}. Pick between two texts with a condition like {{userVar.vip ? "VIP" : "Viewer"}}. See Fallbacks and conditions.
Channel-wide variables use {{streamVar.<name>}}:
{{username}} has {{userVar.points}} points. Channel goal: {{streamVar.pointGoal}}