Dynamic discount and price overlays from feed data

How to render dynamic discount and price overlays from feed data so every product image shows its own real, current discount, with the right channel rules applied.

Static badges break; dynamic overlays stay true

A static badge says the same thing on every image. A dynamic overlay reads each product's own data and renders that product's real numbers: this item is 30% off, that one is 15% off, this one saves 12 dollars. Because the text is computed from the feed, it is always specific and always current.

This matters because catalogs are not uniform. Discounts vary by product, by collection, by clearance status, and they change constantly. A dynamic overlay turns the chaos of per-product pricing into a creative advantage instead of a maintenance nightmare, but only if it is wired directly to the feed rather than typed in by hand.

What you can compute and render

Once the overlay reads feed fields, you can render anything you can calculate from a product row. The common ones are discount percentage and absolute savings, but the same mechanism handles price formatting, currency, and conditional messaging.

  • Discount percentage: round((price - sale_price) / price * 100) rendered as a percent.
  • Amount saved: price minus sale_price, formatted in the product's currency.
  • Sale price display: the sale_price itself, with the original price struck through.
  • Conditional labels: a LOW STOCK or LAST CHANCE flag driven by an availability or quantity field.
  • Localized values: the correct currency symbol and number format per market.

Channel rules still apply to dynamic overlays

Dynamic does not mean exempt. The same channel policy governs computed overlays as any other overlay. Google Shopping and Microsoft Shopping still prohibit promotional text on the main product image, so the dynamic discount overlay belongs on your Meta, TikTok, Snapchat, and Pinterest images only. For Google and Microsoft, the dynamic value goes into the sale_price field instead, where the channel renders the discount itself in its own UI.

The clean way to think about it: the same computed discount feeds two destinations. On social channels it becomes a pixel overlay on the image. On shopping engines it becomes a structured price field. One calculation, two correct outputs, no contradiction.

Wiring it up without it going stale

The failure mode of overlays is staleness: the price moves but the image still shows yesterday's discount. The fix is to make the image a function of the feed, so re-rendering is automatic whenever an input changes. That requires the render to be part of the pipeline, not a downstream manual step.

  1. 1Ensure price, sale_price, currency, and availability are clean, typed feed fields.
  2. 2Define the discount as a rule so it is computed once and reused everywhere.
  3. 3Build an overlay template that reads the computed fields and formats them.
  4. 4Set a render condition so the overlay only appears on genuinely discounted products.
  5. 5Assign the overlaid image to overlay-friendly channels and the clean image plus sale_price to Google and Microsoft.
  6. 6Schedule the feed refresh; on each run, changed prices re-trigger the affected renders and update the export URLs.

How MartechFlow renders it

MartechFlow computes the discount as a rule on your feed data, then the template editor binds that value into a dynamic overlay. The worker renders each product's image server-side and stores it at a content-addressed, stable URL, so a price-only change produces a new image and a new URL while live URLs are never overwritten under a channel's cache.

Because the overlay and the export both come from the same computed discount, your creative and your feed cannot disagree. The number a shopper sees on the image is the number in your output feed, every refresh, in every currency.

Frequently asked questions

What is a dynamic discount overlay?

It is text rendered onto a product image that is computed from that product's feed data, such as its real discount percentage or amount saved. Because it reads the feed, every image shows that product's own current numbers instead of a generic badge.

Can I use dynamic overlays for Google Shopping?

Not on the image. Google and Microsoft ban promotional overlays on the main product image. Send the dynamic discount through the sale_price field there so the channel renders the sale natively, and reserve image overlays for Meta, TikTok, Snapchat, and Pinterest.

How does the overlay stay current when prices change?

When the render is part of the feed pipeline, a price change on the next refresh recalculates the discount and re-renders the affected images automatically. MartechFlow stores each version at a stable URL so the export always points at the correct, current image.

Put this into practice

Start free, no credit card. Build a clean, channel-ready feed in minutes.

Start free