20 Paid Feature Gaps — AppiFire AI Chat Roadmap
Gap analysis of 20 monetizable chat features not currently available, with a prioritized 6–8 week MVP roadmap for widget and admin.
This document lists 20 high-value paid features not available in the current system, then prioritizes them into a fast 6–8 week roadmap across shopper widget and merchant admin.
Current System Snapshot (Baseline)
Section titled “Current System Snapshot (Baseline)”Before listing gaps, here is what the system already does today:
| Area | What exists |
|---|---|
| Storefront widget | Vanilla JS chat bubble; text input only; markdown rendering; pre-chat identity form; quick-reply chips; order-status conversational flow; mobile-responsive; branded colour |
| RAG backend | pgvector cosine search; top-5 chunk retrieval; product / collection / blog / website knowledge sources; conversation history (configurable); OpenRouter chat + embeddings |
| Order lookup | Conversational state machine asks for order number, calls Shopify live, injects order details into prompt |
| Visitor identity | Pre-chat form (name, email, phone); Shopify customer auto-fill via Liquid; localStorage persistence; guest mode toggle |
| Admin — Data Sync | Manual sync for products, collections, inventory, blogs; per-type sync state display |
| Admin — Knowledge | Website content fetch via GPT-4o-mini search; editable markdown editor; ingest to RAG |
| Admin — Chat Logs | Session list with search; expandable conversation threads; per-message cost; visitor identity |
| Admin — Dashboard | 30-day activity charts; setup checklist; plan & credits summary |
| Billing | Free plan (50 replies/month); paid plan ($20/mo, credit-balance model); add-on credit packs; Shopify Billing API integration |
| Settings / Appearance | Widget title, welcome message, brand colour, bubble position; widget on/off toggle; pre-chat form toggles |
20 Paid Feature Gaps (Not Available Today)
Section titled “20 Paid Feature Gaps (Not Available Today)”Feature 1 — Streaming (token-by-token) Chatbot Responses
Section titled “Feature 1 — Streaming (token-by-token) Chatbot Responses”Why merchants pay for it: The current widget shows a “Typing…” placeholder and then replaces it with the full reply after the LLM finishes. Shoppers experience a noticeable delay, especially on slower models or long answers. Streaming tokens to the browser makes the reply feel instant and significantly reduces perceived latency — which directly lifts conversion and satisfaction.
Exact gap: callOpenRouterChat in app/lib/chat.server.js makes a standard fetch with no stream: true flag. api.chat.jsx returns a complete JSON response. The widget in chat-widget.js has no streaming reader.
Impacted files:
app/lib/chat.server.js— addstream: trueand SSE/NDJSON readerapp/routes/api.chat.jsx— streamTransformStreamresponse instead of JSONextensions/appifire-chat/assets/chat-widget.js— replacefetch → res.json()withfetch → ReadableStreamand append tokens incrementally
Feature 2 — File / Image Upload in Widget (Photo Questions)
Section titled “Feature 2 — File / Image Upload in Widget (Photo Questions)”Why merchants pay for it: Shoppers frequently want to share a screenshot of a defective product, a photo to match a colour, or a size chart to compare. Without file upload the conversation dead-ends into “please email us a photo.” Stores that enable photo questions see fewer returns and higher ticket resolution rates.
Exact gap: The widget input is a plain <input type="text">. There is no file-input UI, no upload endpoint, and no vision-capable model call in rag.server.js.
Impacted files:
extensions/appifire-chat/assets/chat-widget.js— add paperclip icon,<input type="file">, preview thumbnailapp/routes/api.chat.jsx— acceptmultipart/form-data; store image in object storage or pass base64 inlineapp/lib/rag.server.js— route vision-capable messages to a model that accepts image inputs (e.g.openai/gpt-4ovia OpenRouter)app/lib/prompt-builder.server.js— include image content block in the messages array
Feature 3 — Rich Product Card Responses (Images + Quick Actions)
Section titled “Feature 3 — Rich Product Card Responses (Images + Quick Actions)”Why merchants pay for it: Plain-text product mentions in chat require the shopper to leave the chat, navigate to the product page, and re-engage. A structured product card (thumbnail, price, rating, “View product” / “Add to cart” buttons) keeps the entire decision inside the chat and dramatically shortens the path to purchase.
Exact gap: buildPrompt in prompt-builder.server.js formats chunks as plain text. The widget renders only markdown. There is no structured response format or card component in the widget.
Impacted files:
app/lib/rag.server.js— detect product-intent replies and optionally return aproductsarray alongside the text replyapp/routes/api.chat.jsx— exposeproductsmetadata in the JSON responseextensions/appifire-chat/assets/chat-widget.js— render product card HTML below the text bubbleprisma/schema.prisma— product image URL may need to be synced;product-sync.server.jsmay needimage_urlfield
Feature 4 — Add-to-Cart / Variant Selection Actions Driven by AI
Section titled “Feature 4 — Add-to-Cart / Variant Selection Actions Driven by AI”Why merchants pay for it: Telling a shopper “this jacket is perfect for you” closes fewer sales than letting them click “Add to cart” inside the chat window. Even a simple deep-link to a pre-selected variant reduces the number of steps by 2–3 clicks, which is significant on mobile.
Exact gap: The widget has no ability to call window.Shopify.routes, post to cart/add.js, or navigate to a variant URL. The backend never constructs checkout or cart links.
Impacted files:
extensions/appifire-chat/assets/chat-widget.js— addaddToCart(variantId, quantity)helper and cart-action buttons inside product cards (Feature 3)app/lib/prompt-builder.server.js— instruct the AI to include a[ADD_TO_CART:variantId]sentinel when recommending a specific variantapp/routes/api.chat.jsx— parse sentinel and convert to a Shopify storefront cart URL in the response
Feature 5 — AI-Driven Catalog Search with Filter UI
Section titled “Feature 5 — AI-Driven Catalog Search with Filter UI”Why merchants pay for it: Many shoppers open chat with “I’m looking for a black waterproof jacket under $100.” RAG retrieves the 5 nearest chunks, but does not execute a structured catalog search. A dedicated search mode with filter chips (category, price range, in-stock) lets chat feel like a personal shopper rather than a knowledge base.
Exact gap: searchSimilarChunks in vector-search.server.js returns the nearest knowledge chunks; there is no structured product filter, no price-range filter, and no “show more” pagination. The widget has no filter UI.
Impacted files:
- New
app/routes/api.product-search.jsx— Shopify Storefront API proxy with filter parameters extensions/appifire-chat/assets/chat-widget.js— filter chip panel rendered when intent is “catalog search”app/lib/rag.server.js— detect filter-search intent and route to product-search endpoint instead of pure RAG
Feature 6 — Similarity Confidence Threshold + Smarter Fallback
Section titled “Feature 6 — Similarity Confidence Threshold + Smarter Fallback”Why merchants pay for it: Today if the shop has any ingested chunks, the RAG flow always calls the LLM — even when the nearest chunk has very low cosine similarity to the question. This produces off-topic, confusing answers. A configurable threshold (e.g. min similarity 0.35) means the bot refuses to guess rather than hallucinating.
Exact gap: searchSimilarChunks in vector-search.server.js has no minSimilarity parameter. rag.server.js calls the LLM whenever chunks.length > 0 regardless of scores. The only fallback is the chunks.length === 0 case.
Impacted files:
app/lib/vector-search.server.js— addminSimilarityparameter (filterWHERE similarity >= $minSimilarity)app/lib/rag.server.js— apply threshold; fall through to fallback reply when all chunks are below threshold (while preserving the order-status branch)prisma/schema.prisma/app/routes/app.settings.jsx— expose min similarity as a per-shop setting (advanced)
Feature 7 — Citations / “Sources” Panel in Chat UI
Section titled “Feature 7 — Citations / “Sources” Panel in Chat UI”Why merchants pay for it: When a shopper asks “do you ship to Canada?” and the bot answers “Yes”, they trust the answer more if they can see “Based on: Shipping Policy page.” Sources are standard in enterprise AI tools and reduce the perceived hallucination risk.
Exact gap: rag.server.js saves retrieved chunks to retrieved_chunks (audit table) and includes Link: in the system prompt, but the widget never receives metadata about which sources were used. The JSON response from api.chat.jsx only returns { reply, sessionId }.
Impacted files:
app/routes/api.chat.jsx— includesources: [{ title, url, similarity }]in the JSON response (top 3)extensions/appifire-chat/assets/chat-widget.js— render a collapsible “Sources” section below the bot reply whensourcesis present in the API response
Feature 8 — Admin-Configurable Retrieval + Guardrail Settings
Section titled “Feature 8 — Admin-Configurable Retrieval + Guardrail Settings”Why merchants pay for it: A fashion store needs a strict “only answer from context” guardrail. A tech store may want broader answers. Both need to tune how many chunks are retrieved and the minimum similarity. Currently these values are hardcoded constants buried in server files.
Exact gap: topK is hardcoded as 5 in rag.server.js. max_tokens is hardcoded as 512 in chat.server.js. temperature is 0.3. There is no per-shop settings row for any RAG parameter.
Impacted files:
prisma/schema.prisma— addragTopK,ragMinSimilarity,ragStrictContext,llmMaxTokens,llmTemperaturetoShopapp/routes/app.settings.jsx— expose as “Advanced AI settings” section (paid-plan only)app/lib/rag.server.js— read fromshoprow instead of hardcoded valuesapp/lib/chat.server.js— pass throughmax_tokensandtemperaturefrom shop settings
Feature 9 — PII Redaction + Pre-LLM Content Moderation
Section titled “Feature 9 — PII Redaction + Pre-LLM Content Moderation”Why merchants pay for it: Enterprise and mid-market merchants operating in regulated regions (GDPR, CCPA, HIPAA-adjacent) need assurance that credit card numbers, SSNs, or medical references are not forwarded to a third-party LLM. A lightweight redaction pass protects both the merchant and their customers.
Exact gap: api.chat.jsx passes the raw user message string directly to generateChatReply with no content inspection. There is no moderation endpoint call and no PII pattern stripping.
Impacted files:
- New
app/lib/moderation.server.js— regex + optional OpenAI Moderation API call; returns{ safe, redacted, flaggedCategories } app/routes/api.chat.jsx— call moderation beforegenerateChatReply; return 400 or sanitized message depending on severityapp/routes/app.settings.jsx— toggle “Enable content moderation” + “Strict PII redaction” (paid feature)
Feature 10 — Human Handoff (“Talk to Support”) When AI Is Unsure
Section titled “Feature 10 — Human Handoff (“Talk to Support”) When AI Is Unsure”Why merchants pay for it: No AI is right 100% of the time. When a shopper has a complex complaint, the chat needs to escalate gracefully to a support ticket or live agent. Without handoff, shoppers who hit the limits of the AI simply leave — often mid-purchase.
Exact gap: The empty-context fallback in rag.server.js returns “please contact the store’s support team” as plain text with no action. There is no “open support ticket” call, no Zendesk/Gorgias webhook, and no in-widget CTA button.
Impacted files:
app/lib/rag.server.js— detect repeated fallback within a session and trigger handoff signalapp/routes/api.chat.jsx— return{ reply, sessionId, handoffTriggered: true }when escalation is neededextensions/appifire-chat/assets/chat-widget.js— render “Talk to support” button CTA whenhandoffTriggeredis true- New
app/routes/api.handoff.jsx— create a support ticket via email or third-party webhook app/routes/app.settings.jsx— configure handoff email / webhook URL
Feature 11 — Customer Rating (Thumbs Up / Thumbs Down) per AI Reply
Section titled “Feature 11 — Customer Rating (Thumbs Up / Thumbs Down) per AI Reply”Why merchants pay for it: Reply-level ratings are the fastest feedback loop for improving chat quality. Merchants can immediately spot which responses shoppers find unhelpful, then refine knowledge, guardrails, or prompts. Enterprise chat tools (Intercom, Drift) gate this behind paid tiers.
Exact gap: There is no feedback UI in the widget, no chat_feedback table in the DB, and no feedback display in the admin logs page (app.chat-logs.jsx).
Impacted files:
prisma/schema.prisma— addChatFeedbackmodel (chatMessageId,ratingenum UP/DOWN,comment,createdAt)- New
app/routes/api.feedback.jsx—POSTendpoint to store rating (CORS-enabled, no auth) extensions/appifire-chat/assets/chat-widget.js— render thumbs icons after each bot reply; call feedback API on clickapp/routes/app.chat-logs.jsx— show feedback indicator (thumbs icon + colour) per assistant message
Feature 12 — Export Chat Transcripts (CSV / PDF)
Section titled “Feature 12 — Export Chat Transcripts (CSV / PDF)”Why merchants pay for it: Support managers need to export chat histories for compliance audits, shift handoffs, or training data for better prompt engineering. The current Chats screen has search but no export.
Exact gap: app.chat-logs.jsx renders sessions in-browser only. There is no GET /app/chat-logs/export route, no CSV serialisation, and no file download trigger.
Impacted files:
- New
app/routes/app.chat-logs.export.jsx—GEThandler; serialises session + messages for the current shop to CSV; streams the response withContent-Disposition: attachment app/routes/app.chat-logs.jsx— add “Export CSV” button that navigates to the export route (with optional date-range params)
Feature 13 — Richer Admin Chat Log Detail (Retrieved Chunks + Model Breakdown)
Section titled “Feature 13 — Richer Admin Chat Log Detail (Retrieved Chunks + Model Breakdown)”Why merchants pay for it: When a reply is wrong, the merchant needs to know which knowledge chunks drove it and whether the correct information was in the knowledge base at all. This is essential for debugging RAG quality without reading raw DB tables.
Exact gap: The Chats admin (app.chat-logs.jsx) shows only messageText, role, chargedCost, and createdAt. The retrieved_chunks table (already populated by rag.server.js) is never queried or surfaced in the UI.
Impacted files:
app/routes/app.chat-logs.jsx— expand loader to joinretrieved_chunksandknowledge_chunks.chunk_textfor each assistant message; render “Context used” expandable panel inside the expanded message row- No DB migration needed;
RetrievedChunkmodel and table already exist
Feature 14 — Intent Analytics Dashboard (What Customers Actually Ask)
Section titled “Feature 14 — Intent Analytics Dashboard (What Customers Actually Ask)”Why merchants pay for it: Knowing that 40% of chat questions are about returns, 25% about shipping, and 15% about sizing tells merchants exactly where to invest in content and product pages. Aggregate intent data is one of the most powerful outputs of any chat system, but it is not surfaced today.
Exact gap: The Dashboard shows session counts and reply counts but no intent breakdown. There is no intent classification step in the chat pipeline.
Impacted files:
prisma/schema.prisma— addintentfield toChatMessage(nullable string, e.g.product,order,shipping,returns,policy,other)app/lib/rag.server.js— after LLM reply, classify intent with a lightweight heuristic (keyword match is sufficient for MVP; LLM classification for higher tiers)- New
app/routes/app.analytics.jsx— bar chart of intent buckets; time-series; top unanswered questions app/routes/app.jsx— add “Analytics” nav link (paid-plan only)
Feature 15 — Auto-Generated Knowledge Suggestions from Real Chats
Section titled “Feature 15 — Auto-Generated Knowledge Suggestions from Real Chats”Why merchants pay for it: The Knowledge screen requires merchants to manually write FAQs. But the chat logs already contain the exact questions shoppers ask most. Auto-surfacing suggested FAQ entries from high-frequency unanswered or poorly-answered questions saves hours of content work.
Exact gap: app.knowledge.jsx is a manual editor. Chat logs are stored but never analysed for recurring patterns. There is no background job or on-demand LLM summarisation pass over chat_messages.
Impacted files:
app/routes/app.knowledge.jsx— add “Suggest from chats” button that triggers a server action- New action in
app/routes/app.knowledge.jsx(or a dedicated route) — fetch recent unanswered/low-rated messages, call OpenRouter to group and summarise into draft FAQs, return draft text for merchant review app/routes/app.chat-logs.jsx— optionally flag messages marked as “unanswered” or “rated down” for the suggestion pass
Feature 16 — Scheduled / Automatic Data Sync (Freshness SLAs)
Section titled “Feature 16 — Scheduled / Automatic Data Sync (Freshness SLAs)”Why merchants pay for it: A store that adds new products daily needs the RAG knowledge base to update automatically. Manual sync is error-prone and leads to the AI recommending out-of-stock or discontinued products — which erodes trust.
Exact gap: All sync triggers in app.data-sync.jsx are manual button clicks. There is no cron expression, webhook-triggered incremental sync beyond the existing products/update webhook, and no “sync health” alerting.
Impacted files:
- New
app/lib/scheduled-sync.server.js— wraps existing sync modules; readsshop_sync_state.lastSyncedAtfor incremental mode - New
app/routes/api.scheduled-sync.jsx— a protected endpoint callable by a cron service (e.g. Cloudflare Cron Trigger, Vercel Cron, or an external scheduler) with a bearer token app/routes/app.settings.jsx— “Auto-sync frequency” dropdown (Daily / Weekly / Manual) stored on theShoprowprisma/schema.prisma— addautoSyncFrequency(String, default"manual") andnextScheduledSyncAt(DateTime?) toShop
Feature 17 — Multilingual Widget + Locale-Aware Responses
Section titled “Feature 17 — Multilingual Widget + Locale-Aware Responses”Why merchants pay for it: Shopify stores serve global customers. A French shopper should see “Bonjour! Comment puis-je vous aider?” and receive answers in French. All widget UI strings are currently hardcoded in English and the system prompt does not include language detection or instruction.
Exact gap: Widget strings ('Chat with us', 'Type a message…', 'Start Chat', 'Continue as Guest') are hardcoded English. buildPrompt in prompt-builder.server.js does not detect or instruct the model about the visitor’s language.
Impacted files:
extensions/appifire-chat/assets/chat-widget.js— loadAppifireChat.localefrom Liquid and use a strings map for UI labelsextensions/appifire-chat/blocks/chat-widget.liquid— inject{{ request.locale.iso_code }}intowindow.AppifireChatapp/lib/prompt-builder.server.js— add “Reply in the same language as the user. Detect from their message.” instructionapp/routes/app.settings.jsx— “Default widget language” selector (for stores with a single language)
Feature 18 — Proactive Post-Chat Email Follow-Up for Lead Capture
Section titled “Feature 18 — Proactive Post-Chat Email Follow-Up for Lead Capture”Why merchants pay for it: Many shoppers chat, don’t buy, and leave. If the pre-chat form collected an email (Phase 18 already does this), sending a personalised follow-up email (“Hi Ali, you were asking about the waterproof jacket — here it is with a 10% discount”) recovers lost conversions. This is a standard feature in tools like Tidio and Drift.
Exact gap: Visitor email is stored on chat_sessions.visitor_email (Phase 18). There are no email triggers on session close, no follow-up email templates, and email.server.js has only a low-balance alert stub.
Impacted files:
app/lib/email.server.js— addsendPostChatFollowUp(session, shopSettings)function (wire to Resend/SendGrid)app/lib/rag.server.js— detect session end signal and enqueue follow-up (or use a webhook-triggered approach onchat_sessions.endedAt)app/routes/app.settings.jsx— “Post-chat follow-up email” toggle, delay (e.g. 30 min), and template editor (paid-plan only)prisma/schema.prisma— addfollowUpEmailSentAttoChatSessionto prevent duplicate sends
Feature 19 — CRM Integrations for Transcripts + Leads (HubSpot / Zendesk / Klaviyo)
Section titled “Feature 19 — CRM Integrations for Transcripts + Leads (HubSpot / Zendesk / Klaviyo)”Why merchants pay for it: Support and marketing teams live in CRM and helpdesk tools. Every time a chat captures a lead or creates a support need, they want it to appear in HubSpot, Zendesk, or Klaviyo automatically — with the full transcript. Without this, chat data stays siloed and the business case for the tool weakens.
Exact gap: There are no outbound webhooks, no CRM API calls, and no integration settings. email.server.js is the only notification mechanism and it only alerts the merchant about billing.
Impacted files:
prisma/schema.prisma— addChatIntegrationmodel (shopId,providerenum,webhookUrl,apiKey,eventTriggers,enabled)- New
app/routes/app.integrations.jsx— list enabled integrations; configure webhook URL / API credentials - New
app/lib/integrations.server.js—dispatchChatEvent(session, eventType)fan-outs to enabled integrations app/lib/rag.server.jsor session-end hook — calldispatchChatEventafter each reply and on session close
Feature 20 — A/B Testing for Prompts / Models / Policies with Measured Outcomes
Section titled “Feature 20 — A/B Testing for Prompts / Models / Policies with Measured Outcomes”Why merchants pay for it: Advanced merchants and agencies need to know whether a stricter system prompt increases satisfaction ratings, or whether GPT-4o outperforms GPT-4o-mini for their product type. A/B testing with automatic winner selection based on rating data is a premium-tier differentiator.
Exact gap: callOpenRouterChat in chat.server.js uses a single model per plan. buildPrompt uses a single hardcoded system prompt. There is no experiment framework, no variant assignment, and no outcome tracking tied to the chat_feedback table (Feature 11).
Impacted files:
prisma/schema.prisma— addChatExperimentmodel (shopId,name,variantA,variantB,splitPct,status,startedAt,winnerId)- New
app/routes/app.experiments.jsx— create/view/conclude experiments app/lib/rag.server.js— on session start, assign variant; storeexperimentId+variantIdonChatSessionapp/lib/chat.server.js— use variant model/prompt from experiment assignment- Analytics integration (Feature 14) — compare outcomes (rating, session length, add-to-cart) by variant
Fast MVP Roadmap (Next 6–8 Weeks)
Section titled “Fast MVP Roadmap (Next 6–8 Weeks)”The roadmap is prioritized by revenue impact, implementation effort, and dependency order:
- Milestone A (Weeks 1–2): Trust + speed foundations
- Milestone B (Weeks 3–4): Operational admin value
- Milestone C (Weeks 5–8): Revenue-driving actions
- Post-MVP (After Week 8): Platform and integrations
Milestone A — Weeks 1–2: Trust + Speed Foundations
Section titled “Milestone A — Weeks 1–2: Trust + Speed Foundations”These four features improve the core chat experience for every shopper and every merchant, have no external service dependencies, and are fast to implement.
| # | Feature | Key files changed | Estimated effort |
|---|---|---|---|
| 1 | Streaming responses | chat.server.js, api.chat.jsx, chat-widget.js | 1.5 days |
| 6 | Similarity confidence threshold | vector-search.server.js, rag.server.js | 0.5 day |
| 7 | Citations / sources panel | api.chat.jsx, chat-widget.js | 1 day |
| 11 | Customer rating (thumbs up/down) | schema.prisma, new api.feedback.jsx, chat-widget.js, app.chat-logs.jsx | 1.5 days |
Gating: All four are available only on the paid plan (check shop.plan at the API level).
Milestone B — Weeks 3–4: Operational Admin Value
Section titled “Milestone B — Weeks 3–4: Operational Admin Value”These three features give merchants clear operational wins (data export, debugging, intent insights) that reduce support overhead and justify the subscription fee.
| # | Feature | Key files changed | Estimated effort |
|---|---|---|---|
| 12 | Export transcripts (CSV) | New app.chat-logs.export.jsx | 0.75 day |
| 13 | Richer chat log detail (retrieved chunks) | app.chat-logs.jsx loader + UI | 1 day |
| 14 | Intent analytics dashboard | schema.prisma, rag.server.js, new app.analytics.jsx | 2 days |
Gating: Export and enriched logs are available to all plans; intent analytics is paid only.
Milestone C — Weeks 5–8: Revenue-Driving Actions
Section titled “Milestone C — Weeks 5–8: Revenue-Driving Actions”These three features directly increase add-to-cart rates and complete the “AI personal shopper” experience.
| # | Feature | Key files changed | Estimated effort |
|---|---|---|---|
| 3 | Rich product card responses | api.chat.jsx, rag.server.js, chat-widget.js | 2 days |
| 5 | AI-driven catalog search + filter UI | New api.product-search.jsx, chat-widget.js, rag.server.js | 3 days |
| 4 | Add-to-cart actions (variant deep-link) | prompt-builder.server.js, api.chat.jsx, chat-widget.js | 1.5 days |
Dependency order: Product cards (3) must land before add-to-cart actions (4). Catalog search (5) can run in parallel.
Post-MVP — Platform + Integrations (After Week 8)
Section titled “Post-MVP — Platform + Integrations (After Week 8)”These features require additional infrastructure decisions (email providers, CRM API keys, cron setup, experiment tracking) and should be scoped as a separate engineering sprint.
| # | Feature | Key decision needed before starting |
|---|---|---|
| 8 | Admin-configurable retrieval settings | Agree on schema for per-shop RAG config |
| 9 | PII redaction + content moderation | Choose moderation provider (OpenAI vs custom regex) |
| 10 | Human handoff | Decide on helpdesk integration (email, Zendesk, Gorgias) |
| 15 | Knowledge suggestions from chats | Define “unanswered” heuristic; rate-limit LLM summarisation calls |
| 16 | Scheduled auto-sync | Choose cron provider (Cloudflare, Vercel, external) |
| 17 | Multilingual widget | Confirm list of target locales; translatable string strategy |
| 18 | Post-chat follow-up email | Wire email.server.js to Resend/SendGrid |
| 19 | CRM integrations | Prioritise which provider ships first (HubSpot vs Klaviyo) |
| 2 | File / image upload | Choose image storage (S3/R2) and vision-capable model |
| 20 | A/B testing framework | Requires Feature 11 (ratings) to be live first for outcome measurement |
Implementation Notes
Section titled “Implementation Notes”These rules apply to all 20 features regardless of milestone:
-
Plan gating: Advanced features (streaming, citations, add-to-cart, intent analytics, experiments) are gated behind
shop.plan === "paid"checks inrag.server.jsorapi.chat.jsxusing the existing billing model. The free plan can continue to use the baseline behaviour. -
Stateless backend: The
api/chatroute remains stateless per request. Session state continues to be stored only inchat_sessions.metadata(JSON column). Do not add in-memory session caches. -
Order-status branch safety: Features 6 (confidence threshold) and any prompt changes must branch after the
awaitingOrderNumberstate check inrag.server.js. The order status flow is already well-tested and must not be disrupted. -
Widget compatibility: The widget is a self-contained vanilla JS IIFE loaded from Shopify’s CDN. Every new widget feature must work without a build step and degrade gracefully when the backend doesn’t return the new fields (use optional chaining and null checks throughout).
-
DB migrations: Each feature that changes
prisma/schema.prismamust ship with a named migration file (npx prisma migrate dev --name <feature-name>) documented alongside the feature phase doc.
Cross-Reference: Features by System Area
Section titled “Cross-Reference: Features by System Area”| System area | Features |
|---|---|
| Chat widget (storefront) | 1, 2, 3, 4, 5, 7, 10, 11, 17 |
| RAG backend / rag.server.js | 1, 6, 8, 9, 10, 13, 14, 19 |
| Admin chat logs | 11, 12, 13 |
| Admin analytics / dashboard | 14, 15, 20 |
| Admin settings | 8, 9, 10, 16, 17, 18, 19 |
| Billing / plan gating | 1, 3, 4, 5, 8, 9, 14, 20 |
| Email / CRM / external | 10, 18, 19 |
| DB schema | 8, 9, 11, 14, 16, 18, 19, 20 |