Every message HomeKode sends, in one place.
Thirty post-action templates across the order journey and the returns lifecycle โ each one written for email and WhatsApp, each one carrying the root cause back to the customer in plain language. ๐๏ธ
- ๐ฉโ๐ผ An agent takes an action in Shopify โ that is the only trigger.
- ๐ Shopify fires a webhook to a Cloudflare Worker (HMAC-verified).
- ๐งฉ The Worker pulls order and customer data from Shopify, logistics from Dobesell, ticket context from Freshdesk.
- ๐ The matching template is filled, in the customer's language and tone.
- ๐ค It goes out on both channels, and every send is written to an audit log.
- โ Module 1 โ Framework, template library, Preview Studio (this page)
- โณ Module 2 โ Cloudflare Pages + Supabase deploy, sign-in, roles
- โณ Module 3 โ Shopify custom app, webhooks, HMAC verification
- โณ Module 4 โ Email sending: ESP + SPF, DKIM, DMARC on homekode.com
- โณ Module 5 โ Live Website Updates poller (cron + diff engine)
- โณ Module 6 โ WhatsApp Business Platform + Meta template submission
Preview Studio
Pick the source, the template and the channel โ then see exactly what lands on the customer's phone or in their inbox, before a single message goes out. ๐
order#57668 ยท 17 May 2026customerNadine FingeitemGraciell Warm Terracotta Benchtotal1,450.00 AEDmarketDubai, UAE ๐ฆ๐ชOrder journey
Seventeen moments between checkout and the doorstep. The ones that carry bad news carry a reason with them โ a customer who knows why is a customer who waits. ๐งญ
Returns, refunds & replacements
Thirteen stages from "I'd like to return this" to money back in the account โ every message naming the piece and the reason it's going back. ๐
Live website updates
What changed on homekode.com โ new arrivals, price moves, stock swings, collection updates โ polled and refreshed without you asking. ๐ก
- โฑ๏ธ A Cloudflare Worker cron polls
homekode.com/products.jsonand the collection endpoints. - ๐๏ธ Each poll is snapshotted to Supabase.
- ๐ The next poll is diffed against the last one, so the feed shows change events, not a product list.
- ๐ท๏ธ Events detected: new arrival, price drop, price increase, back in stock, sold out, collection updated.
- ๐ The page re-renders on its own โ no manual refresh.
title, handle, updated_at, images and variants carrying price, compare_at_price, available โ everything the diff engine needs. The feed below is sample data until Module 5 goes live. โ
Data sources
Three systems, one message. Every property on every template resolves back to exactly one of them โ no guessing, no duplicated truth. ๐
System of record and the only trigger. Orders, customers, payments, fulfilment status, totals and VAT, addresses.
The back-office command centre. AWB and courier telemetry, timestamps, delivery attempts, fulfilment-model routing, invoices, FC receipt.
Customer conversation context. Ticket ID and status, reason code captured by the agent, agent notes, CSAT hooks.
API connections
One slot for every credential, waiting for IT. Paste it, save it, test it โ the app tells you straight away whether it works. ๐
Nothing typed here is stored, sent, or remembered โ this preview has nowhere to put it. Paste real credentials only into the deployed app, where each one is encrypted with AES-256-GCM before it touches the database and can never be read back out. Try the flow here with anything you like. ๐งช
Security & delivery
This app will send real messages to real customers. That's a responsibility, so the guardrails come before the features. ๐
- ๐๏ธ No key ever reaches the browser. All secrets live in Cloudflare Worker environment bindings.
- โ๏ธ Every Shopify webhook is HMAC-verified before it's trusted.
- ๐ Sends are idempotent โ one action, one message, even if a webhook is delivered twice.
- ๐ค Sign-in required, with roles: Owner (you), Editor, Viewer.
- ๐งพ An audit log of every message: who, what, when, to whom, on which channel, and the result.
- ๐ A global kill switch that stops all outbound sending in one click.
- ๐งช A dry-run mode that renders and logs a send without dispatching it.
- ๐ Customer data is rendered, never stored beyond what the audit log needs.
- ๐ง SPF, DKIM and DMARC on homekode.com โ without these, mail goes to spam.
- ๐ฌ WhatsApp templates must be pre-approved by Meta; free-form text outside a 24-hour customer-initiated window is not permitted.
- ๐ Written for a multi-national Middle East audience: plain English, no idioms, no slang, AED, UAE address format.
- โฐ Send windows respect customer care hours, 9amโ9pm, seven days a week.
- ๐ A customer who opts out of WhatsApp still receives email.