Stock alerts
Let shoppers ask to be notified when an out-of-stock item returns or drops in price. The assistant records the request, sends a confirmation email, and only ever mails people who clicked to confirm. No fake urgency, no surprise email.
What it does
When a customer asks to be told about a product, the assistant can record a watch on that product for that shopper's email address. There are two kinds of watch:
- Back-in-stock: notify the shopper when an out-of-stock item becomes available again.
- Price-drop: notify the shopper when the price falls below what it is today.
Both run on the assistant's subscribe_stock_alert tool, which records the alert against the product and the shopper email. The email is the only thing the shopper needs to provide, so this works for logged-in customers and guests alike.
No fake urgency
A back-in-stock alert is only offered for an item that is genuinely out of stock. If the shopper asks for one on an item that is in stock right now, the assistant declines and tells them they can simply buy it, because there is nothing to wait for. The in-stock check reads live WooCommerce data, not the model's assumption, so a back-in-stock alert can never be used to manufacture scarcity.
Price-drop alerts are allowed on any item, in stock or not, since watching for a lower price is not a scarcity tactic.
Double opt-in
Recording an alert does not activate it. The flow is deliberately two-step so the store can never be used to mail an address that did not ask for it:
- The shopper asks to be notified and gives an email. The assistant records a pending subscription.
- A confirmation email goes to that address with a single confirm link.
- The alert becomes active only after the shopper clicks that link. Until then, nothing else is sent and no notification can fire.
Every alert email also carries a one-click unsubscribe link, so a shopper can stop a watch at any time without signing in or replying. Confirm and unsubscribe links are authorised by a signed token tied to the specific subscription and action, not by a login session.
What the shopper sees
A typical exchange in the chat widget:
Shopper: The navy hoodie in medium is sold out. Tell me when it's back?
Assistant: Sure. What email should I use?
Shopper: sam@example.com
Assistant: Almost done! I've set up the alert and sent a confirmation
link to your email. Click it to activate the alert. You can
unsubscribe anytime in one click.
For a price watch, the shopper simply asks to be told if the price drops, and the same confirm-then-activate flow applies.
How the assistant calls it
The model invokes subscribe_stock_alert with the product and the shopper email. type defaults to a back-in-stock watch when omitted.
subscribe_stock_alert({
"product_id": 482,
"email": "sam@example.com",
"type": "back_in_stock" // or "price_drop"
// optional: "variation_id" to watch a specific variant
})
Pass variation_id to watch one specific variant, for example a single size or colour. The recorded watch is matched to the product and variation so the right shopper is notified on the right change.
Privacy
The shopper's email is personal data. It is stored only for the watch and used only to send the confirmation and the eventual alert. The result the model sees never contains the raw address, only a masked form, so the email stays out of the model's context. Stored alerts are covered by WordPress personal-data export and erase tools.