Skip to content

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

PropertyTypeDefaultDescription
storeNamestring--Required. The name of the data store (e.g., favorites, wishlist). Only lowercase letters, numbers, and underscores are allowed.
itemIdstring--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

  1. Gets the current user ID. Returns false if not logged in.
  2. Sanitizes the store name (lowercase, alphanumeric + underscores).
  3. Resolves the item ID from config or input data.
  4. Queries the nexus_user_stores table: SELECT COUNT(*) WHERE user_id = ? AND store_name = ? AND item_id = ?
  5. Returns true if 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/Else

Toggle 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.