A complete voice-driven order lifecycle system — inbound call → natural conversation → semantic product search → order booking, lookup, and modification → outbound confirmation calls — with zero staff intervention at any stage.


The Problem

flowerbouquet.pk is a Shopify-based flower and gift store operating an 800+ product catalog. Every customer interaction—product inquiries, order placements, status checks, and modifications—required a staff member to answer the phone, manually search the website while the customer waited, record order details by hand, and manage changes through the same error-prone process.

The operational ceiling was hard and immediate: call volume couldn't grow without headcount growing with it. Staff couldn't hold 800+ products in memory, so every call meant a live website search while the customer waited on the line. Hand-recorded orders introduced transcription errors. A customer who lost their order number had no way to check on it without staff manually searching records. Calls outside business hours went unanswered entirely. There was no path to scale this model — only a replacement of it.


The Solution

A working voice AI system, built and tested as a demo on a real store’s catalog built from five interconnected components, operating as a single pipeline from phone call to database record and back out again.

Voice Layer (Vapi). Handles all telephony — speech-to-text, LLM orchestration, text-to-speech. The agent converses in Roman Urdu with English technical terms preserved (product names, order IDs) for natural, locally appropriate interaction. A precision-engineered system prompt enforces strict data-collection discipline: the agent never calls a backend tool with placeholder or incomplete data, always re-asks for unclear fields, and holds conversational continuity across a full booking, lookup, or update flow.

Orchestration Layer (n8n + MCP). n8n is the backend automation layer. MCP (Model Context Protocol) exposes n8n workflows as callable tools the voice agent can invoke mid-conversation — when the agent decides it needs to search a product, book an order, or check a status, it calls an MCP tool, which triggers the matching n8n workflow, executes the operation, and returns structured data the agent turns into a spoken response.

Data Layer (Supabase + pgvector, PostgreSQL). Product catalog data lives in Supabase with vector embeddings for semantic search. Order records were migrated from the original Google Sheets setup to PostgreSQL, unifying the entire system — catalog and orders alike — under a single relational data layer. This removes Sheets' concurrency limitations and enables direct relational queries (order history by phone number, status filtering) as call volume scales.

The Six Core Workflows

1 — Product Catalog Scraping Pipeline (Scheduled) Crawls the store's sitemap, extracts every product URL, scrapes each page for title, price, description, and image, generates 3072-dimensional vector embeddings via Google Gemini (gemini-embedding-001), and upserts the full catalog into Supabase. The 800+ product catalog stays current automatically — a price change or new product propagates on the next scheduled run with no manual catalog work.

2 — Semantic Product Search (MCP-exposed) When a customer asks about a product, the agent calls this tool with their spoken query. The workflow runs a true vector similarity search against the stored Gemini embeddings and returns only semantically relevant matches — not the full catalog. This means a customer asking about "something romantic for an anniversary" gets a filtered, relevant answer instead of the agent silently working through 800 products, which materially improves both response speed and conversational accuracy at this catalog size.

3 — Create Order (MCP-exposed) Guides the customer through a full booking conversation — name, phone, city, address, product — and only writes the order once every required field is confirmed, enforced by the system prompt. Computes the next sequential Order ID and appends a complete record. A full order gets booked in a single call with zero manual entry.

4 — Order Lookup by Phone Number (MCP-exposed) A customer calling back to ask "what's happening with my order" no longer needs to remember or find their Order ID. The agent identifies the caller's phone number and retrieves their order directly, matched against the stored records. This removes the single most common friction point in post-purchase calls — the customer being asked for information they don't have on hand.

5 — Update Order (MCP-exposed) Handles post-booking changes by Order ID or phone-matched lookup — address changes, phone updates, product swaps, cancellations. Built with field-level conditional fallback: only the field the customer explicitly mentions gets overwritten; every other field keeps its existing value. A customer changing their delivery address can never accidentally wipe their phone number or product selection through a partial update.

6 — Outbound Order Confirmation Call A separate, dedicated workflow that places an outbound call to the customer confirming their order — name, order ID, and product — converting the system from purely reactive (answering calls) to proactive (initiating them). This closes the loop on the customer communication lifecycle: a customer who books by voice can also be called back with automatic confirmation, without staff placing that call manually.

Current status: the confirmation-call logic, Vapi integration, and conversational flow are fully built and tested — verified through a working SIP-based test call. The one remaining requirement is a telephony provider with PSTN termination (a purchased number from Twilio or a paid SIP provider) so the system can reach real customer phone numbers rather than SIP-to-SIP test endpoints. This is an infrastructure/account-access item, not an engineering gap — the workflow is: outbound calls are tested over SIP. Calling real numbers needs a paid telephony provider..