Home / Help Center / pos-app-garment / garment / New Arrival Alerts
🔔 garment

New Arrival Alerts

New Arrival Alerts surfaces every wishlist entry whose product has come back into stock, so you can notify the waiting customer by WhatsApp in one tap — individually or in bulk.

📍 Menu path: /garment/new-arrival-alerts
👤 Who uses it: Owner,Manager,Staff

Overview

The page loads a single derived list from GET /garment/analytics/restocked-wishlist: every Wishlist entry still in PENDING status where the linked product's current stock is now greater than zero.

This is not a separate alerts table — it is computed live on each load by cross-referencing the same GarmentWishlist records used by the Wishlist page against the product catalogue's current stock level, so an item only appears here if someone previously saved it to the Wishlist page while it was out of stock and it has since been restocked.

Each row shows the customer, the product (and size/colour if recorded on the wishlist entry), the phone number if saved, and the current stock quantity now available.

Clicking Notify (or Notify N Selected for a bulk batch) opens WhatsApp Web/App with a pre-filled "back in stock" message per customer, then immediately marks that wishlist entry NOTIFIED via PUT /garment/wishlist/:id and removes it from this list.

Before You Start

Step-by-Step Guide

1 Notify one customer

  1. Find the row for the customer/product you want to act on.
  2. Click Notify on that row — a WhatsApp Web/App tab opens with a pre-filled message naming the product (and size, if recorded) and inviting the customer to visit.
  3. Send the message in WhatsApp as normal — back on this page, the entry is automatically marked NOTIFIED and disappears from the list.

2 Notify several customers in bulk

  1. Tick the checkbox on each row you want to include, or use Select all to tick every row currently listed.
  2. Click Notify N Selected — this opens a separate WhatsApp tab for each selected customer, one after another.
💡 Each selected row opens its own browser tab/window in quick succession — check your browser is not blocking pop-ups if only some tabs appear.

3 Refresh the list

  1. Click Refresh at any time to reload the restocked list — useful right after a delivery/restock has just been entered into inventory.

Every Field & Button, Explained

Field / ButtonWhat it does
RefreshRe-fetches GET /garment/analytics/restocked-wishlist and clears any current row selection.
Select allTicks (or clears) every row currently in the list.
Notify N SelectedOnly shown once at least one row is ticked; opens a WhatsApp tab per selected customer and marks each one NOTIFIED as its tab opens.
Row checkboxIncludes/excludes that entry from a bulk Notify N Selected action.
Customer name / phoneFrom the original Wishlist entry; phone is required for the Notify action to work on that row.
Wants: product / size / colourThe product (and size/colour, if recorded) the customer originally asked to be told about.
In Stock (N) badgeThe product's current stock quantity, confirming why this entry now qualifies as "restocked".
Notify (row button)Opens a WhatsApp message pre-filled for that single customer, then marks the wishlist entry NOTIFIED and removes it from the list.
Empty state"No pending alerts" — shown when there are no PENDING wishlist entries whose product is currently in stock (either everyone has been notified, or nothing on the wishlist has restocked yet).

Tips & Best Practices

Troubleshooting & FAQ

A customer I know is waiting for a restocked item isn't showing up here.
This page only lists Wishlist entries that were saved with status PENDING before the item restocked. If that customer's want was never added on the Wishlist page, or was already marked NOTIFIED/FULFILLED, it will not appear here — check the Wishlist page directly and add/re-open the entry if needed.
The Notify button did nothing / showed an error.
It requires a saved customer phone number on that wishlist entry — rows without one show a "No phone number for [name]" error instead of opening WhatsApp. Add the phone number to that entry from the Wishlist page, then it will appear correctly here on the next refresh.
I sent the WhatsApp message but the row is still showing here.
The row is only removed from this list after the PUT /garment/wishlist/:id call marking it NOTIFIED completes; if your connection dropped or the request failed silently, click Refresh — the row will still show as pending until that update actually saves.
Is this the same feature as the Wishlist page?
No — Wishlist (garm-wishlist) is where wants are first recorded and manually managed (Pending/Notified/Fulfilled/Cancelled, full CRUD). New Arrival Alerts is a derived, read-mostly view that cross-references those PENDING wishlist entries against current stock and exists purely to drive the one-tap WhatsApp notify action; it has no create/edit/delete of its own.

🧑‍💻 Developer Notes

Source component(s):

  • frontend-app/pos-app-garment/src/pages/garment/NewArrivalAlertPage.jsx

Backend endpoints used:

  • GET /garment/analytics/restocked-wishlist
  • PUT /garment/wishlist/:id

Related tables (db-core repositories):

  • GarmentWishlist
  • Product (stock column, read-only for this feature)

Redux slices:

  • None — local component state only

Feature flag key: customers

The backend function getRestockedWishlistItems (packages/pos-core/src/garment.js) is explicitly commented "for #19 new arrival alert" — confirming this page, not the Wishlist page, is its intended and sole consumer; the Wishlist page (garm-wishlist) instead drives full CRUD against GET/POST/PUT/DELETE /garment/wishlist and does not call the restocked-wishlist analytics endpoint. getRestockedWishlistItems loads up to 500 PENDING wishlist rows, batch-fetches current stock for every referenced product, computes isRestocked = stock > 0 per row, and filters down to only the restocked ones — this recomputation happens on every page load/Refresh rather than being pushed or cached, so it scales linearly with wishlist size. The WhatsApp phone number is hard-coded to prefix "91" (India) when the stored number does not already start with 91, matching the same pattern used by the electronics variant's warranty/EMI reminders; there is no phone-format validation beyond stripping non-digit characters.