Add intake form links to compliance order confirmation email

The confirmation email now includes a prominent blue box with
direct links to the intake form for each ordered service. Subject
changed to "Action Required" to prompt the customer to complete it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-05-22 01:26:33 -05:00
parent 5cb360acba
commit de50971fb3

View file

@ -2038,10 +2038,29 @@ async function sendComplianceIntakeEmail(
</p>
</div>` : "";
// Build intake form links for each service
const intakeLinks = orders.map(o => {
const slug = o.service_slug as string;
const orderNum = o.order_number as string;
const name = o.service_name as string;
const intakeUrl = `${SITE_DOMAIN}/order/${slug}?order=${orderNum}`;
return `<li style="margin:6px 0;"><a href="${intakeUrl}" style="color:#1e40af;font-weight:600;font-size:14px;text-decoration:underline;">${name}</a></li>`;
}).join("\n");
const intakeSection = `
<div style="background:#eff6ff;border:2px solid #3b82f6;border-radius:8px;padding:20px;margin:20px 0;">
<p style="margin:0 0 8px;font-size:16px;font-weight:700;color:#1e3a5f;">Action Required: Complete Your Intake Form</p>
<p style="margin:0 0 12px;font-size:13px;color:#374151;line-height:1.5;">
Please fill out the intake form for each service so we have the information we need to prepare your filing.
</p>
<ul style="margin:0 0 12px;padding-left:18px;">${intakeLinks}</ul>
<p style="margin:0;font-size:12px;color:#6b7280;">This usually takes 2-5 minutes. We cannot begin your filing until the intake form is complete.</p>
</div>`;
const { sendEmail } = await import("../email.js");
await sendEmail({
to: customerEmail,
subject: `Next Steps — ${entityName || "Your"} FCC Compliance Order`,
subject: `Action Required${entityName || "Your"} FCC Compliance Order`,
html: `<!DOCTYPE html>
<html><head><meta charset="UTF-8"></head>
<body style="margin:0;padding:0;background:#eef0f3;font-family:Arial,sans-serif;">
@ -2074,10 +2093,13 @@ async function sendComplianceIntakeEmail(
${usacSection}
${intakeSection}
<h2 style="margin:24px 0 8px;font-size:16px;font-weight:700;color:#111827;">What to Expect</h2>
<p style="margin:0 0 4px;font-size:14px;color:#374151;"><span style="color:#1e3a5f;font-weight:600;">1.</span> We will review your compliance status within 1 business day.</p>
<p style="margin:0 0 4px;font-size:14px;color:#374151;"><span style="color:#1e3a5f;font-weight:600;">2.</span> If we need any additional information, we will email you.</p>
<p style="margin:0 0 4px;font-size:14px;color:#374151;"><span style="color:#1e3a5f;font-weight:600;">3.</span> You will receive a confirmation for each filing as it is completed.</p>
<p style="margin:0 0 4px;font-size:14px;color:#374151;"><span style="color:#1e3a5f;font-weight:600;">1.</span> Complete the intake form above so we have the details we need.</p>
<p style="margin:0 0 4px;font-size:14px;color:#374151;"><span style="color:#1e3a5f;font-weight:600;">2.</span> We will prepare your filing within 3-7 business days.</p>
<p style="margin:0 0 4px;font-size:14px;color:#374151;"><span style="color:#1e3a5f;font-weight:600;">3.</span> You will receive the document for review and electronic signature.</p>
<p style="margin:0 0 4px;font-size:14px;color:#374151;"><span style="color:#1e3a5f;font-weight:600;">4.</span> Once signed, we file it with the FCC and send you confirmation.</p>
${has499 ? `<p style="margin:0 0 4px;font-size:14px;color:#374151;"><span style="color:#1e3a5f;font-weight:600;">4.</span> For 499-A filings, complete the USAC delegation above and click the confirmation button.</p>` : ""}
<p style="margin:20px 0 0;font-size:13px;color:#9ca3af;">