# Dynamic text

Nov 19, 2026

On this page

## Overview

Flair dynamic text lets you insert live Shopify data into badge and banner text using variables wrapped in double curly braces, for example "Only {{ inventory\_total }} left!".

Values update automatically as the underlying Shopify data changes, so a badge showing remaining stock or a sale percentage stays accurate without manual editing. Supported variables cover inventory, price, discounted price, sale amount, sale percent, product and variant metafields, customer first name, and B2B company name.

### Pricing and currencies

Price-based dynamic text uses Shopify Markets pricing in the customer's local currency. [See how local pricing works](/content/docs/flair/how-tos/local-pricing/index.html).

## Company Name

Display the [Shopify B2B company](https://help.shopify.com/en/manual/b2b/companies) name for the currently logged in customer.

The following variable is supported:

- **company\_name** \- the company name

#### Example

```liquid
Welcome {{ company_name }}!Copied!
```

For a company named 'Initech' this displays as:

> Welcome Initech!

## Customer First Name

Display the first name of the currently logged in customer.

The following variable is supported:

- **customer\_first\_name** \- the customer first name

#### Example

```liquid
Welcome {{ customer_first_name }}!Copied!
```

For a customer with first name 'Milton' this displays as:

> Welcome Milton!

## Discounted Price

Display discounted prices dynamically based on either a fixed amount or percent off.

The following variables are supported:

- **price\_max\_discount\_amount\_10** \- $10 off the maximum price. The `10` in `amount_10` can be modified to any whole number.
- **price\_min\_discount\_amount\_10** \- $10 off the minimum price. The `10` in `amount_10` can be modified to any whole number.
- **price\_max\_discount\_percent\_15** \- 15% off the maximum price. The `15` in `percent_15` can be modified to any number between 1-99.
- **price\_min\_discount\_percent\_15** \- 15% off the minimum price. The `15` in `percent_15` can be modified to any number between 1-99.

#### Example: $10 off

To show a $10 off discounted price:

```liquid
Sale Price {{ price_max_discount_amount_10 }}Copied!
```

For a product with a $19.99 max price this displays as:

> Sale Price $9.99

#### Example: 20% off

To show a 20% off discounted price:

```liquid
Sale Price {{ price_max_discount_percent_20 }}Copied!
```

For a product with a $40 max price this displays as:

> Sale Price $32

## Inventory

Display the remaining available inventory total for a product.

The following variable is supported:

- **inventory\_total** \- the remaining available inventory

#### Example

To show the remaining inventory:

```liquid
Only {{ inventory_total }} left!Copied!
```

For a product with 3 items available, this displays as:

> Only 3 left!

## Metafield

Display custom content based on shop, product and variant Shopify metafield values.

The following variables are supported:

- **metafield.product.namespace.key** \- display the value of the _product_ metafield stored at _namespace.key_
- **metafield.variant.namespace.key** \- display the value of the _variant_ metafield stored at _namespace.key_; Only available for the main product on product pages.

#### Example

To show the product metafield stored at namespace **custom** and key **ships\_by**:

```liquid
Ships in {{ metafield.product.custom.ships_by }}Copied!
```

For a metafield value of '5-7 days' this displays as:

> Ships in 5-7 days

## Price

Display the minimum and maximum product price.

The following variables are supported:

- **price\_min** \- the lowest price of the product across all variants
- **price\_max** \- the highest price of the product across all variants

#### Example

To show the minimum price:

```liquid
Starting at {{ price_min }}Copied!
```

For a product with a $19.99 minimum price, this displays as:

> Starting at $19.99

## Sale Amount

Display the sale amount, based on the difference between the [compare at price](/content/guides/shopify-compare-at-price/index.html) and the price.

The following variables are supported:

- **sale\_amount\_min** \- the minimum savings in dollars
- **sale\_amount\_max** \- the maximum savings in dollars

#### Example

To show the maximum savings as an amount:

```liquid
SAVE {{ sale_amount_max }}Copied!
```

For a product with a maximum savings amount of $20 this displays as:

> SAVE $20

## Sale Percent

Display the sale percent, based on the difference between the compare at price and the price.

The following variables are supported:

- **sale\_percent\_min** \- the minimum savings as a percentage
- **sale\_percent\_max** \- the maximum savings as a percentage

#### Example

To show the maximum savings as a percentage:

```liquid
SAVE {{ sale_percent_max }}%Copied!
```

For a product with a maximum savings percent of 50% this displays as:

> SAVE 50%

Percents are rounded to the nearest whole number, so 25.4 becomes 25.

## Frequently Asked Questions

How do I show remaining stock on a Flair badge?

Add the `inventory_total` variable to your badge text. For example, `Only {{ inventory_total }} left!`

How do I show a sale percentage on a Flair badge?

Use `sale_percent_max` or `sale_percent_min` in your badge text, such as `SAVE {{ sale_percent_max }}%`.

Can Flair calculate and display a discounted price automatically?

Yes. Use discounted price variables to show prices after a fixed amount or percentage discount. For example, `price_max_discount_amount_10` shows $10 off the maximum price, and `price_max_discount_percent_15` shows 15% off. Change the number to set your own discount.

Can Flair display Shopify metafield values in a badge?

Yes. Use `metafield.product.namespace.key` for product metafields or `metafield.variant.namespace.key` for variant metafields.

Does Flair support Shopify B2B catalog pricing?

No. Price-based dynamic text uses standard Shopify Markets prices, including for B2B customers. Company-specific catalog prices are not currently supported. See [ways to work with B2B catalogs](/content/docs/flair/how-tos/local-pricing/index.html#how-to-work-with-shopify-b2b-catalog-pricing).

## Have a suggestion?

If you'd like to see support for any dynamic variables that aren't listed here, let us know.

Navigation

Closecross-small
