Appearance
Is In Store?
The Is In Store? node checks whether a specific item exists in a named user data store. It returns a boolean value -- true if the item is in the store, false otherwise.
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
storeName | string | -- | Required. The name of the data store (e.g., favorites, wishlist). Only lowercase letters, numbers, and underscores are allowed. |
itemId | string | -- | The item ID to check. If empty, the node extracts id or item_id from the input data. |
Input
Accepts a single object. If itemId is not set in the config, the node looks for id or item_id in the input data.
Output
Returns a boolean: true if the item exists in the store for the current user, false otherwise.
Returns false if:
- The user is not logged in.
- The store name is empty.
- The item ID is empty or not found.
How It Works
- Gets the current user ID. Returns
falseif not logged in. - Sanitizes the store name (lowercase, alphanumeric + underscores).
- Resolves the item ID from config or input data.
- Queries the
nexus_user_storestable:SELECT COUNT(*) WHERE user_id = ? AND store_name = ? AND item_id = ? - Returns
trueif count > 0.
Example Use Cases
Check if a product is in favorites
storeName: "favorites"
itemId: "`{ {input.id}}`"Or with auto-detection (input has an id field):
storeName: "favorites"Conditional styling based on favorite status
Use with an If/Else node to apply different styling:
Table Query (products) --> For Each --> Is In Store? (favorites) --> If/ElseToggle button state
In a repeater displaying products, use in_store('favorites', row.id) in an expression for the button appearance. The Is In Store node is more useful in action pipelines where you need to branch logic based on store membership.
TIP
For simple UI display (showing a filled/unfilled heart icon), the in_store() expression function is often easier than using this node. Use the Is In Store node when you need to branch pipeline logic based on store membership.