Skip to main content

Set User Variable

Runs on: Backend — writes the user variable to the database.

The Set User Variable effect assigns a new value to a User Variable for a specific viewer. Connect the viewer into the user input and the new value into the value input.

Because user variables are stored per viewer and persist across stream sessions, this is how you build viewer-specific state — point totals, scores, streaks, and the like.

Inputs

NameTypeDescription
userUserThe viewer whose variable to set.
valuestring, number, or booleanThe new value to store for that viewer.

Configuration

  • Variable: The name of the user variable to set.

Example

When a viewer redeems a channel-point reward, connect the redeeming User into a Set User Variable node. Read their current redeemCount with a Get User Variable node, add 1 with a Math node, and feed the result into the value input — giving every viewer their own redemption tally.