Unable to track which threshold is active in Shopify Functions + Theme App Extension

Hi everyone,

I’m building a Shopify app that shows a progress bar in the storefront and gives rewards based on cart value thresholds, for example:

  • $50 → 10% discount

  • $100 → free shipping

  • $150 → free gift

Here’s how my setup works:

  • Thresholds are saved in metafields.

  • I use Shopify Functions (discount + cart transform) to apply the offers.

  • A Theme App Extension shows the progress bar and reward tiers.

I can’t figure out how to know or display which threshold is currently active or about to be fulfilled.

Here’s why:

  • Shopify Functions are stateless — they can’t update metafields or store which threshold is currently applied.

  • The Theme App Extension can read metafields, but it can’t know which threshold the Function logic just applied.

  • This means I have no shared state or reliable source of truth between my Functions, metafields, and the Theme Extension.

As a result:

  • I can’t display in the storefront which reward is currently unlocked.

  • I can’t show which threshold is next (e.g., “Spend $20 more to unlock free shipping”).

  • The Function applies the reward, but the UI doesn’t know which one was triggered.

Thanks! :folded_hands: