
import { triggeredEmails, contacts } from 'wix-crm-backend'; // Replace with your LopileTech Owner Contact ID in Wix Contacts // (Find it in Wix Dashboard -> Contacts -> Hello@lopiletech.co.za -> URL Contact ID) const LOPILETECH_OWNER_CONTACT_ID = 'REPLACE_WITH_YOUR_WIX_OWNER_CONTACT_ID'; export async function sendBlackFridayLeadEmail(lead) { const { deal, price, preference, name, email, phone, city } = lead; // Sends a Wix Triggered Email directly to your Hello@lopiletech.co.za owner contact return triggeredEmails.emailContact('blackFridayLead', LOPILETECH_OWNER_CONTACT_ID, { variables: { selectedDeal: deal || 'Black Friday Special', promoPrice: price || 'Promo Pricing', bookingPreference: preference || 'Not specified', customerName: name || 'N/A', customerEmail: email || 'N/A', customerPhone: phone || 'N/A', customerCity: city || 'N/A' } }); }