A shopping and account assistant for SFRA: browse, search, manage the cart and account, check out with a saved card, and review the order without leaving the page.
Get started · Shopper guide · Merchant guide · Code reference · Architecture · Phase PRs
Working sandbox screenshots. The implementation was verified on an SFRA 8 storefront with Bootstrap 5, site
RefArch_Practice, including an order placed and reviewed entirely inside the widget.
| For shoppers | For merchants | For developers |
|---|---|---|
| Browse categories, search, choose variations | Journey trail per session in custom objects | A separate plugin_chatwidget overlay |
| Cart: quantities, removal, promo codes, shipping method | Order reviews (1–5 stars, consented comments) | Reuses SFRA JSON routes for every write SFRA supports |
| Sign in, register, reset password | Retention job with per-customer erasure | Route observers that change no storefront behavior |
| Account, addresses, saved cards, orders | Consent-aware: nothing stored without tracking consent | No card data, CVV, tokens, addresses or search phrases stored |
| Checkout with a saved address and card | Works on storefront, checkout and Page Designer pages | Lint, build, metadata ZIP and CI |
git clone https://github.com/Vedesh-reddy/sfcc-chat-widget.git
cd sfcc-chat-widget
npm ci
npm run validate
npm run package:metadata- Build:
npm run validateruns JavaScript, SCSS, ISML and documentation checks and buildschatWidget.jsandchatWidget.css. - Deploy: upload
cartridges/plugin_chatwidget, including its generatedcartridge/staticassets, into your active code version. - Activate: place
plugin_chatwidgetbeforeapp_storefront_basein the site's cartridge path. - Import: set your site ID in
metadata/chat-widget/jobs.xml, rebuild the ZIP, and importdist/chat-widget-metadata.zipthrough Administration → Site Development → Site Import & Export. - Schedule: run
ChatWidget-PurgeJourneyDatadaily in Administration → Operations → Jobs.
plugin_chatwidget:app_storefront_base:modules
| Start menu | Product options | Cart |
|---|---|---|
![]() |
![]() |
![]() |
| Checkout payment | Review and place | Placed, with review |
|---|---|---|
![]() |
![]() |
![]() |
The widget places genuine SFCC orders through CheckoutServices-PlaceOrder. The store's own confirmation email arrived for order 00000102 with the same total, variant, saved card and shipping method chosen in the widget:
The shopper guide shows all 42 states: browsing, search with and without results, coupon errors, sign-in and registration errors, password reset, the address book, saved cards, orders, checkout, review consent, sign-out and mobile.
The merchant guide covers the custom object types, journey and activity records, and the retention job.
Any page ─ widget.isml (layout overlays) ─ chatWidget.js
│ every request: X-Chat-Widget: 1, POSTs with a fresh CSRF token
├─ ChatWidget-* JSON routes ──── reads, set default address, logout, password reset, reviews
└─ SFRA JSON routes ─────────── cart, coupons, login, registration, profile, addresses,
cards, SubmitShipping, SubmitPayment, PlaceOrder
│ server.prepend observers (widget requests only)
▼
journey.js ─ ChatWidgetJourney + ChatWidgetActivity (consent-aware)
▲
Job ChatWidget-PurgeJourneyData ─ retention and per-customer erasure
| Path | Purpose |
|---|---|
cartridges/plugin_chatwidget |
Deployable cartridge: controllers, helpers, job, templates, client code, styles |
metadata/chat-widget |
Custom object types and the retention job |
scripts |
Build, template check, documentation check, metadata packaging |
docs |
Installation, shopper and merchant guides, architecture, code reference, troubleshooting |
.github/workflows/ci.yml |
Validation and artifact packaging on Node 22 and 24 |
| Command | Result |
|---|---|
npm run build |
Compile chatWidget.js and chatWidget.css into cartridge/static/default |
npm run lint |
Check JavaScript, SCSS, ISML, and local documentation links |
npm run validate |
Run lint and build |
npm run package:metadata |
Produce the Business Manager import ZIP in dist |
The project is presented through five focused feature branches and PRs, merged in order. See development phases.
In-widget payment supports saved cards on synchronous processors (BASIC_CREDIT). Hosted-field, 3-D Secure and redirect processors, guest checkout and new cards hand over to the secure checkout page with the basket, address and shipping method already set. There is no free-text chat or AI; the assistant is a guided menu over live store data.
This is an independent extension, not an official Salesforce product. SFRA-derived layout overlays and terms are described in NOTICE.md.








