Skip to main content

Smart Flows Dynamic Messaging: Show Live Cart Values in Banners and Popups

Insert live cart, bundle, and discount values into Smart Flows banner and popup text using the flow editor token picker.

Written by Tom

Smart Flows Dynamic Messaging lets a banner or popup show each shopper their own cart values instead of one fixed message for everyone. Use this article to insert data tokens into banner and popup text, find out which tokens are available and what each one requires, and understand what a shopper sees as their cart changes.

Dynamic Messaging is part of Smart Flows, so it runs only on Shopify themes. Smart Flows is not supported on headless storefronts.

What Smart Flows Dynamic Messaging shows shoppers

Smart Flows Dynamic Messaging replaces a token in your banner or popup text with a live value from the shopper's browser cart. A banner whose text is Add {{remaining_amount}} to earn a free gift renders to a shopper with an empty cart and a $100 threshold as Add $100.00 to earn a free gift, and the amount recalculates every time the shopper adds, removes, or changes an item. Amount tokens render as formatted currency, including the store's currency symbol and two decimal places, so you never add those yourself.

Values come from the cart in the shopper's browser. There is no integration to set up, no product catalog change, and no configuration beyond the flow itself.

Smart Flows Dynamic Messaging, a storefront Website Banner where the Amount remaining token has rendered as the formatted currency value $100.00 in the shopper's browser

Insert a data token into a banner or popup

Smart Flows Dynamic Messaging tokens are inserted from a picker in the rich text editor, so you never have to type the token syntax yourself. The picker opens from the Insert data button in the editor toolbar, shown as a / icon.

  1. Open a Smart Flow in the flow editor.

  2. Add or open a Website Banner or Popup Message step.

  3. With the text field focused, click the "/" Insert data icon button in the toolbar to open the token picker.

  4. Start typing the token's display name in the picker's search box. The list filters as you type, so typing remaining narrows it to Amount remaining.

  5. Select the token. It inserts into the field as its token text, so Amount remaining appears in the field as {{remaining_amount}}.

  6. Click Save, then turn the flow's Live toggle on to publish it.

Seeing {{remaining_amount}} in the editor field after you select a token is what a correct insertion looks like, because the editor stores the token text itself and only your storefront replaces it with a value.

Open a Smart Flow in the flow editor and Add or open a Website Banner or Popup Message step.
Smart Flows Dynamic Messaging, the Insert data token picker opened from the slash button in the Website Banner Text field toolbar, listing each token's display name above its token text and its dependency

Which tokens are available and what each one requires

Every Smart Flows Dynamic Messaging token is available in any flow, but some resolve to a value only when the flow contains the step they read from. The picker lists tokens by display name, which is what you type into its search box, and inserts the token shown in the second column. The table below gives each token's display name, its token text, the value a shopper sees, and the step the flow needs before that token has anything to show. The picker in your own flow editor is the source of truth for what is currently available.

Display name

Token

What it shows the shopper

What the flow needs

Amount remaining

{{remaining_amount}}

The amount left to reach the Cart Subtotal threshold

A Cart Subtotal condition upstream of the banner or popup

Threshold amount

{{required_subtotal}}

The Cart Subtotal threshold itself

A Cart Subtotal condition upstream of the banner or popup

Item count

{{item_count}}

The number of items in the cart

Nothing, always available

Cart subtotal

{{total}}

The cart subtotal

Nothing, always available

Line count

{{count}}

The number of distinct line items in the cart

Nothing, always available

Discount count

{{discount_count}}

The number of discounts applied to the cart

Nothing, always available

Bundled item count

{{nested_item_count}}

The number of items inside bundles in the cart

A bundle in the cart, so that bundle context exists

Bundled item cost

{{total_nested_item_cost}}

The total cost of bundled items in the cart

A bundle in the cart, so that bundle context exists

Discount code

{{code}}

This flow's discount code

A Discount step upstream of the banner or popup

Discount value

{{discount_value}}

The discount value once applied, for example 15% or $5.00

A Discount step upstream of the banner or popup

Item count and Line count are not the same value. Item count counts every unit in the cart, so three of one product is 3, while Line count counts distinct line items, so those same three units are 1.

Requirements for the cart threshold tokens

The Amount remaining ({{remaining_amount}}) and Threshold amount ({{required_subtotal}}) tokens read their values from a Cart Subtotal targeting rule, so the flow has to contain one. Place the Cart Subtotal step upstream of the banner or popup on the flow canvas, meaning the banner sits on one of the branches coming out of that condition.

Which branch you choose decides who sees the banner. Put a banner that asks the shopper to spend more on the IF FALSE branch, because IF FALSE is the branch for carts that have not yet reached the threshold. A spend-more banner placed on the IF TRUE branch reaches only shoppers whose carts already qualify, so it asks people who are already finished to keep spending.

