Dealer Portal
Dealer Portal creates a named, shareable catalog link per dealer or retailer — optionally restricted to a single product category — so they can browse your product catalog without logging in, using the same public catalog page your WhatsApp catalog sharing uses.
Overview
Each dealer entry stores a Dealer/Shop Name, Phone, Email, an optional Notes field, and an optional Category restriction (pulled live from your actual product categories); saving generates a unique catalog link containing a random token and, if set, the chosen category as a query parameter.
The generated link points at the app's existing public /#/catalog page — the same no-login product catalog page used elsewhere for WhatsApp catalog sharing — with the category filter applied via a category query parameter, plus a dealer query parameter carrying that dealer's token.
Every dealer record has a Copy (clipboard icon) button to copy its catalog link, an external-link icon to open it directly in a new tab, and a trash icon to remove the dealer entirely.
An info banner at the top of the page explains the intended usage in plain terms: give each dealer their own link, optionally scoped to one category, and share it via WhatsApp or email.
Before You Start
- No plan-tier restriction beyond the route's "inventory" feature gate.
- Only a Dealer / Shop Name is required to create a portal entry — phone, email, category and notes are all optional.
- The category dropdown is populated from your live product categories (GET /products/categories); if no categories are set up yet, only "All categories" will be selectable.
Step-by-Step Guide
1 Create a dealer catalog link
- Click Add Dealer.
- Enter Dealer / Shop Name * (required), Phone and Email.
- Optionally choose a category under Restrict to Category to scope the link to just that part of your catalog (e.g. "Kurtis" only), or leave it as "All categories".
- Add any Notes about this dealer/retailer relationship and click Create Portal Link — a unique catalog link is generated immediately.
2 Share a dealer's link
- Click Copy next to a dealer's link to copy the full URL to your clipboard, then paste it into a WhatsApp message or email to that dealer.
- Click the external-link icon to open the link yourself in a new tab and confirm it shows the right products before sending it out.
3 Remove a dealer
- Click the trash icon on a dealer entry and confirm to permanently remove that dealer and its link from your list.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Add Dealer | Opens the blank dealer creation form. |
Dealer / Shop Name * | Required label identifying the dealer or retailer. |
Phone | Optional contact number, described as a WhatsApp number in the form. |
Email | Optional contact email. |
Restrict to Category | Optional single-category filter applied to the generated catalog link; defaults to "All categories". |
Notes | Free-text notes about the dealer relationship. |
Catalog link row | Shows the full generated URL for that dealer in a monospace strip, with Copy, open-in-new-tab and Delete actions. |
Copy button | Copies that dealer's full catalog URL to the clipboard. |
External-link icon | Opens the catalog link in a new browser tab. |
Delete (trash) icon | Removes the dealer entry from this browser's saved list after a confirmation prompt. |
Tips & Best Practices
- Use the category restriction whenever a dealer only stocks or is interested in one part of your range — it keeps their link focused and avoids them browsing (or accidentally ordering against) products irrelevant to them.
- Since dealer entries are only saved to the browser you created them in (see devNotes), create and manage all your dealer links from one consistent computer/browser rather than switching devices.
- Re-share the link periodically rather than assuming a dealer bookmarked it — a plain catalog URL is easy for a retailer to lose track of.
Troubleshooting & FAQ
All my dealer entries disappeared.
I deleted a dealer but the link I already sent them still works.
Does the dealer link show different products to different dealers beyond the category filter?
The category dropdown is empty when adding a dealer.
🧑💻 Developer Notes
Source component(s):
frontend-app/pos-app-garment/src/pages/garment/DealerPortalPage.jsx
Backend endpoints used:
GET /products/categories
Related tables (db-core repositories):
None — dealer records are not persisted server-side at all
Redux slices:
None — persisted to browser localStorage under key garment_dealer_portals
Feature flag key: inventory
There is no garm-dealer-portal backend route, controller function, or DB table anywhere in the codebase — every dealer record (name, phone, email, category, notes, generated token) is created, listed and deleted entirely client-side via localStorage.getItem/setItem, and the only network call this page makes is GET /products/categories to populate the category dropdown. The generated catalog URL is `${origin}/#/catalog?category=