Dynamic Conditions
The dynamic condition is an attribute that can return values depending on particular conditions or the value of other attributes.
Steps
1. Create a new dynamic condition
- In the store admin panel, navigate to Dynamic Conditions > Create New.
2. Set the name and identifier
Configure identifiers for this dynamic condition:
- Set Name. Briefly describe the purpose of this dynamic condition.
- Set Unique identifier. You will be using it to access the condition in the feed.
Unique identifier usage example
Unique identifier can be any string that consists of ASCII symbols and letters without spaces. When calling it in the feed append the attr_ before the unique identifier name. Use it as follows: {{ product.attr_unique_identifier }}
or {{ variant.attr_unique_identifier }}
.
For example, you want to set a condition for the delivery cost with unique identifier delivery_costs
. Call it in the feed as {{ product.attr_delivery_costs }}
or {{ variant.attr_delivery_costs }}
.
- Check Active to enable the condition.
3. Configure Cases
A Case is a set of groups of condition-result pairs for the dynamic condition. Condition sets the rule for the result to be displayed. Each condition may include several pairs of rules and results.
- Set Conditions by providing:
- attribute. For example, variant price.
- logic condition. For example, less or greater.
- numeric value. For example, 100.
note
Configure conditions for such attributes:
product
- ID
- SKU
- title
- body_html
- vendor
- type
- collection title
- collection ID
- mapping collection title
- mapping collection ID
- category IDs
- collection titles
- mapping collection titles
- tags
- URL
- image URL
- image URLs
- price
- compare at price
- published scope
- metafields
product variant
- ID
- title
- SKU
- URL
- image URL
- barcode
- weight in grams
- price
- compare at price
- qty
- inventory management
- inventory item ID
- inventory item tracked
- cost
- option1
- option2
- option3
- metafields
- created at
- updated at
variant
- ID
- URL
- image URL
- SKU
- barcode
- price
- compare at price
- qty
- inventory management
- inventory item tracked
- inventory item ID
- cost
- in stock
- option1
- option2
- option3
- size
- color
- weight in grams
- created at
- updated at
- title
- body html
- vendor
- product type
- colelction ID
- collection title
- mapping collection title
- mapping collection ID
- collection titles
- mapping collection titles
- metafields
- tags
- parent ID
- parent SKU
- parent URL
- parent image URL
- parent image URLs
- parent published scope
- parent metafields
collection
- ID
- title
Set Result. For example, if the variant price is greater than 100, then free delivery is provided. In Results configure:
- Attribute.
- Choose a product attribute (e.g., Liquid object) from a drop-down menu. For example, product price.
- Expression. A short text string with the result description.
- Attribute.
Click Add value to set another rule in this set of conditions. Press Remove rule (a bin icon) to delete the rule.
4. Validate and preview condition results
- Press Results validation to see the preview of the results for this specific dynamic condition.