Skip to content

Item Selectors

Item selectors determine which products or variants a campaign applies to. They’re used both for targeting discounts and as part of “Cart Has Items” conditions.

These selectors are available when the function uses Standard or Advanced input.

SelectorCodeDescription
NonenNo item filtering — applies to all items
Product IDpidSelect specific products by their Shopify product ID
Product CollectionscolSelect products by collection membership
Product TypetypeSelect products by their product type field
Product VendorvenSelect products by vendor name
Variant SKUskuSelect variants by SKU
Variant IDvidSelect specific variants by their Shopify variant ID
Variant TitlevtSelect variants by title (e.g., “Small / Red”)
Cheapest ProductcpAutomatically selects the cheapest item in the cart
Most Expensive ProductmepAutomatically selects the most expensive item in the cart
Has Selling PlanhspSelect products that have an active subscription
Has Not Selling PlanhnsSelect products without a subscription

These additional selectors are only available when the function uses Advanced input.

SelectorCodeDescription
Product TagstagsSelect products by their Shopify tags
Line Item PropertylpSelect by line item property value

Important: Line item property selectors have a limit of 1 per function due to Shopify restrictions.

When using item selectors (except boolean types like cheapest/most expensive and selling plan), you choose a match condition:

Match ConditionCodeDescription
Is one ofmItem matches at least one of the specified values
Is not one ofnmItem does not match any of the specified values
Contains one ofcoItem’s value contains at least one of the specified strings
Not contains one ofncItem’s value does not contain any of the specified strings

Select products by their Shopify product ID. Use this when you need to target exact products. You can select multiple product IDs.

Select all products within one or more Shopify collections. This is the most common selector for broad promotions (e.g., “20% off the Summer Collection”).

Match against the “Product type” field in Shopify. Useful for category-wide discounts (e.g., “10% off all T-Shirts”).

Match against the vendor/brand field. Useful for brand-specific promotions (e.g., “15% off all Nike products”).

Match against variant SKU values. Useful for targeting specific inventory items or product lines identified by SKU patterns.

Select specific variants by ID. Use this for the most precise targeting — individual size/color combinations.

Match against variant option values. For example, target all “Large” variants or all “Red” variants across products.

Automatically selects the lowest-priced item in the cart. Commonly used in BOGO campaigns — “Buy 2, get the cheapest free.”

Automatically selects the highest-priced item in the cart. Useful for “discount the most expensive item” promotions.

Selects products that have an active Shopify subscription (selling plan). Use this to create subscription-specific discounts.

Selects products without a subscription. Useful for excluding subscription items from one-time purchase promotions.

Match against Shopify product tags. Supports comma-separated values for matching multiple tags.

Match against line item properties (custom data attached to cart items, often from product customization apps). Limited to 1 per function.

ScenarioRecommended Selector
Discount a specific productProduct ID
Discount an entire categoryProduct Collections or Product Type
Discount a specific brandProduct Vendor
BOGO — free cheapest itemCheapest Product
Subscription discountHas Selling Plan
Tag-based targetingProduct Tags (Advanced)
Specific size/colorVariant ID or Variant Title

The choice between Standard and Advanced input is made when creating a function and cannot be changed afterward. If you need Product Tags or Line Item Property selectors, you must choose Advanced input when creating the function.

See Standard vs Advanced Input for a full comparison.