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.
Standard Input Selectors
Section titled “Standard Input Selectors”These selectors are available when the function uses Standard or Advanced input.
| Selector | Code | Description |
|---|---|---|
| None | n | No item filtering — applies to all items |
| Product ID | pid | Select specific products by their Shopify product ID |
| Product Collections | col | Select products by collection membership |
| Product Type | type | Select products by their product type field |
| Product Vendor | ven | Select products by vendor name |
| Variant SKU | sku | Select variants by SKU |
| Variant ID | vid | Select specific variants by their Shopify variant ID |
| Variant Title | vt | Select variants by title (e.g., “Small / Red”) |
| Cheapest Product | cp | Automatically selects the cheapest item in the cart |
| Most Expensive Product | mep | Automatically selects the most expensive item in the cart |
| Has Selling Plan | hsp | Select products that have an active subscription |
| Has Not Selling Plan | hns | Select products without a subscription |
Advanced Input Selectors
Section titled “Advanced Input Selectors”These additional selectors are only available when the function uses Advanced input.
| Selector | Code | Description |
|---|---|---|
| Product Tags | tags | Select products by their Shopify tags |
| Line Item Property | lp | Select by line item property value |
Important: Line item property selectors have a limit of 1 per function due to Shopify restrictions.
Match Conditions
Section titled “Match Conditions”When using item selectors (except boolean types like cheapest/most expensive and selling plan), you choose a match condition:
| Match Condition | Code | Description |
|---|---|---|
| Is one of | m | Item matches at least one of the specified values |
| Is not one of | nm | Item does not match any of the specified values |
| Contains one of | co | Item’s value contains at least one of the specified strings |
| Not contains one of | nc | Item’s value does not contain any of the specified strings |
Selector Details
Section titled “Selector Details”Product ID (pid)
Section titled “Product ID (pid)”Select products by their Shopify product ID. Use this when you need to target exact products. You can select multiple product IDs.
Product Collections (col)
Section titled “Product Collections (col)”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”).
Product Type (type)
Section titled “Product Type (type)”Match against the “Product type” field in Shopify. Useful for category-wide discounts (e.g., “10% off all T-Shirts”).
Product Vendor (ven)
Section titled “Product Vendor (ven)”Match against the vendor/brand field. Useful for brand-specific promotions (e.g., “15% off all Nike products”).
Variant SKU (sku)
Section titled “Variant SKU (sku)”Match against variant SKU values. Useful for targeting specific inventory items or product lines identified by SKU patterns.
Variant ID (vid)
Section titled “Variant ID (vid)”Select specific variants by ID. Use this for the most precise targeting — individual size/color combinations.
Variant Title (vt)
Section titled “Variant Title (vt)”Match against variant option values. For example, target all “Large” variants or all “Red” variants across products.
Cheapest Product (cp)
Section titled “Cheapest Product (cp)”Automatically selects the lowest-priced item in the cart. Commonly used in BOGO campaigns — “Buy 2, get the cheapest free.”
Most Expensive Product (mep)
Section titled “Most Expensive Product (mep)”Automatically selects the highest-priced item in the cart. Useful for “discount the most expensive item” promotions.
Has Selling Plan (hsp)
Section titled “Has Selling Plan (hsp)”Selects products that have an active Shopify subscription (selling plan). Use this to create subscription-specific discounts.
Has Not Selling Plan (hns)
Section titled “Has Not Selling Plan (hns)”Selects products without a subscription. Useful for excluding subscription items from one-time purchase promotions.
Product Tags (tags) — Advanced Only
Section titled “Product Tags (tags) — Advanced Only”Match against Shopify product tags. Supports comma-separated values for matching multiple tags.
Line Item Property (lp) — Advanced Only
Section titled “Line Item Property (lp) — Advanced Only”Match against line item properties (custom data attached to cart items, often from product customization apps). Limited to 1 per function.
Choosing the Right Selector
Section titled “Choosing the Right Selector”| Scenario | Recommended Selector |
|---|---|
| Discount a specific product | Product ID |
| Discount an entire category | Product Collections or Product Type |
| Discount a specific brand | Product Vendor |
| BOGO — free cheapest item | Cheapest Product |
| Subscription discount | Has Selling Plan |
| Tag-based targeting | Product Tags (Advanced) |
| Specific size/color | Variant ID or Variant Title |
Standard vs Advanced Input
Section titled “Standard vs Advanced Input”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.