Skip to content

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.

Before listing gaps, here is what the system already does today:

AreaWhat exists
Storefront widgetVanilla JS chat bubble; text input only; markdown rendering; pre-chat identity form; quick-reply chips; order-status conversational flow; mobile-responsive; branded colour
RAG backendpgvector cosine search; top-5 chunk retrieval; product / collection / blog / website knowledge sources; conversation history (configurable); OpenRouter chat + embeddings
Order lookupConversational state machine asks for order number, calls Shopify live, injects order details into prompt
Visitor identityPre-chat form (name, email, phone); Shopify customer auto-fill via Liquid; localStorage persistence; guest mode toggle
Admin — Data SyncManual sync for products, collections, inventory, blogs; per-type sync state display
Admin — KnowledgeWebsite content fetch via GPT-4o-mini search; editable markdown editor; ingest to RAG
Admin — Chat LogsSession list with search; expandable conversation threads; per-message cost; visitor identity
Admin — Dashboard30-day activity charts; setup checklist; plan & credits summary
BillingFree plan (50 replies/month); paid plan ($20/mo, credit-balance model); add-on credit packs; Shopify Billing API integration
Settings / AppearanceWidget 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 — add stream: true and SSE/NDJSON reader
  • app/routes/api.chat.jsx — stream TransformStream response instead of JSON
  • extensions/appifire-chat/assets/chat-widget.js — replace fetch → res.json() with fetch → ReadableStream and 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 thumbnail
  • app/routes/api.chat.jsx — accept multipart/form-data; store image in object storage or pass base64 inline
  • app/lib/rag.server.js — route vision-capable messages to a model that accepts image inputs (e.g. openai/gpt-4o via 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 a products array alongside the text reply
  • app/routes/api.chat.jsx — expose products metadata in the JSON response
  • extensions/appifire-chat/assets/chat-widget.js — render product card HTML below the text bubble
  • prisma/schema.prisma — product image URL may need to be synced; product-sync.server.js may need image_url field

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 — add addToCart(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 variant
  • app/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 — add minSimilarity parameter (filter WHERE 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 — include sources: [{ 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 when sources is 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 — add ragTopK, ragMinSimilarity, ragStrictContext, llmMaxTokens, llmTemperature to Shop
  • app/routes/app.settings.jsx — expose as “Advanced AI settings” section (paid-plan only)
  • app/lib/rag.server.js — read from shop row instead of hardcoded values
  • app/lib/chat.server.js — pass through max_tokens and temperature from 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 before generateChatReply; return 400 or sanitized message depending on severity
  • app/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 signal
  • app/routes/api.chat.jsx — return { reply, sessionId, handoffTriggered: true } when escalation is needed
  • extensions/appifire-chat/assets/chat-widget.js — render “Talk to support” button CTA when handoffTriggered is 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 — add ChatFeedback model (chatMessageId, rating enum UP/DOWN, comment, createdAt)
  • New app/routes/api.feedback.jsxPOST endpoint 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 click
  • app/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.jsxGET handler; serialises session + messages for the current shop to CSV; streams the response with Content-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 join retrieved_chunks and knowledge_chunks.chunk_text for each assistant message; render “Context used” expandable panel inside the expanded message row
  • No DB migration needed; RetrievedChunk model 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 — add intent field to ChatMessage (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; reads shop_sync_state.lastSyncedAt for 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 the Shop row
  • prisma/schema.prisma — add autoSyncFrequency (String, default "manual") and nextScheduledSyncAt (DateTime?) to Shop

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 — load AppifireChat.locale from Liquid and use a strings map for UI labels
  • extensions/appifire-chat/blocks/chat-widget.liquid — inject {{ request.locale.iso_code }} into window.AppifireChat
  • app/lib/prompt-builder.server.js — add “Reply in the same language as the user. Detect from their message.” instruction
  • app/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 — add sendPostChatFollowUp(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 on chat_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 — add followUpEmailSentAt to ChatSession to 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 — add ChatIntegration model (shopId, provider enum, webhookUrl, apiKey, eventTriggers, enabled)
  • New app/routes/app.integrations.jsx — list enabled integrations; configure webhook URL / API credentials
  • New app/lib/integrations.server.jsdispatchChatEvent(session, eventType) fan-outs to enabled integrations
  • app/lib/rag.server.js or session-end hook — call dispatchChatEvent after 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 — add ChatExperiment model (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; store experimentId + variantId on ChatSession
  • app/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

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.

#FeatureKey files changedEstimated effort
1Streaming responseschat.server.js, api.chat.jsx, chat-widget.js1.5 days
6Similarity confidence thresholdvector-search.server.js, rag.server.js0.5 day
7Citations / sources panelapi.chat.jsx, chat-widget.js1 day
11Customer rating (thumbs up/down)schema.prisma, new api.feedback.jsx, chat-widget.js, app.chat-logs.jsx1.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.

#FeatureKey files changedEstimated effort
12Export transcripts (CSV)New app.chat-logs.export.jsx0.75 day
13Richer chat log detail (retrieved chunks)app.chat-logs.jsx loader + UI1 day
14Intent analytics dashboardschema.prisma, rag.server.js, new app.analytics.jsx2 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.

#FeatureKey files changedEstimated effort
3Rich product card responsesapi.chat.jsx, rag.server.js, chat-widget.js2 days
5AI-driven catalog search + filter UINew api.product-search.jsx, chat-widget.js, rag.server.js3 days
4Add-to-cart actions (variant deep-link)prompt-builder.server.js, api.chat.jsx, chat-widget.js1.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.

#FeatureKey decision needed before starting
8Admin-configurable retrieval settingsAgree on schema for per-shop RAG config
9PII redaction + content moderationChoose moderation provider (OpenAI vs custom regex)
10Human handoffDecide on helpdesk integration (email, Zendesk, Gorgias)
15Knowledge suggestions from chatsDefine “unanswered” heuristic; rate-limit LLM summarisation calls
16Scheduled auto-syncChoose cron provider (Cloudflare, Vercel, external)
17Multilingual widgetConfirm list of target locales; translatable string strategy
18Post-chat follow-up emailWire email.server.js to Resend/SendGrid
19CRM integrationsPrioritise which provider ships first (HubSpot vs Klaviyo)
2File / image uploadChoose image storage (S3/R2) and vision-capable model
20A/B testing frameworkRequires Feature 11 (ratings) to be live first for outcome measurement

These rules apply to all 20 features regardless of milestone:

  1. Plan gating: Advanced features (streaming, citations, add-to-cart, intent analytics, experiments) are gated behind shop.plan === "paid" checks in rag.server.js or api.chat.jsx using the existing billing model. The free plan can continue to use the baseline behaviour.

  2. Stateless backend: The api/chat route remains stateless per request. Session state continues to be stored only in chat_sessions.metadata (JSON column). Do not add in-memory session caches.

  3. Order-status branch safety: Features 6 (confidence threshold) and any prompt changes must branch after the awaitingOrderNumber state check in rag.server.js. The order status flow is already well-tested and must not be disrupted.

  4. 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).

  5. DB migrations: Each feature that changes prisma/schema.prisma must ship with a named migration file (npx prisma migrate dev --name <feature-name>) documented alongside the feature phase doc.

System areaFeatures
Chat widget (storefront)1, 2, 3, 4, 5, 7, 10, 11, 17
RAG backend / rag.server.js1, 6, 8, 9, 10, 13, 14, 19
Admin chat logs11, 12, 13
Admin analytics / dashboard14, 15, 20
Admin settings8, 9, 10, 16, 17, 18, 19
Billing / plan gating1, 3, 4, 5, 8, 9, 14, 20
Email / CRM / external10, 18, 19
DB schema8, 9, 11, 14, 16, 18, 19, 20