Smart Flows Dynamic Messaging requirements, a Cart Subtotal condition upstream of a Website Banner placed on the IF FALSE branch, the placement the Amount remaining token requires so the banner reaches only carts under the threshold

Without a Cart Subtotal condition upstream there is no threshold for either token to read, so neither token has a value to show. The flow editor tries to catch this when you save. If you have already published and a shopper sees the literal text {{remaining_amount}} on your storefront, add a Cart Subtotal condition upstream of the banner, then save and republish the flow.

The Discount code and Discount value tokens work the same way, reading from a Discount step rather than a Cart Subtotal condition. Place the Discount step upstream of the banner or popup, or neither token has a value to show.

How dynamic values work across Shopify Markets currencies

Smart Flows Dynamic Messaging amount tokens render in the currency of the shopper's active Shopify market, using that market's own number formatting. You write the banner once and each shopper sees their own currency, so the same banner text reaches a shopper in the eurozone as You have EUR 100,00 remaining to earn a free gift and a shopper in Japan as You have JPY 10,000 remaining to earn a free gift, with the decimal and grouping conventions each market expects.

For example, the Cart Subtotal condition needs attention when you sell in more than one currency. The amount you set on that condition is a single number applied to every market the flow reaches, so a threshold of 100 means 100 units of whichever currency the shopper is shopping in, and 100 in one currency is not the same amount of money as 100 in another.

To set a real threshold per currency, branch the flow on location before the threshold:

  1. Add a Location step upstream of the Cart Subtotal condition.

  2. Set its Country to a country in the market you are targeting. Leave State / Province empty to match any state or province within that country.

  3. On that branch, add a Cart Subtotal condition with the amount written in that market's currency.

  4. Put the banner or popup on that Cart Subtotal condition output, so it reaches only carts under that market's threshold.

  5. Repeat the pattern for each market that needs its own threshold.

The Location step branches on country and state or province rather than on market or currency, so a market that covers several countries needs a Location branch per country, or it keeps one shared threshold across all of them.

What shoppers see as the cart changes

Banner and popup text updates in real time as the shopper adds, removes, or changes items in their cart. The rest of the flow behaves the way it always has.

  • When the shopper crosses the flow's Cart Subtotal threshold, the banner hides. This is the existing Cart Subtotal condition behavior and Dynamic Messaging does not change it.

  • If a discount is then applied that brings the cart back under the threshold, the banner does not reappear asking the shopper to spend more. A discount cannot un-earn a threshold the shopper already crossed, which matches how the Smart Cart tiered progress bar behaves.

  • Free gifts count toward the threshold. A $10 free gift added to a $140 cart counts as $150 against a $150 threshold.

When a token shows as literal text instead of a value

Raw text such as {{remaining_amount}} reaching a shopper on your storefront means the token never resolved to a value, which is a different situation from that same text sitting in the flow editor field, where it is the normal stored form. There are two causes.

The first is a missing Cart Subtotal condition, covered in the requirements section above. Add one upstream of the banner.

The second is a token typed by hand through the Edit HTML button in the field's toolbar. The token picker only runs in rich text mode, so if you switch the field to raw HTML and type a token yourself, a misspelling such as {{remaning_amount}} is not caught and the misspelled string renders to shoppers exactly as typed. Use the rich text editor and the Insert data picker whenever you can. A misspelling in the picker is safe, since searching for remaning returns no results and there is nothing to select, so no broken token reaches the storefront.

How the flow's threshold differs from the Smart Cart subtotal

The Smart Flows Cart Subtotal condition reads the raw cart total from Shopify. Smart Cart computes its own subtotal separately, subtracting excluded items and pending discounts, so the two values are not always identical at the same instant.

If your flow depends on Smart Cart's excluded-item behavior, banner text can briefly show a remaining amount such as $2 away after the flow's condition has already flipped. This is a timing difference rather than a wrong value, and it resolves on the next cart change.

Verify the discount code your banner names

A banner that names a discount code is telling the shopper which code the flow applies. If that code fails to apply once for a shopper, for example because of a transient error or because the code was created in Shopify after the flow started running, the flow records the discount as applied for that session and does not try again during that session. The shopper can then see a banner naming a code while checkout charges full price.

Before publishing a banner that names a code, confirm the code exists and is active in your Shopify discounts, and test the flow end to end on your storefront through checkout.

Tokens that are not available yet

Customer identity tokens are not available in Smart Flows Dynamic Messaging. That includes {{first_name}}, {{last_name}}, and {{email}}. Rebuy's storefront script knows the shopper's anonymous ID and their tags, not their name or email address, so there is no name or email value for a banner to insert.

These approaches cover the same ground today:

  • Use Klaviyo flows for name personalization in email.

  • Use the Smart Flows Customer Tags targeting rule to branch a flow on Shopify customer tags, then write a different banner for each branch.

Did this answer your question?