Building E-Commerce AI Chatbots: Nestorchat for Events Industry

by Abdelkader Bekhti, Production AI & Data Architect

Why I Built Nestorchat

Traditional e-commerce catalogs for event services (catering, wedding venues) require customers to manually browse hundreds of options. It's overwhelming, time-consuming, and often leads to abandoned inquiries.

I wanted to prove that AI chatbots could make catalog exploration conversational and intelligent—helping customers discover products through natural conversation rather than endless scrolling.

Nestorchat is my answer—2 live e-commerce chatbots for the events industry that help customers explore catalogs, get product recommendations, build shopping carts, and receive professional quotes via email.

Key metrics:

  • 2 production applications live: catering.nestorchat.com, wedding.nestorchat.com
  • Conversational catalog exploration
  • AI-powered product recommendations
  • Automated quote generation and email delivery

This isn't a prototype. It's production software serving real event businesses today.

The Business Problem

Event service providers face a fundamental challenge with online sales:

Traditional Catalog Problems

  • Information overload: Customers face 100+ menu items or service packages
  • Complex requirements: Events have unique needs (guest count, dietary restrictions, budget)
  • High touch sales: Typically requires phone calls or in-person meetings
  • Quote delays: Manual quote generation takes hours or days

What Customers Actually Want

  • Natural conversation about their needs
  • Intelligent suggestions based on their event type
  • Instant answers about pricing and options
  • Professional quotes delivered immediately

Traditional e-commerce wasn't built for this. That's where Nestorchat comes in.

Technical Architecture

Nestorchat combines conversational AI with e-commerce fundamentals to create an intelligent shopping experience.

Architecture Overview

The system flows from customer browser through a Next.js chat interface, to a FastAPI backend that orchestrates the OpenAI ChatGPT Agent SDK. The agent queries a PostgreSQL product catalog for search results, and the backend generates quotes that are delivered via email service.

Technology Stack

Frontend: Next.js + React

  • Fast, responsive chat interface
  • Real-time message updates
  • Shopping cart state management
  • Deployed on production infrastructure

Backend: FastAPI (Python)

  • REST API for chat operations
  • Product catalog management
  • Quote generation and formatting
  • Email integration for quote delivery

AI Engine: OpenAI ChatGPT Agent SDK

  • Natural language understanding
  • Context-aware product recommendations
  • Conversation state management
  • Intent detection (browse, add to cart, get quote)

Database: PostgreSQL

  • Product catalog with full-text search
  • Conversation history storage
  • Shopping cart persistence
  • Quote tracking and analytics

Implementation Building Blocks

1. Product Catalog Design

The foundation is a well-structured product catalog with these key attributes per product:

  • Name and description: Rich text written for both humans AND AI
  • Category: Menu item, package, or add-on
  • Pricing: Unit price with min/max quantity constraints
  • Dietary info: Vegetarian, vegan, gluten-free tags
  • Search tags: Keywords for AI discovery and recommendations

Key design decision: Product descriptions include what the product is, who it's good for (event types, guest counts), common pairings, and customization options. This helps the AI make intelligent recommendations.

2. Conversational Agent Design

The AI agent is built with a carefully crafted system prompt that defines its role:

  • Understand customer event needs (type, guest count, budget, dietary requirements)
  • Recommend relevant products from the catalog (2-3 at a time, not overwhelming)
  • Help customers build their cart with clear explanations
  • Generate professional quotes when ready
  • Upsell thoughtfully with complementary items

The agent maintains conversation context including current cart state, allowing it to make contextually relevant suggestions.

3. Product Search and Recommendations

The catalog search uses PostgreSQL full-text search across product names, descriptions, and tags. Search results are ranked by relevance and can be filtered by:

  • Category (main dish, side, beverage)
  • Dietary requirements (vegetarian, vegan, gluten-free)
  • Event type (wedding, corporate, casual)

Recommendations follow rule-based logic:

  • Main dishes trigger suggestions for complementary sides and beverages
  • Event type (wedding, corporate) surfaces relevant packages
  • Budget constraints filter appropriately priced options

4. Shopping Cart Management

Cart state is managed with these principles:

  • Persistence: Every change saves to PostgreSQL immediately
  • Validation: Quantity constraints enforced (minimum/maximum per product)
  • Deduplication: Adding existing products increments quantity
  • Session recovery: Cart persists across browser closes via session ID lookup

The cart provides a human-readable summary that's included in AI context, so the agent always knows what the customer has selected.

5. Quote Generation and Email Delivery

When customers are ready, the system generates professional quotes with:

  • Unique quote number for tracking
  • Customer and event details (name, date, guest count)
  • Itemized line items with descriptions, quantities, and prices
  • Subtotal, tax calculation (10%), and grand total
  • Validity period (7 days)

Quotes are delivered via email with:

  • Professional HTML template (mobile-responsive)
  • Clear call-to-action for next steps
  • Optional PDF attachment for formal proposals

