AI Checkout
An LLM-powered chat assistant that lives inside Swft Checkout. Shoppers can ask product questions, get help with objections, and (in advanced modes) complete the whole checkout conversationally.
What it does
Section titled “What it does”Three operating modes you can enable independently:
| Mode | What it does | Approx cost |
|---|---|---|
| Mode A | Conversational checkout flow — chat collects the shopper’s email, address, and payment info instead of the standard form. Always on once AI Checkout is enabled. | Negligible (no LLM call per message) |
| Mode B | Product question answering — when a shopper asks about a product, an LLM fetches relevant products and policy excerpts and crafts a reply. | ~$0.001 per question |
| Mode C | Objection handling — when the shopper hesitates (cart abandonment indicators, second-guessing the price, asking “why this and not that?”), Mode C uses Claude Sonnet to craft a tailored objection-handler reply citing your policies. | ~$0.005 per reply |
You’re billed monthly for LLM usage; set a cost cap and Mode B/C will auto-pause once you hit it.
Where to configure it
Section titled “Where to configure it”Swft Dashboard → AI Checkout.
Four tabs:
Settings
Section titled “Settings”| Setting | Default | What it does |
|---|---|---|
| Mode A | On | Always-on conversational flow. |
| Mode B | Off | Product question answering. |
| Mode C | Off | Objection handling (Sonnet). |
| Monthly cap | 5000 cents (£40) | Hard cap on LLM cost per calendar month. |
| Alert email | Empty | Email to ping at 80% of cap. |
When the cap is hit, Modes B and C pause for the rest of the month. Mode A keeps running because it doesn’t burn LLM credits.
Branding
Section titled “Branding”Pick a tone preset that shapes the chat’s voice:
- Professional — formal, concise, business-appropriate.
- Casual — friendly, contraction-heavy, like a chat with a friend.
- Playful — uses humour and emoji (where appropriate to your brand).
- Luxury — slow, considered, premium language.
There’s also a free-form “brand voice notes” textarea where you can describe your tone in your own words. The LLM uses this when crafting replies.
Knowledge
Section titled “Knowledge”Upload (or sync from your store) two corpora:
- Product catalog — every product’s title, description, attributes, price. Used by Mode B for product Q&A.
- Policy pages — returns, shipping, FAQ. Used by Mode C for objection-handler citations.
Re-sync after big catalog changes; otherwise daily auto-sync keeps things current.
Transcripts
Section titled “Transcripts”Every chat conversation is logged. Use this tab to:
- Review what shoppers are actually asking (often surprising — feeds into your product copy).
- Spot edge cases your knowledge base doesn’t cover.
- Audit the assistant’s responses to make sure it’s representing your brand correctly.
Customer experience
Section titled “Customer experience”The chat appears as a floating button on the checkout, or as inline cards on the product page if you’ve enabled the Cart entry point.
Entry points:
- Floating chat button on the checkout itself.
- Cart CTA (“Got questions? Ask our assistant”).
- Product page CTA (via Swft Cart’s product-page embed).
- Abandonment trigger — opens proactively if the shopper hesitates on payment.
- Header link if you enable the persistent header entry.
A typical conversation might be:
Shopper: “Will this dress fit me? I’m UK 12.” Assistant: (Mode B) “Our size chart shows UK 12 = chest 88cm. The model in the photos is also a UK 12. The fabric has 5% stretch, so it sits comfortably. Want to add it to your cart?” Shopper: adds to cart Shopper: “How much is shipping?” Assistant: “Free over £40. Your order is £52 so you’re covered. Ready to check out?”
How it works under the hood
Section titled “How it works under the hood”Sessions are stored in ai_chat_sessions with a state machine: consent → addressing → addressing_objection → payment → confirming → complete. Each user message advances the state via applyInput() in the state machine engine.
Modes are dispatched via an adapter pattern (getAdapterForMerchant). Mode A uses a Noop adapter — no LLM call, just templated responses. Mode B uses OpenAI’s GPT-4o-mini for cost; Mode C uses Anthropic’s Claude Sonnet for quality on harder reasoning.
Cost tracking is per-message — every LLM call writes llm_cost_cents to the AI chat session. A cron job sums spend per merchant per month and compares it to the cap; if exceeded, cap_status flips to over and Modes B/C are skipped until the next month.
Knowledge base data is embedded with OpenAI embeddings (pgvector in Supabase) and retrieved by semantic search for each shopper question.
Gotchas
Section titled “Gotchas”- LLM responses can be wrong. Don’t run Modes B or C without reviewing transcripts regularly. Wrong product info or invented policies can mislead shoppers and create legal risk.
- The cap is a hard stop, not a soft limit. Once hit, advanced features stop until the month rolls. Set the cap generously the first month while you learn your traffic.
- Mode A is opinionated. It replaces the standard checkout form with a chat flow. Test with real shoppers before launching — conversational checkout converts well for some demographics, badly for others.
- Knowledge base must be kept fresh. If you change your shipping policy, re-sync. Otherwise the assistant will quote your old policy.
- Cap reset is per calendar month. A spike late in the month means a hard pause until the 1st.