The Product

What a Production Support Chatbot Actually Needs

⏱ 12 min

Course 10 built a knowledge base that answers questions correctly. Course 11 built a widget that lets an anonymous visitor ask them. Put those two courses’ code side by side on a real client site and you’d have a working demo, not a product you’d stake a support team’s day on. This lesson lays out the gap between the two, plainly, and turns that gap into the roadmap the rest of this course follows.

What you'll learn in this lesson
The five gaps between a demo and a product
What Courses 10 and 11 leave out that a real deployment can't.
Why "trained on your content" means more than blog posts
Products, custom post types, anything a visitor might actually ask about.
Why citations have to be real, checkable URLs
Not just a source title a visitor can't click through to verify.
Why escalation isn't the same as takeover
Course 11's handoff link versus a human actually joining a live conversation.
The course roadmap
Which lesson builds which piece, in the order a real build would tackle them.
Prerequisites

Course 10, Build a RAG Knowledge Base in WordPress, and Course 11, Build Front-End AI Chat & Conversational Experiences for WordPress Visitors. This course builds directly on both and does not re-teach either one’s fundamentals.

Step 1: what Course 10 and Course 11 actually gave you

Course 10 indexed WordPress posts: chunk the content, embed each chunk with AiClient::input()->generateEmbedding(), store the vectors in a custom table, and search them with cosine similarity in plain PHP. Course 11 built the surface: a chat widget, a register_rest_route() endpoint whose PHP callback is the only code holding an API key, and a transient-keyed session so an anonymous visitor gets conversational memory without a WordPress account. Wired together, that’s the retrieve-then-generate loop from Course 10’s grounding lesson, running behind Course 11’s widget. It works.

It also stops short of nearly everything a real support deployment needs on day one.

Step 2: the five real gaps

Demo vs. product, five concrete gaps
1. Content scope
Course 10 indexed posts. A real support bot needs to answer questions about products, pricing, and whatever custom content types the site actually runs on.
2. Citation trust
Course 10 returned source post IDs. A production answer needs a real, clickable permalink, and a way to catch the model inventing a citation that doesn't match anything actually retrieved.
3. Human takeover, not just handoff
Course 11's escalation lesson links out to a contact form. A support team also needs to step into the live conversation itself, mid-session, without the visitor starting over.
4. Reach
Real sites have visitors who don't type in English and some who'd rather speak than type. Neither is a dedicated WordPress AI feature, both are solvable honestly.
5. Business value and oversight
A chatbot that never captures a lead and gives the team no visibility into what it's actually being asked is a cost center, not a product.

Every one of those gaps is a real, common requirement from an actual support-chatbot brief, not a hypothetical. This course closes each one, in order.

Step 3: the roadmap

Where each lesson lands
Lesson 2, Indexing
wc_get_products() and WP_Query pull WooCommerce products and custom post types into Course 10's chunk-and-embed pipeline.
Lesson 3, Grounded Answers
Retrieved chunks carry their real permalink into the prompt, and the model's citations get validated against what was actually retrieved.
Lesson 4, Human Handover
A Heartbeat-API-backed admin view where a logged-in agent can watch a live session and flip control from AI to human.
Lesson 5 and 6, Reach
Honest multilingual support through wp_ai_client_prompt() itself, and browser-side voice input with the Web Speech API.
Lesson 7 and 8, Growth Features
Recognizing purchase intent mid-conversation to offer lead capture, and a wp-admin analytics dashboard over the stored conversation data.
Lesson 9, Data & Wrap-up
Why keeping all of it in your own database is a real data-residency advantage, tied to Course 16's governance course.
This course builds features, not a new architecture

Every lesson from here on reuses Course 10’s table and Course 11’s REST endpoint and session pattern as the load-bearing infrastructure. Nothing in this course replaces either one, it extends both. If a code sample references my_plugin_index_post() or my_plugin_get_session_transcript() without redefining it, that’s the function Course 10 or Course 11 already built.

Step 4: what “production” means for this specific course

“Production” here means three concrete things, and they recur through every lesson: answers are grounded in content a site owner actually controls, not invented; a human can always regain control of a conversation without the visitor noticing a seam; and no customer’s question, and no piece of indexed content, ever has to leave the site’s own database to make any of this work. Keep those three in mind as a checklist while reading the rest of this course, every lesson exists to make one of them true in a specific, concrete way.

Test it: confirm your Course 10 and Course 11 code still runs

Before building anything new, confirm the foundation is actually in place:

wp-env run cli wp eval '
global $wpdb;
$count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}ai_chunk_embeddings" );
echo "Indexed chunks: {$count}\n";
'
curl -X POST "https://your-site.test/wp-json/my-plugin/v1/chat" \
  -H "Content-Type: application/json" \
  -d '{"message":"hello","session_id":"test"}'

If the first command reports a real chunk count and the second returns a JSON reply rather than a fatal error, Course 10 and Course 11’s foundations are in place and this course’s lessons will layer directly on top of them.

Recap

A working RAG pipeline and a working chat widget are not, on their own, a shippable support chatbot. The gap is content scope beyond blog posts, verifiable rather than invented citations, real-time human takeover instead of a one-way handoff link, honest reach into other languages and voice input, and features that make the chatbot valuable to the business running it, lead capture and visibility into what it’s actually being asked. The next eight lessons close each of those gaps in turn, building directly on Course 10 and Course 11’s code rather than replacing it.

Resources & further reading

Indexing WooCommerce Products and Custom Post Types for Retrieval →