ReAI test store · Checkout payments work; test the full flow
ReAI/ commerce
NO
← Learn ReAI
SITE API

Notify when the right variant returns.

The shopper selects the sold-out size or color they want. ReAI records the request and can send the alert through the business’s configured email flow.

Follow the flow

  1. Enable email marketing and a back-in-stock flow for the business in ReAI. Then enable stockNotificationsEnabled in the starter’s store-content.js.
  2. Show the form only for published, sold-out variants. The shopper enters an email and consents to one stock notification.
  3. The Worker sends variantId, email and consent with the server-held Site credential and newsletter:subscribe scope.
  4. The flow follows availability and sends the alert when the variant can be bought. Repeated requests do not create multiple pending alerts for the same variant and address.

Separate consent

A stock alert does not subscribe the shopper to the newsletter. Pending requests expire after 180 days. Contact the business to withdraw the request.

No empty promises

The starter hides the form by default. Show it once sending is configured. The API rejects available variants and businesses without an active notification flow.

The response does not reveal who already subscribed.
POST /site/v1/commerce/stock-subscriptions
Authorization: Bearer <server-only Site credential>

{ "email": "you@example.com", "variantId": "<published sold-out variant UUID>", "consent": true }

200 { "accepted": true }
Next chapterEmail signup, with consent. ↗

Cart

Product subtotal—

Live catalog from ReAI. Payment mode and recipient are shown before checkout.

View cart