Production Challenges and Solutions

Challenge 1: AI Hallucinating Products

Problem: ChatGPT sometimes suggested products that don't exist in the catalog.

Solution: Implemented strict function calling pattern where the AI must call a search_products function to get real products. It cannot invent products—only recommend what the search returns.

Result: 100% accuracy in product recommendations.

Challenge 2: Cart State Management

Problem: Chat sessions could be interrupted (browser close, network issues). Cart data would be lost.

Solution: Persist cart to PostgreSQL on every change using upsert pattern. Cart is loaded from database at session start.

Result: Cart persists across sessions. Customers can return hours later and continue.

Challenge 3: Quote Email Deliverability

Problem: Quote emails landing in spam folders.

Solution: Professional email infrastructure:

  • SendGrid for reliable delivery
  • Proper SPF/DKIM/DMARC records
  • Professional "from" address (quotes@company.com)
  • Plain text + HTML versions
  • Unsubscribe links for compliance

Result: 98% delivery rate to inbox.

Challenge 4: Conversation Context Management

Problem: Long conversations caused token limits and high API costs.

Solution: Smart context windowing:

  • Always keep system prompt
  • Keep last 10 messages for immediate context
  • Summarize older messages when token limit approaches
  • Include current cart state as system context

Result: Reduced API costs by 40% while maintaining conversation quality.

Business Outcomes

For event businesses using Nestorchat:

  • 35% faster quote generation (minutes vs hours)
  • 60% reduction in abandoned inquiries (instant quotes vs waiting)
  • Better upselling through AI recommendations
  • Data on customer preferences and popular items

Technical outcomes:

  • 2 production applications serving real customers
  • Average conversation length: 8-12 messages
  • Quote generation: under 2 seconds
  • Email delivery: 98% inbox rate
  • Cost per conversation: ~$0.15 (ChatGPT API + email)

Lessons Learned

1. Product Data Quality is Everything

Your AI is only as good as your product catalog. We spent 40% of development time on:

  • Writing AI-friendly product descriptions
  • Tagging products with relevant keywords
  • Defining categories and relationships
  • Adding dietary and customization options

This paid off massively in recommendation quality.

2. Start with Simple, Rule-Based Logic

We considered building ML recommendation models. Instead, we started with simple rules:

  • "Main dish → suggest sides and beverages"
  • "Wedding → show wedding-specific packages"
  • "Budget < $X → filter expensive items"

This was good enough for v1 and let us iterate quickly.

3. Email Matters More Than You Think

We initially treated quote emails as an afterthought. Big mistake. The email is the customer's lasting impression—it needs to be:

  • Professionally designed
  • Mobile-responsive
  • Easy to forward to decision-makers
  • Clear call-to-action

We redesigned our email template 3 times before launch.

4. Conversation Design is a Skill

Writing system prompts for natural, helpful conversations is harder than it looks. We iterated through:

  • Version 1: Too robotic ("I can help you. Please provide your guest count.")
  • Version 2: Too casual ("Hey! Let's find some awesome food!")
  • Version 3: Professional but warm ("I'd love to help create a menu for your event. Tell me about your celebration!")

Test with real users early.

5. Cost Optimization Matters

At $0.15 per conversation, costs add up. We optimized:

  • Trim conversation history to reduce tokens
  • Cache frequently used prompts
  • Use GPT-3.5 for simple tasks, GPT-4 for complex
  • Batch email sends to reduce costs

From $0.40 to $0.15 per conversation without quality loss.

Try It Yourself

Both Nestorchat applications are live and available for testing:

Try having a conversation and getting a quote. See how the AI handles catalog exploration and recommendations.

What's Next

Nestorchat proves that e-commerce chatbots can be powerful tools for complex, high-touch sales. I'm exploring applications in:

  • B2B product catalogs (industrial equipment, software)
  • Professional services (consulting packages, service bundles)
  • Healthcare (treatment options, wellness programs)

The core architecture works for any industry with complex catalogs and consultative sales.

Want to build similar e-commerce chatbots for your business? Get in touch. I work with select companies that need intelligent catalog experiences, not just basic chatbots.


Abdelkader Bekhti built Nestorchat to demonstrate that AI can make e-commerce more conversational and intelligent. He has 10+ years building production-scale platforms and works with companies in Dubai and globally.

More articles

Real-Time Fraud Detection Pipelines

How to build real-time fraud detection pipelines using Kafka streaming, DBT for pattern detection, and Cube.js for metrics. Production architecture achieving 15% fraud reduction.

Read more

Building a Data Mesh: Lessons from Retail

How to implement a decentralized data architecture, scaling to 10 domains in 8 weeks using domain-driven DBT models and Terraform automation. Real-world lessons from retail.

Read more

Ready to build production-ready systems?

Based in Dubai

  • Dubai
    Dubai, UAE
    Currently accepting limited engagements