Product predicate language
Product predicates are used by product discounts.
They do not run against a cart. Instead, Thor validates the expression against a product-discount DSL and evaluates it against currently valid prices, variants, products, channels, countries, and customer groups.
Use this language for:
ProductDiscount.predicate
Available context
The product-discount DSL exposes these fields:
skucountry_codechannel.idcustomer_group.idproduct.id,product.name,product.slugproduct.collectionsvariant.id,variant.nameprice.id,price.amount,price.currency
Empty predicates are normalized to True.
Matching behavior
Thor evaluates product predicates against price records that are currently valid by time window. That means a product discount does not just match products abstractly, it matches concrete prices that are active now.
This is why channel, customer-group, country, currency, and price amount are all available in the predicate context.