Automation guide

Dynamic product labels on Shopify: badges filled with real product data

Quick answer

Dynamic product labels contain variables that are replaced with each product's real data on your storefront. In Nexora Product Labels & Badges, open Dynamic Data on the Design tab, copy a variable such as {{sale_percent}}, {{inventory}} or {{vendor}}, and paste it into Label Text. One label then shows the right value on every product, for example -25% on one item and -40% on another.

Updated 6 min read Install free

What dynamic labels are

A static label shows the same text on every product: SALE. A dynamic label uses placeholders that the app fills in per product: -{{sale_percent}} becomes -25% on a jacket and -10% on a scarf. You write the label once, and it stays correct as prices, stock and product details change.

Variables work in Text labels, in any of the 31 shapes, and in both Inside Product Image and In Product Info Area positions. They also work in the text of Stock bar labels, for example Only {{inventory}} left in stock next to the bar. They don't apply to Image or Upload labels, because those show a picture rather than text.

Every variable you can use

Most variables work on every plan. {{countdown}} and metafield variables ({{mtf.…}}) are part of the Pro plan ($6.99 every 30 days or $59 a year, with a 7-day free trial).

VariableShowsExample textExample result
{{sale_percent}}Discount percentage, rounded, with %-{{sale_percent}}-25%
{{sale_amount}}Compare-at price minus price, in your currencySave {{sale_amount}}Save $10.00
{{discount_amount}}Same as the sale amount{{discount_amount}} off$10.00 off
{{price}}The price; follows the selected variant on the product pageNow {{price}}Now $30.00
{{min_price}} / {{max_price}}Lowest and highest variant price; always the product's whole rangeFrom {{min_price}}From $24.00
{{compare_at_price}}The compare-at priceWas {{compare_at_price}}Was $40.00
{{inventory}}Inventory countOnly {{inventory}} leftOnly 3 left
{{stock_status}}in_stock or out_of_stock{{stock_status}}in_stock
{{sku}}Product SKUSKU {{sku}}SKU TS-001
{{tag}}The product's first tag, A–Z, when it has several{{tag}}organic
{{tag:PREFIX}}The first tag that starts with your prefix, without the prefix{{tag:badge_}}Bestseller (from the tag badge_Bestseller)
{{vendor}}Product vendorBy {{vendor}}By Acme
{{type}}Product type{{type}}Hoodie
{{variant_count}}Number of variants{{variant_count}} colours6 colours
{{date}} / {{date+N}}Today's date, or a date N days from today, in the shopper's languageShips by {{date+3}}Ships by Oct 15
{{countdown}}Time left until a daily time or the label's end dateEnds in {{countdown}}Ends in 05:12:09
{{mtf.KEY}}A product metafield in the custom namespace{{mtf.warranty}} warranty2-year warranty

If a product has no discount, the sale variables have no value. Hide the label when a variable has no value (on the Design tab, on by default for new labels) then hides the label on that product instead of showing it with a gap. {{sale_percent}} and {{sale_amount}} still fit most naturally on a label that uses the On sale automation rule.

Doing this without an app

Shopify themes are built with Liquid, which can read all of this product data, so a developer can code a dynamic badge into your theme. The trade-off is upkeep: the code has to be added to each place products appear (product cards, product pages, recommendation sections), and it may need redoing when you update or change themes. A label app keeps the logic outside your theme code.

Where dynamic labels show

Once the Product Labels app embed is on, dynamic labels appear on product images and product cards on product, collection, search and home pages, and in the recommendation sections and quick-view windows many themes have. Use Show On Pages on the Display condition tab to limit a label to certain page types. For example, a By {{vendor}} line might be useful on collection pages but repeat information already on the product page.

Each label's variables are filled in from that product's own data, so a collection page with 24 products shows 24 correct values from one label.

Step by step: add a variable to a label

  1. Create or open a label

    Click + Add Label or + Add Automation Label on the Product Labels page, or Edit an existing label.

  2. Use a Text label

    On General, make sure Type is Text, and pick a shape. Wider shapes such as pills and rectangles suit longer text like By {{vendor}}.

  3. Open Dynamic Data

    On Design, click Dynamic Data to see the variable list.

  4. Copy and paste

    Click Copy next to the variable and paste it into Label Text, adding your own words around it.

  5. Check the preview

    Look at the Label Preview on Desktop and Mobile, and adjust Font Size and Padding so the longest likely value still fits.

  6. Activate and save

    Click Activate, then Save, and check several products on your storefront.

Copy a variable from Dynamic Data into Label Text

Example labels

  • Discount badge: On sale rule, -{{sale_percent}} in a circle at Top-Left.
  • Was-price line: On sale rule, In Product Info Area, Above price, Was {{compare_at_price}}.
  • Stock line: Low stock rule, Only {{inventory}} left, Below price.
  • Brand line: manual label on All products, In Product Info Area, Above title, {{vendor}}, small grey text.
  • Choice line: manual label on a collection of multi-colour products, Below title, Available in {{variant_count}} colours.
  • Warranty line: manual label, {{mtf.warranty}} warranty. See metafield labels.
Dynamic text above the title and below the price

Plan for the longest value. A vendor name such as The Northern Candle Company needs a wider shape, or the In Product Info Area position, where text has more room than on a small image badge.

Tips and common mistakes

  • Variants on product pages. Labels that use price, inventory, SKU or stock variables update when the shopper picks a different variant. {{min_price}} and {{max_price}} are the exception: they always show the product's full price range.
  • Don't add an extra %. {{sale_percent}} already includes the % sign.
  • {{tag}} is the first tag A–Z. If your products also carry internal tags (like supplier-batch-7), use {{tag:PREFIX}} instead: tag products badge_Bestseller or badge_Limited and write {{tag:badge_}} to show only those, without the prefix.
  • Countdown settings. Once the label text contains {{countdown}}, settings appear under it: Count down to (A time every day in your store's time zone, or The label's end date), a Format, and what happens When it reaches zero.
  • {{stock_status}} shows raw values. It prints in_stock or out_of_stock, which is useful for testing but not very friendly. For shopper-facing text, use the Low stock or Out stock rules with your own wording.
  • Translations. Each language's Label Text can use the same variables, for example Nur noch {{inventory}} da in German.
Pair variables with a rule so they only show where they make sense

Frequently asked questions

Which label types support variables?

Text labels and the text of Stock bar labels. Image and Upload labels show a picture, so they can't contain variables.

What happens if a product has no value for a variable?

With Hide the label when a variable has no value ticked (the default for new labels), the label is hidden on that product. With it unticked, the label shows and the variable is left empty.

Can I use more than one variable in a label?

Yes. You can mix text and several variables, for example Save {{sale_amount}} (-{{sale_percent}}).

Do variables update when a shopper picks a variant?

On product pages, yes for price, inventory, SKU and stock variables. {{min_price}} and {{max_price}} always show the product's range.

Can I show my own custom field?

Yes, with {{mtf.KEY}} for product metafields in the custom namespace.

Keep reading

Related guides

Get started with Nexora Product Labels & Badges

Start on the free plan and upgrade only when you need more. Billing runs through Shopify.