How It Works
- storekit sends
item.out_of_stockto your app whenever an item becomes unavailable. - Your app records the item, the time, the reason and what caused it.
- A scheduled job runs at a time you choose each morning and posts yesterday’s list, plus a rolling “most sold out this month” table, to Slack.
What You Need
- Webhooks enabled on your storekit plan (Settings → Developers).
- A Replit account. This recipe needs a public URL that stays up, a database, and a scheduler for the morning job, which Replit provides in one place.
- A Slack incoming webhook URL for the channel that should receive the digest.
Step 1: Build the App
Paste the whole block into the builder in a single message.Either button opens the builder with the whole prompt below already filled in. Nothing starts until you press send, so read it through and edit the parts marked as yours first.
Full prompt (click to expand)
Full prompt (click to expand)
Step 2: Connect storekit
1
Open the webhooks portal
In the dashboard sidebar, go to Settings → Developers and click Manage Webhooks (it reads Enable Webhooks the first time). Webhooks are a subscription feature — if you see Upgrade to enable webhooks, contact support first.
2
Add your app as an endpoint
In the embedded portal, add a new endpoint, paste the webhook URL your app builder gave you, and tick only the event types the recipe needs.
3
Copy the signing secret into your app
Open the endpoint you just created and copy its signing secret. In your app builder, save it as the environment variable
STOREKIT_WEBHOOK_SECRET (builders call this “secrets” or “environment variables”). Redeploy if the builder asks you to.4
Send a test event
Use the portal’s test option on the endpoint to send a sample event. The delivery log shows the response code from your app. A
2xx means your app accepted it; anything else, read the response body in the log — it is usually a missing secret.item.out_of_stock for this endpoint.
Step 3: Test With a Real Stock-Out
Snooze an item in the menu builder (see Snoozing Products). Within a few seconds a row appears in the app with reason “snoozed” and source “manual”. Unsnooze the item afterwards — the app does not record this, which is expected.Ideas
- Weekly buyer email: ask the builder to add a Monday email (via a provider such as Resend or Postmark) with the 30-day table attached as CSV.
- Prep list: mark items that sell out before 8 pm three times in a week as “under-prepped” and list them separately.
- Cross-check with the till: filter by
sourceto see how often your POS is hiding items you thought were on sale.
What This Does Not Do
- It cannot tell you when an item came back, because there is no “back in stock” event. Read the log as “went out at”, not “was out for”.
- It does not change availability. Un-snoozing and restocking happen in the dashboard or your till as before.
- Events start from the moment you connect the endpoint. There is no history before that; the 30-day table fills up over the first month.
- It is your service. storekit support can confirm an
item.out_of_stockevent reached your URL and the response code; the log and digest are yours.
Related
item.out_of_stock payload
Every reason and source value the event can carry.
Writing a Prompt That Works
The structure behind this prompt, and what to say when the builder gets it wrong.
Order Alerts to Slack or Your Phone
The same pattern for orders instead of stock.
Availability and Snoozing
Snoozing, inventory and the built-in snooze report.