Cartelligent
Lifecycle Email Campaign System with Salesforce Integration
Built a custom email marketing automation system that queries Salesforce for lease-end customers, generates personalized emails using React Email templates, and delivers through Resend—targeting 1,000+ customers with leases ending in the next 180 days.
TypeScriptReact EmailResendSalesforce APISupabaseGoogle Cloud FunctionsNode.js
About This Project
Cartelligent had many customers with vehicle leases ending in the next six months but no automated way to reach out to them. Their advisors were manually tracking lease dates and sending individual emails, which meant most customers weren't being contacted at the optimal time, if at all. The company needed a system that could automatically identify customers approaching lease end, personalize outreach based on their specific vehicle and assigned advisor, and track engagement—all while staying CAN-SPAM compliant.
I designed and built a complete email campaign system from scratch. The architecture pulls customer data directly from Salesforce (lease end dates, vehicle information, advisor assignments), generates personalized emails using React Email templates, and delivers through Resend with a custom subdomain (email.cartelligent.com). Each email appears to come from the customer's actual advisor ("Chris Miller from Cartelligent") with proper reply-to routing so responses go directly to that advisor's inbox.
The technical implementation includes a TypeScript service layer with modules for Salesforce queries, email personalization (including VIN decoding for vehicle details), campaign management, and compliance handling. Supabase stores campaign tracking data, email send logs, unsubscribe lists, and bounce records. The system supports multi-email drip sequences with configurable timing between sends, and a daily Cloud Function job automatically enrolls eligible customers and triggers scheduled emails.
A key challenge was making emails feel genuinely personal rather than mass-marketed. Each template dynamically incorporates the customer's first name, their specific vehicle (year, make, model), the month their lease ends, and their advisor's name, photo, phone number, and team page URL. The initial lease-end campaign targets customers 60-180 days before their lease expires—the sweet spot for starting conversations about their next vehicle. With hundreds of customers in the initial cohort and Cartelligent's average deal value, even a modest conversion rate represents significant revenue recovery from customers who might otherwise shop elsewhere.
