Live in productionE-commerce · auto parts · Case study
An AI parts expert that checks the catalogue before it answers
We built Truck Gear Nation's sales and support assistant. It answers "will this fit my truck?" by querying the store's live fitment database, shows matching parts as product cards, and hands customers to the team in Slack, where replies reach the chat in real time. It drops into the WordPress store with one script tag.
Truck Gear NationUS online store for truck accessories · Live on truckgearnation.com
Fitment answers
Slack handoff
Safe in public
First commit to production
13 daysfrom the first commit to the first production conversation
6 AprProposal
29 AprFirst commit
12 MayFirst production chat
10 SepHandover
10AI tools, each querying the store's live data
~2,900fitment rows checked live, never from memory
173/173WordPress plugin tests passing at handover
~17 KBgzipped widget, added with one script tag
00Project overview
A parts store where every answer depends on the truck.
Truck Gear Nation sells tonneau covers, bed dividers, grilles, floor mats and more to US truck owners, from about 1,224 products on WordPress and WooCommerce. Codech audited the live store, designed and built an AI assistant that answers from the store's own data, launched it, fixed what customers reported, and handed it over to the client's next team.
Client
Truck Gear Nation (truckgearnation.com)
Industry
E-commerce: truck accessories, United States
Users
Store visitors, plus support staff answering in Slack
Proposal 6 Apr 2026 · first commit 29 Apr · first production conversation 12 May
Status
Live on the store; handed over 10 Sep 2026
The challenge
"Will this fit my truck?"
A tonneau cover fits one year range, one make and model, and often one bed length. The fitment data already sat in the store's database, but customers could only reach it through a picker form or a person. Support was manual, and when a customer was passed to a person they had to explain everything again.
Our proposal
Look it up live, then audit the plan
We proposed function calling instead of a static knowledge base: the AI queries the live fitment table for every answer. Before writing code we checked the proposal against the live store and corrected seven assumptions, then the client picked one of four widget designs.
The solution
TGN AI Chatbot
A brand-safe chat widget on every store page, run by Claude with 10 tools that query WordPress and WooCommerce, and a two-way handoff to the team's Slack. The store controls it from eight WordPress admin pages.
Fitment answers from the live database, never from memory
Matching parts as product cards with price and stock
Slack thread replies reach the customer's chat in real time
Bot checks, rate limits, cost caps and 30-day retention
Accurate answers, a human when needed, nothing to rebuild.
01
Fitment is exact
One wrong bed length means a part that doesn't fit and a return. Answers had to come from the store's own fitment data, not from a knowledge base that goes stale.
02
Handoffs lost the context
Passing a customer to a person meant repeating the truck, the part and the question. The team already worked in Slack and wanted to answer from there.
03
A public AI on a live store
It had to drop into the existing WordPress site, match the brand without the theme breaking it, and come with bot protection, cost limits and US privacy (CCPA) deletion.
02Fitment answers Live
"Will this fit my truck?" Answered from the catalogue.
Claude doesn't remember fitment. It calls tools that query the store's fitment table and WooCommerce through a WordPress plugin, so every answer matches the catalogue the moment it is asked.
Guided vehicle search
Year, make, model, bed. Then parts that fit.
The assistant asks for the truck using only the options that exist in the catalogue, then shows matching parts as product cards with photo, SKU, price and stock. The truck is written back to the store's own vehicle picker, so the site updates without a reload.
Narrows with the catalogue's real makes, models and bed lengths
Product cards replay when a conversation resumes
Fitment check
"Yes, it fits", checked against the database
On a product page the bot knows which product the customer is looking at. Asked about a truck, it runs an exact check against the store's fitment table and answers with the SKU and the bed length it matched.
Product specs
Spec questions answered from the full product data
Feature bullets, attributes, warranty and install notes all reach the AI, so "can I mount a bike rack, and does it need drilling?" gets a direct answer from the catalogue instead of "that isn't listed".
03Slack handoff Live
A person in Slack, and the customer never repeats themselves.
When a customer asks for a person, or the bot can't help, the conversation moves to the team's Slack with everything attached. Staff reply in a thread and the customer reads it in the chat, live.
Two-way Slack
Reply in a Slack thread. It lands in the chat.
The handoff posts a thread to the team's private channel with the customer, the truck, the page, an AI summary and the recent transcript. Replies in the thread reach the customer's chat in real time, and typing \end hands the customer back to the AI.
Real time over server-sent events
No pickup in 20 minutes: the customer is told to expect an email, and the AI resumes
Contact details first
Name and email before a person is pulled in
Anonymous customers leave a name and email (phone optional) before the handoff, so the team can always follow up. Logged-in customers skip the form.
Out of hours
After hours, a message instead of a dead end
Business hours are set in WordPress. Outside them, the bot offers a "Leave us a message" form, which files an inquiry in WordPress, emails the team and alerts a Slack channel.
04Safe in public Live
A public AI the store controls.
The team runs the bot from WordPress. Bot checks, rate limits and cost caps stop abuse, and customer data is kept for 30 days, then purged.
WordPress admin
The team edits the FAQ. The AI follows it.
Settings, business hours, FAQ, contact email, excluded pages, inquiries, chat history and privacy tools sit in the WordPress admin the team already uses. FAQ entries go straight into the AI's instructions.
8 admin pages inside WordPress
Full transcripts in Chat History
Abuse and cost controls
Five checks before every answer
Anonymous visitors pass a Cloudflare Turnstile check and get a signed session token. Every message then meets a rate limit (30 per 5 minutes), a cost cap of $0.50 per conversation, a daily cap with Slack alerts, and at most 5 tool calls per turn.
Privacy (CCPA)
Delete a customer's data by email, everywhere
A CCPA deletion request is one form in WordPress: enter the email, and the data goes from both WordPress and the chat service. Conversations purge automatically after 30 days, and IP addresses are stored only as SHA-256 hashes.
The key design decision
The AI looks it up. It never remembers fitment.
A chatbot trained on a copy of the catalogue would be wrong the day the fitment data changed. So Claude gets tools, not knowledge: every fitment or product answer is a live query to the store's own database, through a signed request to WordPress.
Live data is only half of it. The four worst bugs after launch had one shape: the AI improvised a lookup key, the exact match failed, and "not found" reached the customer as a confident fact. So the tools now take the catalogue's exact keys, and they tell "not found" apart from "I didn't understand that input".
The customer asks in plain words"Will this fit my 2026 Sierra with the 5.8 ft bed?"
Claude calls a tool with exact keysThe product ID and the catalogue's own spelling, "5.8 ft", never a guess.
WordPress answers from the fitment table
A match: quoted with the SKU and the bed lengthInput it can't read: the bot asks the customer, never says "doesn't fit"
05How it works
From a question on the store to an answer from its database.
Each chat turn streams over server-sent events. Claude's instructions are built from the store's FAQ and the customer's truck, page and details, and every tool call is a signed request to the WordPress plugin.
WidgetA closed Shadow DOM widget on every store page, from one script tag
SessionTurnstile bot check, signed token, rate limits
Claude Sonnet 4.6Instructions from the FAQ, truck, page and customer
10 toolsFixed registry, at most 5 calls per turn
WordPress pluginHMAC-signed queries to the fitment table and WooCommerce
Chat or SlackTokens and product cards stream back; handoffs go to a Slack thread
A state machine decides who answers. Seven modes, from AI chat to agent active, with every transition validated, so a message goes either to Claude or to the Slack thread, never both.
A guest on the client's server. The service runs in Docker on the client's AWS Lightsail box, beside their ERPNext production, capped at 384 MB and 0.75 CPU (about 110 MB in steady state). No ports are public: traffic arrives through a Cloudflare tunnel.
06Integrations
Built into the store and the Slack the team already use.
Nothing for the team to learn: the bot lives in WordPress, answers from WooCommerce, and hands over to Slack.
Store02
WordPressPlugin: 12 REST endpoint classes and 8 admin pages
WooCommerceProducts, prices and stock for the product cards
Team01
SlackHandoff threads; replies stream back to the chat
AI01
ClaudeClaude Sonnet 4.6 via API, with 10 tools
Platform03
PostgreSQLConversations, costs and Slack threads, kept 30 days
DockerAPI and database, capped beside the client's ERP
CloudflareTunnel with no open ports, plus Turnstile bot checks
07How we delivered
From a proposal to a live assistant, checked against the real store.
A written proposal, a live-site audit that corrected the plan before any code, a choice of four widget designs, then the build. Here are Truck Gear Nation's real ones.
01
AI proposalFreeLive fitment lookups, product cards and a Slack handoff
02
Audit + UI directionSeven assumptions corrected; one of four designs chosen
Highlights from the proposal: the function-calling approach, the tools, the architecture and sample conversations.
Free AI proposal + prototype
Want a proposal and prototype like this for your store?
Tell us about one workflow you'd like AI to handle. We'll send you a proposal like this one, with the AI design, the tools and the plan, plus an interactive prototype you can click through. Free.
Audited against the live store, then designed
Step 02 · The UI direction
Four designs, one choice
There was no clickable prototype for this project. After the live-site audit, the client compared four widget designs on one page and chose B, Clean Light.
Loading…
Real files from the engagement. The proposal's fee and cost pages are not shown. The UI directions used a placeholder navy and orange palette; the live widget uses Truck Gear Nation's own black and gold.
01
Step 01Audit before building
On 29 Apr we checked the proposal against the live store and corrected seven assumptions, from WordPress sitting on a separate server to vehicle cookies that already existed.
02
Step 02Build, then dogfood
Eight build-phase pull requests merged on 29–30 Apr. On 2 May we dogfooded it on the live site and fixed about 14 bugs; the first production conversation came on 12 May.
03
Step 03Fix at the root, hand over
Post-launch fixes from client reports between 28 Jul and 14 Sep, then a written handover to the client's new team on 10 Sep.
08Under the hood
Built to be right, not just fluent.
01Never fold 5'6" into 5.6 ft
A customer was told a cover didn't fit their 5.8 ft bed. It did: the AI sent "5.8", the exact match found nothing, and nothing became "doesn't fit". Spelling variants now map to the catalogue's value, but feet-and-inches are never converted (5'6" is 5.5 ft, and the catalogue has both), and input it can't read makes the bot ask.
02Answering from a third of the data
The product tool returned only the short description. 1,057 of about 1,224 products had feature bullets the AI had never seen, plus warranty, install notes and attributes. Now they all reach it, and spec questions it couldn't answer before get answered from the catalogue.
03No apologies to four-month-old chats
Handoffs nobody picked up stayed open, so we added a 20-minute timeout. Before switching it on we found nine stuck conversations, up to 121 days old, closed them and handed them to the client for personal follow-up. One atomic update means no customer is emailed twice.
Reach out to us now. We'll look at the questions your customers ask, where the answers live in your store, and what an assistant that queries them live would change, in a free 45-minute call. Then we send you a free AI proposal and an interactive prototype.
Chat screens are recreated demo conversations; products, prices and stock are real public catalogue data from 12 Oct 2026. Slack and WordPress admin screens are recreations with demo data. The proposal's fee and cost pages are not shown.