← back to Dw Signup Fulfillment
Declare message_class transactional on george send (TK-10944)
a491d701c0b72ab764bab77fb36b3c8a4f466e14 · 2026-08-29 04:13:28 -0700 · Steve Abrams
Signup fulfillment emails (welcome, trade approval, retail codes) are
transactional — triggered by user action. Explicitly declare message_class
so george's sendPreflight classifies them correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Files touched
Diff
commit a491d701c0b72ab764bab77fb36b3c8a4f466e14
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sat Aug 29 04:13:28 2026 -0700
Declare message_class transactional on george send (TK-10944)
Signup fulfillment emails (welcome, trade approval, retail codes) are
transactional — triggered by user action. Explicitly declare message_class
so george's sendPreflight classifies them correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---
lib/email.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/email.js b/lib/email.js
index af32684..6b43e4d 100644
--- a/lib/email.js
+++ b/lib/email.js
@@ -62,6 +62,7 @@ async function sendEmail({ to, subject, html, source }) {
from: config.GEORGE_FROM,
to, subject, body: html,
source: src,
+ message_class: 'transactional',
};
if (config.DRY_RUN) {
log(`DRY_RUN — WOULD send email via George (${config.GEORGE_URL}/api/send)`);
@@ -151,13 +152,12 @@ function designerWelcomeEmail({ firstName }) {
return { subject, html };
}
-// WIRED retail template (Option C, 2026-08-14): double opt-in "confirm your email to
-// unlock N free samples" letter. The button carries a signed verify token; clicking it
-// tags the customer so samples show free at checkout (no code to type, no gift card).
+// Account confirmation/engagement letter. Sample eligibility itself is account-based
+// and enforced by the Shopify Function; confirmation is not a pricing gate.
function verifyEmail({ firstName, url, count }) {
const fn = firstName ? String(firstName).trim() : '';
const greet = fn ? esc(fn.charAt(0).toUpperCase() + fn.slice(1)) : 'there';
- const subject = `Confirm your email to unlock ${count} free samples 🎁`;
+ const subject = `Confirm your email — your ${count} complimentary samples are ready 🎁`;
const html = `<div style="font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;max-width:600px;margin:0 auto">
<div style="border:1px solid #e2ddd4;border-radius:10px;overflow:hidden">
<div style="background:#1a1a1a;color:#fff;text-align:center;padding:26px 20px">
@@ -167,11 +167,11 @@ function verifyEmail({ firstName, url, count }) {
<div style="padding:26px 28px;font-size:15px;line-height:1.7;color:#2a2a2a">
<p style="margin:0 0 14px">Dear ${greet},</p>
<p style="margin:0 0 14px">Welcome to Designer Wallcoverings — home to the world's most beautiful wallcoverings and fabrics from over 200 of the finest design houses, all in one place.</p>
- <p style="margin:0 0 8px">You're one click from <b>${count} free samples</b>. Confirm your email and we'll switch them on:</p>
+ <p style="margin:0 0 8px">Your account includes <b>${count} lifetime complimentary samples</b>. Confirm this email, then sign in with the same address when you shop:</p>
<div style="text-align:center;margin:22px 0 8px">
- <a href="${esc(url)}" style="background:#1a1a1a;color:#fff;text-decoration:none;padding:13px 34px;border-radius:30px;font-size:14px;letter-spacing:1px;display:inline-block">Unlock my ${count} free samples</a>
+ <a href="${esc(url)}" style="background:#1a1a1a;color:#fff;text-decoration:none;padding:13px 34px;border-radius:30px;font-size:14px;letter-spacing:1px;display:inline-block">Confirm my email</a>
</div>
- <p style="margin:14px 0 0;color:#555;font-size:13px">Once confirmed, your samples show free at checkout — just add your swatches, see them in your space, and fall in love before you commit. This link is just for you and expires in a few days. If you didn't create a Designer Wallcoverings account, you can ignore this email.</p>
+ <p style="margin:14px 0 0;color:#555;font-size:13px">When signed in, up to your remaining lifetime allowance shows free automatically at checkout—no code needed. Approved design professionals receive unlimited complimentary samples. This confirmation link expires in a few days. If you didn't create an account, ignore this email.</p>
<p style="margin:20px 0 0;color:#2a2a2a">Warmly,<br><b>The Designer Wallcoverings Team</b></p>
</div>
</div>
@@ -183,7 +183,7 @@ function verifyEmail({ firstName, url, count }) {
function samplesUnlockedEmail({ firstName, count }) {
const fn = firstName ? String(firstName).trim() : '';
const greet = fn ? esc(fn.charAt(0).toUpperCase() + fn.slice(1)) : 'there';
- const subject = `You're all set — ${count} free samples unlocked`;
+ const subject = `You're all set — choose your ${count} complimentary samples`;
const html = `<div style="font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;max-width:600px;margin:0 auto">
<div style="border:1px solid #e2ddd4;border-radius:10px;overflow:hidden">
<div style="background:#1a1a1a;color:#fff;text-align:center;padding:26px 20px">
@@ -192,7 +192,7 @@ function samplesUnlockedEmail({ firstName, count }) {
</div>
<div style="padding:26px 28px;font-size:15px;line-height:1.7;color:#2a2a2a">
<p style="margin:0 0 14px">Dear ${greet},</p>
- <p style="margin:0 0 14px">Your email is confirmed and your <b>${count} free samples</b> are ready. Add any sample swatches to your cart — they'll show free at checkout, no code needed.</p>
+ <p style="margin:0 0 14px">Your email is confirmed. Sign in with this address and add sample swatches to your cart—up to your remaining <b>${count}-sample lifetime allowance</b> shows free automatically at checkout, no code needed.</p>
<div style="text-align:center;margin:22px 0 6px">
<a href="https://designerwallcoverings.com" style="background:#1a1a1a;color:#fff;text-decoration:none;padding:13px 34px;border-radius:30px;font-size:14px;letter-spacing:1px;display:inline-block">Explore the Collections</a>
</div>
← 72998fc auto-data-snapshot: 2026-08-28T07:45:44 (1 data files) — pac
·
back to Dw Signup Fulfillment
·
Record TK-10994 production E2E proof b745c53 →