Work / Chat, coverage planner, kits, restock and upsell for two retailers
AI shopping assistants
Client. Two specialty retailers on Shopify, running on Cloudflare Workers.
A shopper asks how much equipment a two-story house needs. A generic chat app guesses. This one reads live stock, runs the installer's sizing math, prices the kit and never invents a SKU.
- supplier catalog mirror, prices included
- Nightly
- kit contents and savings, computed from stock
- Live
- sizing engine shared by the page and the chat
- 1
- from a variant coming back in stock to the waitlist hearing
- Minutes
- Problem
- Shoppers don't know what a building needs; over- and under-buying both end in returns. Colors and sizes live as separate products, so "does this come in another size" can't be answered from one record. One invented price or policy costs the trust the store runs on.
- The chat
- A Cloudflare Worker holds the key. Claude picks a tool: search products, get specs, check stock, look up an order behind a server-side email match, size a kit. The Worker runs it against Shopify and streams the answer back as it arrives. Every price, stock level, and spec is forced through a tool.
- The planner and the kit
- Type an address; a property record returns square footage, floors, and construction. One sizing engine, shared by the page and the chat, turns that into a gateway, a PoE switch, and an access-point count, then hands off to a builder that flags a PoE device with no PoE source. The planner says what it can't know.
- Stock that mirrors the supplier
- The distributor blocks scripted requests, so a nightly job reads a browser-captured snapshot and refuses stale or undersized data. Quantities, MSRP-derived prices, and kit prices update safest-first. Sold-out pages stay live to capture demand; a waitlist emails the moment the variant flips.
- Same toolkit, different voice
- The Worker ported to a second store with a tool that walks the metadata stitching sibling products together, a warmer prompt, per-IP rate limiting and privacy-safe metrics. Plus native bundles, a one-tap post-purchase add-on and a wishlist that follows guests into their account.
- Stack
- Cloudflare Workers, D1, KV, Cron Triggers. Anthropic Messages API with tool use, streaming, and prompt caching. Shopify Storefront and Admin GraphQL, checkout UI extensions, Liquid. Rentcast and Google Places. Resend.