Low-stock alert
Automation template · Catalog ·View source
Warns the team in Slack when a product's stock drops to a threshold, and can draft a reorder email to the supplier for you to approve.
How it works
- Trigger
- Checks stock levels every 30 minutes
- Does
- Posts the products that just ran low to Slack, with recent sales and days of cover
- Optional
- Drafts a purchase order email to each supplier with Resend
- Asks you
- Before any email is sent
What it needs
SlackPosts the low-stock alert to your team's channel
Resend (optional)Emails a reorder request to the supplier once you approve it
From your data. The agent finds the matching fields in your schema and confirms them with you.
- The product or variant's name
- The SKU, so the team and supplier know exactly which item (optional)
- The quantity on hand
- A per-product threshold, when the store keeps one (overrides the default threshold) (optional)
- The supplier the product is bought from, with a contact email (optional)
- Order line items (product and quantity), to work out recent sales (optional)
You'll choose
- Low-stock threshold · default 5Alert when stock is at or below this, unless the product has its own reorder point
- Slack channelWhere the alert is posted
- Reorder for this many days · default 30The suggested reorder quantity covers this many days of recent sales
- Draft supplier emails · default offDraft a reorder email per supplier (needs Resend); nothing is sent without approval
Example output
Slack, #ops-inventory
4 products are low on stock, 1 urgent Urgent: Linen Shirt, Sand, M (LS-SND-M): 0 left, sold 22 in 14 days, reorder ~47, Atlas Textiles Ceramic Pour-Over Set (CPO-WHT): 3 left, 1.4 days of cover, reorder ~62, Kiln & Co Linen Shirt, Sand, L (LS-SND-L): 5 left, 4.1 days of cover, reorder ~32, Atlas Textiles Beeswax Candle, Large (BWC-L): 4 left, no recent sales, Hive Supply
Supplier emails drafted for Atlas Textiles and Kiln & Co, waiting for approval. Hive Supply has no email on file.
Draft email to orders@atlastextiles.example, waiting for approval
Subject: Reorder request — Northline Goods
Hi Atlas Textiles team,
We would like to reorder the following:
- Linen Shirt, Sand, M (LS-SND-M): 47 units
- Linen Shirt, Sand, L (LS-SND-L): 32 units
Could you confirm the unit price and your earliest delivery date?
Thanks, Northline Goods
Show the instructions
Low-stock alert
Every run, find the products that have just reached low stock and tell the team in {{channel}}. Report each product once per dip: a product that was already low on the previous run is not news.
1. Find low-stock products
- A product is low when its stock is at or below its own reorder point, or, when it has none, at or below {{threshold}}.
- Ignore products that are archived, discontinued, drafts or not tracked for inventory.
- Count a product as newly low only if it was above its threshold the last time this automation reported, or has never been reported. Use the previous run’s result (or your automation memory) to remember which products you already alerted on. When a product goes back above its threshold, forget it, so the next dip alerts again.
- If no product is newly low, end the run as skipped (Finish Run with status skipped) so nothing is posted. A run that merely ends is still delivered to the channel.
2. Add context to each product
For each newly low product:
- Units sold in the last 14 days, from order lines, and the average per day.
- Days of cover = stock ÷ average daily sales (write “no recent sales” when the average is 0).
- Suggested reorder = average daily sales × {{coverDays}} − current stock, rounded up to a whole unit (at least 1). Say it is a suggestion.
- The supplier, if the product has one.
Mark a product urgent when stock is 0 or days of cover is under 3.
3. Post to Slack
Stage one message for {{channel}}:
- First line: how many products are newly low and how many are urgent, e.g. “4 products are low on stock, 1 urgent”.
- Then one line per product, urgent first, then by days of cover: name (SKU), stock, days of cover, suggested reorder, supplier.
- Keep it under 15 lines; if more products are low, list the 15 most urgent and say how many more there are.
Flag the run when any product is urgent.
4. Draft supplier emails (only when drafting is on: {{draftSupplierEmail}})
Skip this step when drafting is off or Resend is not connected.
- Group the newly low products by supplier. Skip products without a supplier email and mention them in the Slack message.
- For each supplier, draft one short, polite reorder request: the products (name, SKU), the suggested quantities, and a request to confirm price and delivery date. Sign it with the store’s name. Do not include internal stock levels or sales figures.
- Propose each email for approval. Never send one directly, and never send the same request twice for the same dip.