Reference
Condition operators reference
Every condition field and operator available when building targeting rules for badges.
A targeting rule is a row with three parts: a field, an operator, and a value. The operators offered depend on the field you pick — text fields get contains and starts with, numeric fields get is greater than, and so on.
You build these rows on the badge editor’s Products tab, after selecting Products matching conditions.
Condition fields
Section titled “Condition fields”The field dropdown is grouped into sections.
Product conditions
Section titled “Product conditions”| Field | What it matches |
|---|---|
| Product title | The product’s name. |
| Product type | Shopify’s product type field. |
| Product vendor | The vendor name. |
| Product price | The current price. |
| Product compare price | The compare-at price. |
| Product sale price | The discounted price. |
| Product option | A product option such as size or color. |
| Product tag | Any tag on the product. |
| Product weight | The product’s weight. |
| Product created | How long ago the product was created, in days. |
| Product published | How long ago the product was published, in days. |
| Product inventory | Stock level and stock status. |
| Product metafield | A product metafield value. |
Variant conditions
Section titled “Variant conditions”| Field | What it matches |
|---|---|
| Product variants | Whether the product has variants at all. |
| Variant inventory | Stock level of individual variants. |
| Variant metafield | A variant metafield value. |
Collection conditions
Section titled “Collection conditions”| Field | What it matches |
|---|---|
| Collections | The collections the product belongs to. |
Discount conditions
Section titled “Discount conditions”| Field | What it matches |
|---|---|
| Sami discount | Products covered by one of the discounts on the app’s Discounts page. |
Sami discount takes a single operator — is equal to — and one discount as its value. Use it to show a badge only while that discount is running, and to fill the badge text with the discount’s own numbers through the {sami_discount_*} variables. See Dynamic variables reference.
Product review conditions
Section titled “Product review conditions”| Field | What it matches |
|---|---|
| Product review app | Products whose rating or review count in your review app meets the threshold you set. |
Product review app takes a single operator — is equal to — and one review app as its value: Judge.me, Loox, Junip, CWILL(Trustoo), LAI Product Reviews, or AG Product Reviews. The comparison that decides the match is set in its own fields, described below.
A badge holds one review app condition; the option is greyed out on every other row once it is in use. See Show badges from your review app.
Operators by field type
Section titled “Operators by field type”Text fields
Section titled “Text fields”Product title, type, vendor, option, tag.
| Operator | Meaning |
|---|---|
| is equal to | Exactly matches the value you enter. |
| is not equal to | Does not match the value. |
| starts with | Begins with the text you enter. |
| ends with | Ends with the text you enter. |
| contains | Includes the text anywhere within it. |
| does not contain | Does not include the text. |
Numeric fields
Section titled “Numeric fields”Product price, compare price, sale price, weight.
| Operator | Meaning |
|---|---|
| is equal to | Exactly the number you enter. |
| is not equal to | Any number except the one you enter. |
| is greater than | Above the number you enter. |
| is less than | Below the number you enter. |
Inventory
Section titled “Inventory”| Operator | Meaning |
|---|---|
| in stock | The product currently has inventory. |
| out of stock | Inventory has reached zero. |
| continue selling when out of stock | The product is set to keep selling past zero. |
| stock availability is greater than | Stock is above the threshold you enter. |
| stock availability is less than | Stock is below the threshold you enter. |
The first three take no value — the operator is the condition.
Date fields
Section titled “Date fields”Product created, Product published. The value is a number of day(s) counted back from today, not a calendar date.
| Operator | Meaning |
|---|---|
| is less than | Created or published fewer than N days ago — use this for “new arrival” badges. |
| is greater than | Created or published more than N days ago. |
| is in range | Falls between two day counts. |
Product variants
Section titled “Product variants”| Operator | Meaning |
|---|---|
| is equal to / is not equal to | Compares against a specific variant count. |
| products with variants | The product has more than one variant. |
| product has no variants | The product has only the single default variant. |
Product review metrics
Section titled “Product review metrics”Product review app carries its own set of fields, shown below the condition list once an app is picked.
| Field | Options |
|---|---|
| Review condition | Number of reviews — how many reviews the product has. Product rating — its average star rating. |
| Operator | is equal to, is greater than, is less than. |
| Enter value | Product rating takes 0 to 5 in steps of 0.1; Number of reviews takes whole numbers. Required — an empty value blocks the save. |
Combining conditions
Section titled “Combining conditions”Add as many rows as you need with Add conditions, then use the Products must match radio above them to decide how they combine:
all conditions (AND)
Section titled “all conditions (AND)”Every row must be true. Narrows the match.
Example: Product type is equal to “T-Shirt” and Product vendor is equal to “Nike” → only Nike T-shirts.
any condition (OR)
Section titled “any condition (OR)”One row is enough. Widens the match.
Example: Product tag is equal to “new-arrival” or Product tag is equal to “featured” → products with either tag.
Next steps
Section titled “Next steps”- Target products by attribute — set up attribute conditions step by step.
- Target specific products — hand-pick individual products instead.
- Show badges from your review app — the review condition and its variables in full.
- Plan comparison — check which conditions your plan includes.