← back to Big Red
big-red: Canada-only suppression of free sample-shipping claim (wallpapercanada.com)
ad0a1123b1ff390618c8f5a7ab75fae8bda7a149 · 2026-09-22 10:40:52 -0700 · Steve Abrams
Retail persona still says 'DW ships free memo samples'; on wallpapercanada
Big Red now gets a highest-priority override to never promise free sample
shipping or coast-to-coast DHL/Canada Post. Other DW sites unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FZB4e67U2DRKnZu3SVFk1m
Files touched
Diff
commit ad0a1123b1ff390618c8f5a7ab75fae8bda7a149
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Sep 22 10:40:52 2026 -0700
big-red: Canada-only suppression of free sample-shipping claim (wallpapercanada.com)
Retail persona still says 'DW ships free memo samples'; on wallpapercanada
Big Red now gets a highest-priority override to never promise free sample
shipping or coast-to-coast DHL/Canada Post. Other DW sites unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FZB4e67U2DRKnZu3SVFk1m
---
server.js | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/server.js b/server.js
index c2cb374..9c871a8 100644
--- a/server.js
+++ b/server.js
@@ -504,15 +504,25 @@ app.post('/api/chat', async (req, res) => {
// Honor mode from body, else from Referer query string, else retail.
let mode = bodyMode || 'retail';
let appSlug = bodyApp || '';
+ let refHost = '';
try {
- if (!bodyMode && req.headers.referer) {
+ if (req.headers.referer) {
const refUrl = new URL(req.headers.referer);
- mode = refUrl.searchParams.get('mode') || mode;
- appSlug = refUrl.searchParams.get('app') || appSlug;
+ refHost = refUrl.hostname || '';
+ if (!bodyMode) {
+ mode = refUrl.searchParams.get('mode') || mode;
+ appSlug = refUrl.searchParams.get('app') || appSlug;
+ }
}
} catch {}
if (!MODE_PERSONAS[mode]) mode = 'retail';
const persona = MODE_PERSONAS[mode];
+ // Canada-only claim suppression (wallpapercanada.com). The shared retail
+ // persona says "DW ships free memo samples" — on the Canadian site Big Red
+ // must NOT promise free sample shipping / coast-to-coast DHL·Canada Post.
+ const canadaSite = /wallpapercanada/i.test(refHost)
+ || /wallpaper\s*canada/i.test(String(title || ''))
+ || /wallpapercanada/i.test(String(page || ''));
try {
// DW intelligence — if the message mentions a SKU, enrich the prompt
// with live Shopify + dw_unified data BEFORE handing to Claude. The model
@@ -570,6 +580,9 @@ app.post('/api/chat', async (req, res) => {
`You are "Big Red", a chat companion for Steve (founder, Designer Wallcoverings).`,
`MODE: ${persona.label} — voice ${persona.voice}.`,
`Persona bias: ${persona.bias}`,
+ canadaSite
+ ? 'CANADA SITE OVERRIDE (wallpapercanada.com) — highest priority, overrides the persona bias above: Do NOT state or imply that sample shipping is free, or that samples ship "coast to coast" via DHL or Canada Post. Never promise free sample shipping and never name a shipping carrier. If asked about samples, offer to arrange a memo sample as the next step WITHOUT quoting a shipping cost or calling it free.'
+ : '',
appLine,
pageLine,
'You know the DW catalog — SKUs prefixed DWKK/DWSC/DWSW/DWWD/DWQW/DWJS/etc. map to live Shopify products. When a SKU is mentioned, you may have been given live lookup data below — use it verbatim, never fabricate prices.',
← a64cec1 deploy: guard prod-only runtime data from rsync --delete
·
back to Big Red
·
(newest)