Event Flow shared state

User Memory

Remember unique participants, check them on later messages, draw a random winner, and reset exactly the list you intended—without turning a platform role into permanent global state.

One named memory, many tools

A User Memory state node owns one isolated set of people. Every Remember, Forget, Check, Draw, or Clear node selects that state node. Create another User Memory node when you need a separate list—for example, one for “liked the stream” and another for “entered the giveaway.”
Solid teal: this event runs next Dashed purple: this node uses that memory

Drag the small purple side diamond onto a User Memory node, or choose the memory by name in the node properties. Internally the operation stores the state node’s ID. Selecting the memory highlights every linked operation, and deleting it warns before those links are broken.

Event Flow canvas showing Remember User and User Is Remembered linked to the Prize Draw Entrants memory with dashed purple lines
A real SSApp flow with two remembered entrants. The event path stays teal; shared-state references are dashed purple.

Set it up

  1. Drag State Nodes → User Memory onto the canvas.
  2. Name it for the list it owns, such as Heart Me Eligible, Liked Stream, or Prize Draw Entrants.
  3. Choose This app session or Save across restarts.
  4. Add the checks and actions you need, then link each one to the named memory using its side diamond or dropdown.
  5. Connect the normal event path with teal wires and use Test Flow with two different usernames before going live.

Available operations

NodeWhat it does
Remember UserAdds the current event’s user once. Repeated participation increases that user’s participation count without adding duplicate draw entries.
User Is RememberedA trigger/check that returns true when the current message belongs to someone in the selected memory.
Forget UserRemoves only the current event’s user.
Pick Random UserSelects one unique remembered user. It can optionally remove the winner so they cannot win again.
Clear All UsersEmpties only the selected User Memory object.
Reset State NodeAlso clears a User Memory when that memory is the selected reset target.
User Memory node properties showing two current users and Save across restarts
The hub reports its current unique-user count and owns persistence/reset settings.
Identity rule: users are keyed by platform plus user ID. The displayed username is used only as a fallback. An anonymous or aggregate event with no user identity is safely ignored.

Practical recipes

TikTok Heart Me or Team Member → ? TTS

Use the gift event to remember the sender; do not try to turn the one gift row into a permanent “member” role.

TikTok gift event + “Heart Me” match → AND → Remember User ···→ [Heart Me Eligible]
? command + TikTok source + (TikTok Team Member OR User Is Remembered) → AND → Speak Text ? command + NOT TikTok source → AND ────────────────────────────────→ Speak Text
  • For TikTok Team/Fan status, choose User Role → TikTok Team Member. It reads the incoming TikTok badge/level data directly; the Main Chat Overlay’s “treat as members” display setting is not required.
  • Gift payloads differ by capture mode. A common setup is Event Type → Other: gift plus Message Contains: Heart Me. Confirm the captured row in Test Flow/Event Reference and match the cleanest field your source provides.
  • Both branches still require the leading ?, so other platforms speak for everyone while TikTok stays restricted.

Remember people who liked or participated

Event Type → Other: liked → Remember User ···→ [Liked Stream]

This works when the captured like/participation event names a user. Aggregate like-count updates do not identify a person and therefore cannot be remembered. Use a separate memory for each kind of participation if you want independent checks or draws.

Unique-entry prize draw

Message Starts With !enter → Remember User ···→ [Prize Draw Entrants] Moderator + Message Starts With !draw → AND → Pick Random User ···→ [Prize Draw Entrants] Moderator + Message Starts With !resetdraw → AND → Clear All Users ···→ [Prize Draw Entrants]

Enable Remove selected user when winners should not be drawn twice. In a public stream, protect draw/reset commands with a moderator, admin, or exact-user check.

Download the participation + draw example flow

Reset and persistence

Manual

Use Clear All Users Now in the memory properties while building/testing.

From a flow

Use Clear All Users or the generic Reset State Node, selecting the exact memory.

Automatic

Clear after inactivity, on stream start, or on stream stop. A value of 0 disables inactivity reset.

Across restarts

Session memories start empty with the app. Saved memories reload until that specific memory is cleared.

User Memory reset properties including inactivity, stream start, stream stop, and Clear All Users Now
Every reset option belongs to this one named memory. Other User Memory nodes are not touched.
“Clear all” is scoped: it means all users inside the selected memory—not all Event Flow state, not every draw, and not every memory in Social Stream Ninja.

Use draw and participation outputs

Memory actions add fields to the message so downstream Show Text, Send Message, webhook, or custom actions can use them.

FieldMeaning
userMemoryNameThe selected memory’s name.
userMemoryCountUnique users currently remembered.
userMemoryAddedTrue only when Remember User added a new unique person.
userMemoryEntryCountHow many times that person has participated.
selectedUserThe drawn user’s display name.
selectedUserId, selectedUserSourceThe drawn user’s stable ID and platform.
selectedUserParticipationCountThe winner’s recorded participation count.
selectedUserReasonThe latest reason template saved by Remember User.
selectedUserRemovedWhether the draw removed the selected winner.
Test Flow result showing a selected prize draw user and one remaining entrant
Actual Test Flow output: Alice was selected and the memory count fell to one because “remove selected” was enabled.

Troubleshooting

The dashed line is missingSelect the operation and choose a User Memory target, or drag its purple side diamond to the memory hub.
The same person appears twiceCheck whether the events came from different platforms. Platform + user ID intentionally creates separate identities.
A like did not add anyoneThe event probably had no user identity. Inspect the event payload; aggregate counts cannot become named entrants.
A saved memory came backUse Clear All Users on that memory. Changing a flow or clearing a different memory does not erase it.
Anyone can run the draw/reset commandAdd User Role: moderator/admin (or an exact host-user check) into an AND gate before the action.