How it works
The low-stock check runs every time Alva assigns a license key from a tag. The instant the available count for a pool-based tag drops to its threshold or below, a single alert email goes out — and that's it. Alva will not keep emailing you as stock continues to fall through the same threshold. The alert only re-arms once you restock the tag, so adding more keys is what unlocks the next future alert. This one-alert-per-restock behaviour is enforced by checkLowStockAlerts() in licenseKeyNotifications.server.ts and the lastLowStockNotificationAt timestamp on each license key tag.
Configure the alert
1. Open the License Keys page
In the Alva admin, go to Files & packs and switch to the License keys tab. Each row is a license key tag, with its current available count and a status badge that turns red the moment a tag is below threshold.
2. Open the tag you want to alert on
Click an existing tag, or click New tag to create one. The tag drawer shows the name, duplicate-key policy, auto-generate options, and the Low stock threshold field.
Alva License keys tag drawer. Show the Low stock threshold number input filled with "10", with the available count above it and the Save button visible. No real customer data.
3. Set the threshold
Enter a number in Low stock threshold. The default is 5. Alva emails the merchant when the count of AVAILABLE keys for that tag drops to that number or below. Auto-generated tags ignore the threshold (they never run out).
4. Save
Click Save. The alert is active immediately and re-evaluates every time a key is assigned to an order.
What you'll receive
Alva sends the alert from the app's transactional sender to the shop's notification email — that's the Custom notification email set on the Settings page, falling back to the Fraud notification email when no custom address is set. The subject line is [Alva Digital Downloads] License keys running low: <Tag name>. The body contains the tag name, the current remaining count in large amber type, and an Add More Keys button that links straight into the tag's detail page in the Shopify admin so you can paste in or upload more keys without hunting for it.
Example low-stock alert email rendered in an inbox client. Show the subject line, "License keys running low: PRO-LICENSES" headline, "3 keys remaining" in amber, and the Add More Keys CTA. No real customer data.
Picking a threshold
Pick a number based on sales velocity, not a round figure. A good rule of thumb is roughly 10% of weekly sales for that SKU — that gives roughly seven days of lead time to source or generate the next batch of keys before the pool empties. Stores that sell in bursts (launches, sales) should set a higher threshold than steady-state stores.
FAQ
Will I get re-alerted if stock keeps dropping?
No. Alva fires one alert per tag per restock cycle. Once the email goes out, the next alert only fires after you've added more keys to the tag and the pool has dropped to the threshold again. This prevents inbox spam during a sales burst.
Can I set different thresholds per tag?
Yes. The threshold is stored on each license key tag, so a high-velocity tag can be set to 50 and a lower-volume tag to 5. Edit the tag at any time and the new threshold takes effect immediately.
Which email address gets the alert?
The alert goes to the Custom notification email set on the Alva Settings page. If none is set, it falls back to the Fraud notification email. If neither is configured the alert is skipped — set at least one to receive alerts.
See also
Was this helpful?
Last updated 2026-05-06