diff --git a/api/src/routes/checkout.ts b/api/src/routes/checkout.ts index 5d8f4fe..8793623 100644 --- a/api/src/routes/checkout.ts +++ b/api/src/routes/checkout.ts @@ -300,7 +300,11 @@ export async function ensureComplianceSalesOrder( const first = rows[0]; const email = ((first.customer_email as string) || "").toLowerCase().trim(); const name = (first.customer_name as string) || email.split("@")[0] || "Customer"; - if (!email || email === "synthetic@pipeline.com") return; + // NOTE: unlike portal provisioning, we do NOT skip the FMCSA-census placeholder + // email here -- a Sales Order is internal bookkeeping (not an outbound email), + // and some real customers genuinely use that address. We only need a non-empty + // email to attach an ERPNext Customer. + if (!email) return; const { customerName: erpnextCustomer } = await findOrCreateCustomer(email, name); if (!erpnextCustomer) return;