Skip to main content

Demand heatmap

Path: Byte8 → Stock Radar → Demand Heatmap.

This is the headline differentiator. Most back-in-stock modules stop at "we'll send them an email when stock returns." The demand heatmap inverts the question: "what are people waiting for, ranked by how many people are waiting?"

Open it on Monday morning and you've got your reorder priority list before the buyer even logs in.

What you see

Pending subscribersSKUProductProduct IDParent IDStoreFirst subscribedLatest subscribedActions
243SNK-RED-MStylish Sneakers Red M45214500UK2026-04-082026-04-26Edit product
187HOO-BLK-LAcme Hoodie Black L46124600UK2026-04-122026-04-25Edit product
94TEE-WHT-SLogo Tee White S47104700UK2026-03-302026-04-22Edit product
...

Sorted DESC by subscriber_count by default. Click "Edit product" to jump straight to the catalog admin — for configurables, the link goes to the parent so the merchandiser is editing where inventory actually lives.

How the underlying SQL works

The grid is backed by a custom Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection that does this in a single query:

SELECT
s.product_id,
s.parent_product_id,
s.store_id,
COUNT(*) AS subscriber_count,
MIN(s.created_at) AS first_subscribed,
MAX(s.created_at) AS latest_subscribed,
p.sku,
name.value AS product_name
FROM byte8_stock_radar_subscription s
LEFT JOIN catalog_product_entity p ON p.entity_id = s.product_id
LEFT JOIN catalog_product_entity_varchar name
ON name.entity_id = s.product_id
AND name.attribute_id = <name_attr_id>
AND name.store_id IN (0, s.store_id)
WHERE s.status = 'pending'
GROUP BY s.product_id, s.store_id
ORDER BY subscriber_count DESC;

Performance notes:

  • Indexed on (status, product_id) — the WHERE status = 'pending' filter hits an index range scan.
  • EAV name join picks store-scoped name first, falls back to admin scope (store_id = 0).
  • primaryFieldName = product_id in the listing config — there's no synthetic entity_id for an aggregate view.

On a healthy database with 100k pending subscriptions across 5k products, this query runs in under 200ms.

With the Plenty bridge installed

The paid Plenty bridge extends the grid with four additional columns sourced from plenty_stock_entity:

Pending subscribersSKUProductPlenty physicalPlenty netInbound (PO)Last Plenty syncActions
243SNK-RED-MStylish Sneakers Red M002402026-04-26 03:45Edit
187HOO-BLK-LAcme Hoodie Black L12402026-04-26 03:45Edit

Now the merchandiser sees not just "243 people waiting" but "243 people waiting AND 240 units on order arriving from supplier" — which usually means the answer is "wait, don't reorder, the PO is fine." That's the kind of decision the heatmap unlocks.

ACL

Permission resource: Byte8_StockRadar::demand — separate from the general subscription grid so you can grant heatmap access to merchandisers without exposing per-customer email data.