Skip to content

Add /buy/diagnostic/ — the $50 Diagnostic Session checkout hand-off#9

Open
mrjeeves wants to merge 1 commit into
mainfrom
claude/cec-diagnostic-purchase-integration-hgphzb
Open

Add /buy/diagnostic/ — the $50 Diagnostic Session checkout hand-off#9
mrjeeves wants to merge 1 commit into
mainfrom
claude/cec-diagnostic-purchase-integration-hgphzb

Conversation

@mrjeeves

Copy link
Copy Markdown
Owner

The web piece of the $50 CEC Diagnostic Session flow — sibling to mrjeeves/AllMyStuff#167 (protocol + node + technician controls) and mrjeeves/CECSupport#32 (the customer prompt).

What it is

A small branded interstitial at buy/diagnostic/ that the CEC Support app opens in the customer's browser when a technician requests the purchase. It shows the item, the $50 price, and "Requested by ‹technician›", then hands off (~1s, with a manual Continue to secure checkout → button as fallback) to the store's hosted checkout via a Shopify cart permalink: {store}/cart/{variant}:1 goes straight to checkout, and the app's attribution rides along as cart attributes — Support Number, Technician, Reference — which appear on the order in Shopify admin. That attribution is how the tech on the phone verifies "I can see your order — you're all set."

This page is the one place store details live, so products, prices, or even the store itself can change without shipping a new app installer.

Go-live checklist (two strings + one test)

  1. In Shopify admin, create the CEC Diagnostic Session product ($50, one variant, not a physical product so checkout skips shipping, published to the Online Store channel) and copy its variant id.
  2. Fill in STORE and VARIANT_ID at the top of buy/diagnostic/index.html (documented in the README) and merge — GitHub Pages redeploys. Until then the page shows a calm "not live yet" note and the technician takes payment by phone, so the app-side PRs can ship first.
  3. Sanity-test once against the real store: open /buy/diagnostic/?sn=123456789&agent=Test, place a test order, and confirm the attributes show on the order in admin. (The permalink format and attribute behavior are per Shopify's cart-permalink docs, cross-checked against multiple sources; this environment's network policy blocked opening shopify.dev directly, hence the 2-minute live check.)

Safety properties (verified headlessly in Chromium)

  • No open redirect: the destination is never taken from the URL — query params are whitelisted (sn/ref/agent), control-stripped, length-capped, and re-encoded as attribute values only. An injected &store=https://evil.example is ignored (tested).
  • Unconfigured page stays put with the "not live yet" note — no broken bounce (tested).
  • Configured page renders the technician's name, builds the exact permalink, and auto-redirects (tested); noindex; reduced-motion respected; design system + fonts all self-hosted.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MzGQaTFkYtzYR7Hq1jBoGR


Generated by Claude Code

The CEC Support app sends every technician-requested $50 diagnostic
purchase to this page, which bounces straight to the store's hosted
checkout via a Shopify cart permalink ({store}/cart/{variant}:1). The
attribution the app appends (?sn / ?ref / ?agent) becomes cart attributes
on the order — Support Number, Reference, Technician — so the technician
on the phone can verify the order is really this customer's before
confirming in the app.

Store domain + variant id are configured HERE (one place, documented in
the README) so products, prices, or even the store can change without
shipping a new installer. Until both are filled in the page shows a calm
"not live yet" note and the technician takes payment by phone.

Deliberate properties: no query parameter can ever choose the redirect
target (attribution values only — no open redirect), params are
whitelisted/trimmed/re-encoded, the page is noindex, and the interstitial
wears the site's design system with a manual continue button in case the
auto hand-off is held back.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MzGQaTFkYtzYR7Hq1jBoGR
@mrjeeves
mrjeeves force-pushed the claude/cec-diagnostic-purchase-integration-hgphzb branch from f218402 to 545801c Compare July 12, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants