PetStore.Direct
productsearch.mypetjet.com
USD
April 2026
Reduce customer response time from hours to seconds; AI agents handle inquiries 24/7 with no queue
Lift customer satisfaction scores; consistent, accurate, personalized responses at every touchpoint
Proactive outreach via voice, SMS, and WhatsApp campaigns; AI closes the loop from inquiry to purchase
SMBs implementing AI agents see 200–500% ROI in year one, with payback periods of 1–3 months (McKinsey / AI SuperThinkers, 2026)
A 5-person team can operate with the rigor of a 50-person enterprise — without the $4M payroll
Data Privacy & Sovereignty — Customer data, pricing logic, and conversation history never leave your infrastructure. No third-party vendor owns your most sensitive operational data.
Local & Frontier LLM Flexibility — The platform is model-agnostic. Run cost-efficient open-source models (Llama, Mistral, Qwen) locally for routine queries; route only complex reasoning to frontier APIs. Up to 18× cheaper per token at volume vs. cloud-only.
Domain-Specific Accuracy — Generic off-the-shelf AI hallucinates on your catalog, your SKUs, your policies. A custom system is trained on your data and enforces zero-hallucination guarantees.
No Vendor Lock-In — You own the codebase, the schema, and the roadmap. Swap models, add channels, or white-label for new portfolio brands — no permission required.
This document consolidates the full engagement record into three self-contained parts, each independently referenceable.
A consolidated technical and functional reference covering what was built, what it does, and how it is operated.
PetStore.Direct operates a large Shopify catalog of professional pet-grooming equipment — clippers, blades, shears, shampoos, dryers and more. Before this engagement, product data was fragmented across tags, descriptions and tribal knowledge, with no automated way to find the right product quickly.
This engagement delivered an end-to-end Brand Intelligence & Customer Experience Platform, a production AI voice and chat assistant, operational tooling for staff, and an admin platform covering CRM, outbound campaigns and AI agent management — all deployed at productsearch.mypetjet.com.
Ingests and enriches every Shopify product with structured, machine-readable intelligence under a managed multi-level taxonomy.
Back-office for merchandisers and editors covering manufacturer management, enrichment queues, AI playground and taxonomy management.
Handles product recommendations, order status, purchase initiation and support hand-off — embeddable across website, Gorgias, voice and SMS.
Three-gated checkout that creates a Shopify draft order and emails a draft invoice on explicit customer confirmation.
Full operational control of contacts, companies, deals, tasks, AI-driven outbound campaigns (voice/SMS/WhatsApp) and platform-wide agent routing.
English production agent plus Spanish and Portuguese agents in testing, with per-language tone and recommendation adaptation.
Each business goal mapped to the outcome actually delivered.
The platform sits between Shopify — the authoritative catalog, inventory and orders system — and all customer-facing channels, with PostgreSQL as the central data store and a single chat API serving every channel with format-specific responses.
Next.js 14 (App Router, React 18, server components) · TypeScript · Tailwind CSS + shadcn/ui + Radix primitives
PostgreSQL via Prisma ORM · NextAuth with Prisma adapter (credentials + bcrypt)
Shopify REST + GraphQL Admin APIs with OAuth token auto-refresh · Gorgias via Model Context Protocol (MCP)
Gemini 2.5 Flash routed through an internal LLM gateway · AES-256-GCM encryption with dual-key rotation
Recharts, Chart.js, Plotly · Managed Next.js hosting at productsearch.mypetjet.com
The platform is multi-tenant from the ground up: every key table carries a tenantId column (defaulting to petstore-direct), so additional stores can be onboarded with no schema changes.
Brand/vendor records — name, website, contact, rating, verified flag, logo, source URL, last scrape timestamp.
Every Shopify product mirrored — name, price, SKU, variantId, handle/ID/URL, stock, tags, specs JSON, plus enrichment fields (qualitySignals, sellingDetails, enrichedCategory).
Long-form brand intelligence — company overview, certifications, product categories, brandIntelligence JSON, research timestamp.
Per-tenant conversational personality, LLM settings, greeting, suggested questions, and MCP integration records (Gorgias and extensible to any MCP server).
A relational hierarchy replaces the flat legacy productType string, enforced via foreign keys:
Each product carries classification source, AI confidence score (0–1), needs-review flag and audit trail.
Category-specific facets are modelled as data — not hard-coded — enabling the chatbot to ask "what coat type?" or "what blade size?" and filter precisely without a code change when a new facet is added.
The platform ingests the Shopify catalog and layers three tiers of intelligence on top of each product — all idempotent, so reruns are cheap and existing enrichment is preserved.
Rule-based extraction from Shopify tags. Outputs: isBestSeller, isTopRated, groomerEndorsements, coatTypes, collections, productType — no external API call.
LLM reads product name + description and returns structured selling fields: features, benefits, idealFor, useCase, sellingPoints, keywords and a validated category.
LLM researches the manufacturer: reputation, year founded, Amazon sentiment, pro-groomer sentiment and competitive market position — stored on ManufacturerKnowledge.
All tiers run in batches with progress tracking and a human review/approval UI before enriched data goes live. The AI taxonomy classifier then assigns Primary → Type → Subtype with a confidence score, surfacing low-confidence items in the review queue.
A polished back-office at productsearch.mypetjet.com, fully behind NextAuth login, giving merchandisers and editors complete control without engineering involvement.
Stats cards, manufacturer bar chart, stock donut, category pie, quick actions. Advanced manufacturer and product search.
Triggers Shopify sync and per-brand scrape jobs; shows job-status dashboard. Tier status, review queues for products and brand intelligence.
Live tuning of ChatbotConfig — greeting, LLM model, temperature, max tokens, behaviour/response/keyword instructions — with a built-in test console.
Manage Primary Categories, Product Types, Subtypes, Attribute Groups and Values. Install and configure third-party integrations (Gorgias MCP today).
The centrepiece of the platform. Luna handles product discovery, order status, purchase initiation and support hand-off — delivered by a single /api/chat endpoint consumed across four channels: website widget (SSE streaming), Gorgias help-desk (plain text), voice/SMS (tool-json) and any external LLM orchestrator.
The pipeline is short-circuiting — cheap stages run first so non-product traffic (greetings, order lookups) never pays for an LLM call. Each stage is deterministic; the LLM is only invoked when genuinely needed for generation or formatting.
Many callers (Gorgias tickets, SMS, voice) are stateless. The platform maintains an in-process session store keyed by session_id / ticket_id containing:
Before any LLM call, messages are classified deterministically:
Complex categories (clippers, blades, combs, shears) use a data-driven decision tree. The engine — not the LLM — owns the conversation structure. The LLM only phrases questions and formats the final answer.
Each node poses one question with typed options (label + regex patterns). Conditional nodes skip questions when answers can be inferred from prior context. Attribute-group-backed nodes pull options from the managed taxonomy at runtime — add a new value in the admin UI and the chatbot picks it up immediately.
Curated compatibility tables for 5-in-1 clippers and mini trimmers, including purpose tags (haircuts vs sanitary-only), enabling cross-sell scenarios like "which blades fit an Andis Pulse ZR II?"
If a strict search returns fewer than a minimum number of products, the engine reports which filters it relaxed (e.g. "dropped brand", "dropped material") so the bot can explain the widened search rather than silently returning nothing.
Luna can only recommend real, in-stock, verified-URL products. Every generated URL returned HTTP 200 in smoke tests.
searchProductsWithPreferences() queries PostgreSQL using taxonomy foreign-key filters, attribute-value joins and text matching. Results ranked by brand priority, stock and relevance.
Every product's buyUrl is reconstructed from the Shopify handle; buildSafeProductUrl() verifies HTTP 200 before surfacing. validateProductUrls() checks every product in a response batch.
The LLM prompt carries an ABSOLUTE RULE: only mention products in the MATCHING PRODUCTS section; copy name, price and buyUrl character-for-character. Rules appear at the top of the system prompt AND above the product list.
Zero results inject a "NO MATCHING PRODUCTS FOUND" marker. During clarifying questions, a "NO PRODUCT DATA PROVIDED" marker forbids naming any specific product or price.
stripFabricatedProducts() and validateNoHallucinatedProducts() cross-check every referenced product against the per-response verified catalog map; anything not on the allow-list is removed.
Order-status responses are fast, cheap and impossible to hallucinate — the LLM is used purely for tone, with a hard template fallback guaranteeing a correct answer even if the LLM call fails.
When a customer needs a human — damaged item, return, complex complaint — Luna performs a structured hand-off rather than dumping the conversation on the support team.
detect → confirm → collect_email → collect_order → collect_phone → pre_handoff → execute → done
At pre_handoff, Luna shows a summary and asks "Is there anything else you'd like me to include?" At execute, the hand-off fires via two Gorgias MCP tools in exact order:
Once complete, Luna goes silent on that ticket — no further AI replies generated.
Luna can drive a customer through to a paid order without leaving the chat. Because the stakes are high (real money, real orders), the flow is explicit and three-gated.
Customer picks a product by name, number or card click. Platform locks it into session as selectedProduct — capturing variantId, title, SKU, price and URL. Subsequent turns reference this locked record.
Luna asks for the customer's email, validates format, stores a pendingCheckout in session state, and shows an order summary (item, variant, quantity, price, URL).
Customer must explicitly type "Confirmed." A checkoutAttempts counter prevents retry loops. On confirmation, the platform creates a Shopify draft order via Admin API and emails a draft invoice to the customer.
Admin v2 extends the original operator dashboard into a full operational hub covering CRM, outbound campaigns and platform-level AI agent management. It is workflow-oriented — non-engineers can run end-to-end programs without touching code.
Drag-and-drop file upload; auto-map headers from common names (e.g. "firstname", "email"); preview valid vs problematic rows before commit; optional auto-creation of companies from the company_name column.
Full company records (name, website, industry, revenue, address, tags, custom fields). Pipeline-style deals. Task board for operational follow-ups. Contact groups as first-class objects reusable in campaigns.
Name, type and description. Types: Voice (AI Assistant), SMS, WhatsApp, Multi-Channel.
Build recipient list from: file upload, CRM contacts, Google Sheets, Airtable, contact groups, or demo seed data — with preview and validation before commit.
Channel-specific configuration: Telnyx Call Control Application, greeting text, concurrency, assistant selection, caller ID, calling window (e.g. 09:00–20:00), timezone, retry settings.
Review the plan and move from preparation into executable state. Statuses: draft, scheduled, running, paused, completed, cancelled (soft-delete preserves history).
Campaign analytics include per-recipient status (pending, scheduled, in_progress, completed, failed, no_answer, voicemail), timezone distribution, and CSV export up to 10,000 rows. Optional product-purchase webhook automation enables confirmed purchases to notify an external checkout/OMS pipeline.
Full AssistantEditor: pick models dynamically, attach MCP servers and tools, manage integration secrets, assign phone numbers, and QA via AssistantActions console (outbound call, webcall, test chat, clone, embed preview).
Per-agent: display name, tier (simple/advanced/third_party), provider (Telnyx / Advanced RAG / External LLM), status, external ref, public embed key, relationship label, usage/cost summaries.
Tiered chat: toggle L1 → L2 escalation, choose a Level 2 agent, and optionally configure a proxy brain delegate for advanced routing scenarios.
file_upload, url, sitemap, ticket, email_vault, external_bucket, manual_qa, call_transcript
Telnyx native · Advanced in-app RAG · External LLM / super-assistant API
POST /api/agents/{agentId}/chat with conversation, channel, metadata and handoff hints
System of record for people, accounts, tasks; import plus groups; activity history; optional GoHighLevel sync.
Audiences from CRM/files/sheets/Airtable; pacing and calling windows; voice/SMS/WhatsApp; per-recipient status; CSV export; optional purchase webhook flow.
Telnyx assistants with rich editor and QA console; platform agents for routing, embeds, tiered escalation and usage/cost visibility; optional RAG and external LLM backends.
OAuth install with auto-refresh; encrypted token storage; REST catalog endpoints for scraper; direct order lookups for order-status flow; draft-order creation for purchase flow. Shopify is the authoritative source for post-purchase data (replacing the earlier ShipStation approach).
Generic MCP integration framework with configurable server URL, transport, encrypted headers, per-call timeout, connection tester and bulk tool sync. Gorgias is the first integration wired up; the framework is extensible to any MCP-compatible service without code changes.
Full Telnyx voice-integration guide shipped with the platform. The format=tool-json response already includes voice_text (TTS-sanitised), mode, context, products (top-product URL for SMS follow-up) and meta.latencyMs.
Every tenant-aware table carries tenantId; every API call resolves the tenant via headers or body. Onboarding a second store requires only seeding a new tenant row and its ChatbotConfig — no schema changes.
Hosted at productsearch.mypetjet.com with automatic build/deploy pipeline. Prisma handles forward-compatible migrations — production data is never discarded.
Queries like "Professional Clippers" and "#4F A5 Blades" returned only real DB records (e.g. CeramicEdge #5FC by Andis, UltraEdge #5FC by Andis) — verified against screenshots in the client artefact pack.
Every surfaced buyUrl independently fetched and returned HTTP 200 (e.g. petstore.direct/products/ceramicedge-5fc-finish-cut-grooming-blade-by-andis).
Clarification turns include an explicit "no product data provided" marker; the assistant asks follow-up questions without naming any specific products or prices.
Zero-result searches inject a "no matching products found" marker so the bot replies honestly instead of inventing filler items.
Customer must explicitly type "Confirmed" before a draft order is created; session state locks the chosen product and email so an ambiguous reply cannot trigger an unintended order.
Direct Shopify calls with a template fallback guarantee a correct, deterministic answer even if the LLM formatter is unavailable.
Every component delivered across the main engagement, with business impact. Companion brand & design deliverables (Revival and Exodus) are covered in Part 2; commercial terms in Part 3.
Transaction-capable sales engine: dynamic draft-order creation, AI-driven product selection, automated post-chat email, OAuth auto-refresh.
Hybrid AI-human support: auto ticket creation, call-escalation logic, context survival across voice, chat and support infrastructure.
Daily monitoring, rapid iteration pipeline, English production agent plus Spanish and Portuguese agents in testing.
Call-history tracking, AI testing interface, analytics dashboard and debugging-visibility tools for internal review.
Preliminary ShipStation work absorbed into Shopify-native order lookup; "Where is my order?" handled via Shopify Admin API with Gorgias escalation triggers.
Semantic search, ranking/scoring algorithms, featured-product prioritisation, AI weighting logic — the core engine behind AI sales performance.
Chat widget deployed in Shopify, integrated with product engine and Gorgias; real-time recommendations and human escalation from chat.
Full CRM, four-step campaign wizard, multi-agent orchestration, tiered routing, knowledge sources and authenticated chat API.
The platform is architected to extend, not rewrite, when PSD's needs evolve.
Add an Attribute Group plus Values in the admin UI — the guided flow picks them up on the next turn with no code change.
Add a Primary Category / Product Type / Subtype row; re-run the AI classifier to backfill products automatically.
Every table is tenant-scoped; onboarding is a config-only change — seed a new tenant row and ChatbotConfig.
Reuse format=tool-json for any new channel. Any MCP-compatible service can be added through Settings → Integrations without code changes.
Model name, temperature and max-tokens are part of ChatbotConfig and editable in the Chatbot Playground — no deploy required to swap models.
Spin up another campaign through the four-step wizard, reusing existing CRM contacts, assistants and integration secrets.
/psd-chatbot-intelligence-guide.md (and PDF) — canonical guide for consuming GET /api/export/chatbot-knowledge: product schema, voice/tone guidelines, recommendation logic, brand-intelligence usage, groomer endorsements, coat-type intelligence, sales-aware responses, response templates and API reference.
/docs/telnyx-voice-integration.md — step-by-step guide for wiring the voice channel, including webhook URLs, tenant query params and audio codec preferences.
/prisma/TAXONOMY.md — formal description of the managed taxonomy, why it exists, migration path and file layout.
/psd-products-sample-export.json — sample of the export payload so integrators can build against a known shape before connecting to the live API.
Part 1 SummaryPetStore.Direct now has a single, authoritative platform that mirrors and enriches the entire Shopify catalog; exposes that intelligence through a managed taxonomy and a polished admin dashboard; drives a production-grade conversational assistant that cannot recommend a product that doesn't exist; handles orders, purchases and support hand-off end-to-end; and provides a full CRM, Campaigns and AI Agent Manager layer for scalable outbound operations — all ready for voice, SMS and additional tenants without further engineering.
Revival Animal Health design package & Exodus custom Shopify theme.
A complete marketing-site design package produced for Revival's in-house development team to implement. The deliverable is the design specification itself — page structures, route variants, brand system, interactive patterns, content inventory and asset references — along with client revisions applied during review.
A working theme implementation built on Shopify's Dawn reference architecture, with custom sections, snippets, CSS, JavaScript and JSON templates — delivered ready for handoff or further implementation feedback.
A comprehensive design package for Revival Animal Health's Shelter/Rescue Program marketing experience — full page designs, brand system and interaction specification handed to Revival's in-house programmers, including all revisions from the client review cycle.
Typography: Poppins and Source Sans 3 (Google Fonts) with a responsive utility-first layout approach recommended to the implementation team.
Sticky nav, category strip, blue info banner, full-bleed hero carousel (3 slides with prev/next and dot indicators), tabbed About section (4 topics, image alternating left/right), Who's Eligible grid, Program Benefits, 4-step Application Process, Expert Help band, newsletter footer.
Same overall sections and messaging as the primary landing, with the hero redesigned as a two-column block: fixed headline "Every heart - every animal" with bullets on the left; image carousel on the right. Intended as layout option B for review.
Top promo bar, "Shelter/Rescue Log In" nav, static two-column hero, 5-tab About section (adding a narrative-only "Together" tab), FAQ accordion (3 questions), and program benefits copy referencing 4,000+ organisations.
The Exodus theme is built on Shopify's Dawn reference architecture with custom sections, snippets, CSS, JavaScript and JSON templates — covering header, collections, product cards, product detail page, cart and homepage/content templates.
Full-width bar with logo, primary nav, account/cart icons and mobile drawer. Desktop dropdowns use accessible <details>/<summary> structure with optional "View all" row and nested grandchild panels. Mobile renders the same tree as nested expandable sections. A small capture-phase click handler syncs aria-expanded on triggers.
Replaces the default list-collections section with a responsive grid (2–4 columns desktop, 1 column mobile). Collection cards are gradient tiles (blue or green preset) with the collection title in white — no collection image needed. Theme editor controls: heading, gradient style, sort order, column count, padding. Paginated at 30 per page.
The shared wrapper class .exodus-product-cards applies consistent grid spacing, card chrome, typography, price, badge, hover and rating styles anywhere it is present — across collection pages, featured collections, search results and related products.
Light gray (#F5F5F5) media area, 10px rounded corners, contain-fit product images with padding. Title: DM Sans semibold ~22px. Price: larger semibold treatment. Optional subtitle from custom.subtitle metafield.
SVG full, half (gradient split) and empty stars; accent colour #EF8E06. Outputs numeric score (e.g. 4.5/5) and review count. Half-star threshold uses a 0.25 remainder rule. Data sources: standard reviews metafield → custom.rating / custom.review_count → placeholder "No reviews yet" (5 gray stars) to keep card heights consistent.
Rating (when enabled) → Price → Optional subtitle metafield → Vendor (when enabled) — matching a "score → offer → detail → brand" reading order.
New subtitle block type outputs product.metafields.custom.subtitle with theme-editor help text. Block order updated: title → price → subtitle → vendor → variant picker → quantity → buy buttons. Subtitle styling applies to both legacy and new CSS classes for consistent typography.
Platform overview, delivered work, companion brand & platform deliverables, and commercial & payment summary.