> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.devit.software/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Dynamic values and Display conditions

# ${color}[#204a87](**Dynamic Values and Display Conditions**)

${color}[#3465a4](In this article:)
* [Supported dynamic value types](#1-supported-dynamic-value-types)
* [How to set dynamic values](#1-how-to-set-dynamic-values)
* [Supported matcher operators](#1-supported-matcher-operators)
* [Examples](#1-examples)

# ✔️ Supported Dynamic Value Types

There are two dynamic value types based on the Compare-at price supported by Lably:

* **Discount percentage** — displays the discount as a percentage, for example: SAVE 50%
* **Discount amount** — displays the discount as a monetary value, for example: SAVE $50

# ✔️ How To Set Dynamic Values

1. Go to the app admin and open the label you want to customize.
2. Click on **{}** near the Label field and click on **Discount**. 
3. Select the relevant metafield from the dynamic value list.

| **Types** | **Code** | **Usage** | **Example** |
| **Discount %** | SAVE {SAVE_PERCENT}% | It will use this formula: [(Compare-at price - price)/ compare-at price]*100 in your Shopify admin to automatically display the sale percentage | **Price:** $399 **Compare-at price:** $499 **Formula:** [(499-399)/499]*100 **The sale percentage displayed on label:** SAVE 20% |
| **Discount amount** | SAVE {SAVE_AMOUNT} NOW | It will use this formula: (Compare-at price - Price) in Shopify admin to automatically display the sale amount | **Price:** $350 **Compare-at price:** $560 **Result:** SAVE 210 NOW |

|| How product variants are handled: discounts are calculated using the chosen product option. If no option is selected, we use the [first available one](https://shopify.dev/docs/api/liquid/objects/product#product-selected_or_first_available_variant), or the first in the list if none is available.

# ✔️ Supported Matcher Operators

**Single-value matchers**
* is equal
* is not equal
* greater than
* greater than or equal to
* less thanless than or equal to

**Range matchers**
* in range of
* not in range of

**Empty-state matchers**the 
* is empty
* is not empty

# ✔️ Examples

### Example 1 - Discount Percentage

Use dynamic values to automatically show how much customers save in percentage.

**Setup:**
* Dynamic type: Discount percentage
* Label text: SAVE {{product.save_percent}}%

**Condition:**
* Type: Discount percentage
* Operator: Greater than
* Value: 30

**Result:**
The label or badge will appear only on products with a discount greater than 30%.
The text will automatically display the exact discount, such as “SAVE 35%”, based on each product.

### Example 2 — Discount Amount

Show the exact amount customers save with dynamic label content.

**Setup:**
* Dynamic type: Discount amount
* Label text: SAVE {{product.save_amount}}

**Condition:**
* Type: Discount amount
* Operator: In range
* Value:  20–50

**Result:**
The label or badge will appear only on products where the discount amount is between 20 and 50 (in your store currency).
The text will automatically display the exact savings, such as “SAVE $35”, based on each product.

