Sandbox: fictional products, real email enquiries. Nothing is for sale.

AI Product Enquiry Assistant

Chat with Dozie, an AI product assistant I built to answer questions in real time, enforce strict response boundaries, and handle restock alerts automatically.

Live chatbot — ask Dozie anything
Daily restock checks configured
Restock notifications via email

Catalogue

Fictional product range

Browse the six sandbox products. Click Ask Dozie about this product to open the chat with suggested questions for that product.

TrailPack 20L
TP-20Daypack

TrailPack 20L

A compact 20-litre daypack for commuting and short hikes.

Sandbox: In stock
GlowDesk LED Lamp
TL-01Desk lighting

GlowDesk LED Lamp

An adjustable LED desk lamp with four brightness levels and USB-C power.

Sandbox: In stock
FlowBottle 750 ml
WB-75Drinkware

FlowBottle 750 ml

A double-wall stainless-steel bottle intended for hot or cold drinks.

Sandbox: Low stock
CampMug Enamel 350 ml
CM-01Drinkware

CampMug Enamel 350 ml

An enamel-coated steel mug for home or campsite use.

Sandbox: Out of stock
RainCover 10–25L
RC-10Pack accessory

RainCover 10–25L

A rain cover for small and medium daypacks.

Sandbox: In stock
HikeCap Soft Brim
HC-35Headwear

HikeCap Soft Brim

A lightweight, adjustable cap for everyday outdoor use.

Sandbox: In stock

Workflow

How it works

Dozie runs as a live chatbot on this page. The steps below show how each message is handled — from session isolation and rate-limiting to agentic tool use and automated restock alerts.

01

Chat opened

Dozie initialises with a session cookie. Conversation history is loaded from Redis, maintaining context across messages within the session.

02

Rate limit checked

Each session is capped at 30 messages per hour via Redis. Requests beyond the limit are rejected before reaching the model.

03

Context assembled

The full product catalogue, a version-controlled behaviour policy, today's date, and live capability status are injected into every request as the system prompt.

04

Policy enforced

The policy file defines Dozie's tone, scope, approved disclosure language, escalation triggers, and what must never be shared with visitors.

05

Agentic loop runs

GPT-4o-mini processes the message and may call tools — log_enquiry, signal_restock_consent, submit_handover — before composing a reply.

06

Answer grounded

All product replies are drawn strictly from the approved catalogue. Dozie does not speculate, invent specifications, or extrapolate beyond listed data.

07

Enquiry logged

Each conversation turn is logged to Redis with product SKU, category, confidence level, and action taken, for observability.

08

Restock consent

When a visitor explicitly agrees to a restock alert, a one-time consent token is recorded server-side and an email form is shown. The address never passes through the model.

09

Subscription saved

The restock subscription is stored in Redis with a cancel token. A cancellation link in every notification email lets the visitor opt out at any time.

10

Daily stock check

A scheduled worker compares current inventory against pending subscriptions, detecting transitions from out-of-stock to in-stock.

11

Notification sent

Resend delivers a restock email with a one-click cancellation link. The subscription is marked Sent to prevent duplicate alerts.

12

Escalation queued

Questions outside Dozie's scope — warranty, pricing, returns, legal — are submitted to a human review queue in Redis rather than answered by the model.

The restock worker runs daily on a Vercel Cron job. It detects stock transitions and triggers Resend to deliver notifications — it does not send emails itself. Subscriptions are marked Sent only after the provider confirms acceptance, so failures are retried on the next run rather than silently dropped.

Case study

Building the assistant

Problem

Visitors need immediate, accurate answers to product questions without waiting for a human reply. Responses must stay within approved information, escalate when needed, and handle restock follow-ups automatically.

My contribution

I designed and built the chatbot end to end: the agentic loop, the behaviour policy, session and rate-limit infrastructure, restock consent flow, and the daily worker that detects stock changes and sends notifications automatically.

Technology

GPT-4o-miniUpstash RedisResendNext.js 16Vercel

Design decisions

  • 1Approved catalogue data grounds every answer. Dozie does not speculate beyond listed specifications.
  • 2Missing or conflicting stock information is surfaced to the visitor, not silently resolved.
  • 3The behaviour policy is version-controlled and loaded server-side — it is never sent to the browser.
  • 4Restock alerts require explicit consent. The email address is collected via a separate server-side form, never through the model.
  • 5Session isolation is enforced via httpOnly cookies and per-session Redis keys. History expires after 24 hours.
  • 6Out-of-scope questions — warranty, pricing, legal, returns — are queued for human review rather than answered.
  • 7Tool calls are validated server-side on every request. The model cannot invoke actions it was not granted.

Validation

The following were tested manually and observed to behave as expected:

  • Product questions answered strictly from approved catalogue data
  • Out-of-scope questions escalated rather than invented or guessed
  • Restock consent captured server-side before the email form is shown
  • Duplicate restock subscriptions rejected per session and SKU
  • Stock transition detected and notification sent automatically
  • Subscription marked Sent after provider confirmation
  • Subsequent daily check skipping already-sent subscriptions
  • Session history maintained across multiple messages in one session
  • Rate limiting enforced at 30 messages per session per hour

Limitations

  • ·The catalogue and inventory are entirely fictional. Nothing is for sale.
  • ·Restock email sending requires Resend credentials. Without them, Dozie correctly discloses this rather than silently failing.
  • ·The human review queue stores records in Redis. No authenticated reviewer interface exists yet.
  • ·Session history is stored in Redis; the chat does not persist across devices or browsers.

Participation

How your information is used

Messages you send in the chat are processed by GPT-4o-mini and stored in a private Redis session that expires after 24 hours. If you opt in to a restock alert, your email address is stored separately and used only to send that notification. Please do not send sensitive personal information.

This is a publicly disclosed demo. All products and inventory are fictional. Participation is voluntary.