Theme App Extensions for Dynamic Product Badges - Possible?

Quick Context

Shopify requires Theme App Extensions for theme modifications instead of ScriptTags. Our app dynamically shows badges like “Sale”, “New” on products based on real-time API data (tags, inventory, price ranges, etc.).

The Problem

Our badges need:

  • Real-time API calls for badge configs
  • Dynamic rendering based on product data
  • Complex conditional logic per merchant

Sample API response:

{
  "badges": [{
    "text": "Sale",
    "includedTags": ["sale"],
    "inventoryMax": 10,
    "backgroundColor": "linear-gradient(45deg, #ff5f6d, #9944dc)"
  }]
}

Main Questions

  1. Can Theme App Extensions handle dynamic, API-driven badge injection across multiple products?
  2. What’s the recommended approach for real-time conditional rendering without ScriptTags?
  3. Are there limitations with Theme App Extensions for this use case?

What We’ve Tried

  • :white_check_mark: Created Theme App Extension
  • :cross_mark: Can’t implement dynamic API logic in Liquid templates
  • :cross_mark: App blocks don’t seem to support real-time data fetching

Looking For

  • Working examples of similar dynamic content
  • Confirmation if this is even possible with current Theme App Extensions
  • Alternative Shopify-compliant approaches

Has anyone built dynamic product badges with Theme App Extensions? Any guidance would be appreciated!