Back to Auto Articles
Auto Insurance Guide

Bell & Lyons Insurance
Written by Bell & Lyons Editorial Team
Published Expert Reviewed
Editorial Standards

Bell & Lyons Insurance publishes practical, client-focused insurance guidance designed to help shoppers understand options before choosing coverage.

Key Takeaways

    (function(){ var WEBHOOK = "https:\/\/bellandlyons.com\/wp-json\/bell-lyons\/v1\/lead-webhook"; var EMAIL_ENDPOINT = "https:\/\/bellandlyons.com\/wp-json\/bell-lyons\/v1\/lead-notify-full"; var ZAPIER_COMMERCIAL = "https://hooks.zapier.com/hooks/catch/27012159/uvqfadw/"; var ZAPIER_PERSONAL = "https://hooks.zapier.com/hooks/catch/27012159/uvewmri/"; var ARLO_CRM_WEBHOOK = "https://necessary-curlew-154.convex.site/webhooks/lead"; var ACORD_GENERATOR = "https://cheery-orca-711.convex.site/api/acord-generate"; var IS_COMMERCIAL = window.location.pathname.indexOf('commercial') >= 0; var PAGE_TYPE = 'general'; var path = window.location.pathname.toLowerCase(); if (path.indexOf('auto') >= 0) PAGE_TYPE = 'auto'; else if (path.indexOf('home') >= 0) PAGE_TYPE = 'home'; else if (path.indexOf('renter') >= 0) PAGE_TYPE = 'renters'; else if (path.indexOf('life') >= 0) PAGE_TYPE = 'life'; else if (path.indexOf('health') >= 0) PAGE_TYPE = 'health'; else if (path.indexOf('medicare') >= 0) PAGE_TYPE = 'medicare'; else if (path.indexOf('commercial') >= 0) PAGE_TYPE = 'commercial'; /* ── HTML email builder for personal lines ── */ function buildPersonalEmailHTML(d) { var type = (d.lead_type || PAGE_TYPE || 'LEAD').toUpperCase(); var rows = ''; function addRow(label, val) { if (!val || val === 'undefined') return; rows += '' + label + '' + val + ''; } addRow('Name', d.contact_name || d._contact_name); addRow('Email', d.contact_email || d._contact_email || d.email); addRow('Phone', d.contact_phone || d._contact_phone || d.phone); addRow('Address', d.address); addRow('Zip Code', d.zip_code); addRow('Date of Birth', d.date_of_birth); if (type === 'AUTO') { addRow('Vehicle Year', d.vehicle_year); addRow('Vehicle Make', d.vehicle_make); addRow('Vehicle Model', d.vehicle_model); addRow('VIN', d.vehicle_vin); addRow('Number of Vehicles', d.vehicle_count); addRow('Number of Drivers', d.drivers); addRow('Coverage Preference', d.coverage_preference); addRow('Current Coverage', d.current_coverage); addRow('Incidents', d.incidents); addRow('Discount Qualifiers', d.discount_qualifiers); } if (type === 'HOME') { addRow('Year Built', d.year_built); addRow('Square Footage', d.square_footage); addRow('Construction Type', d.construction_type); addRow('Roof Type', d.roof_type); addRow('Roof Year', d.roof_year); addRow('Coverage Preference', d.coverage_preference); addRow('Current Coverage', d.current_coverage); } if (type === 'RENTERS' || type === 'LIFE' || type === 'HEALTH' || type === 'MEDICARE') { addRow('Coverage Preference', d.coverage_preference); addRow('Current Coverage', d.current_coverage); } addRow('Delivery Preference', d.delivery_preference); return '' + '
    ' + '

    New ' + type + ' Lead

    ' + '
    Contact Information
    ' + '' + rows + '
    ' + '' + '
    '; } /* ── Build Arlo CRM payload ── */ function buildArloCRMPayload(final) { var contactName = final.contact_name || final._contact_name || ''; var nameParts = contactName.trim().split(/\s+/); var firstName = nameParts[0] || ''; var lastName = nameParts.length > 1 ? nameParts.slice(1).join(' ') : ''; if (!lastName && final.business_name) { lastName = '(Business)'; } if (!firstName && !lastName) { firstName = 'Website'; lastName = 'Lead'; } var addr = final.address || ''; var addrParts = addr.split(','); var street = (addrParts[0] || '').trim(); var city = (addrParts[1] || '').trim(); var stateZip = (addrParts[2] || '').trim().split(/\s+/); var state = stateZip[0] || ''; var zip = final.zip_code || stateZip[1] || ''; /* Build notes with ALL lead details */ var notes = []; if (final.insurance_type || PAGE_TYPE) notes.push('Insurance Type: ' + (final.insurance_type || PAGE_TYPE)); if (final.coverage_preference) notes.push('Coverage Preference: ' + final.coverage_preference); if (final.current_coverage) notes.push('Current Coverage: ' + final.current_coverage); if (final.date_of_birth) notes.push('Date of Birth: ' + final.date_of_birth); if (final.vehicle_year) notes.push('Vehicle: ' + [final.vehicle_year, final.vehicle_make, final.vehicle_model].filter(Boolean).join(' ')); if (final.vehicle_vin) notes.push('VIN: ' + final.vehicle_vin); if (final.vehicle_count) notes.push('Number of Vehicles: ' + final.vehicle_count); if (final.drivers) notes.push('Number of Drivers: ' + final.drivers); if (final.incidents) notes.push('Incidents: ' + final.incidents); if (final.discount_qualifiers) notes.push('Discount Qualifiers: ' + final.discount_qualifiers); if (final.year_built) notes.push('Year Built: ' + final.year_built); if (final.square_footage) notes.push('Square Footage: ' + final.square_footage); if (final.construction_type) notes.push('Construction Type: ' + final.construction_type); if (final.roof_type) notes.push('Roof Type: ' + final.roof_type); if (final.roof_year) notes.push('Roof Year: ' + final.roof_year); if (final.entity_type) notes.push('Entity Type: ' + final.entity_type); if (final.nature_of_business) notes.push('Nature of Business: ' + final.nature_of_business); if (final.annual_revenue) notes.push('Annual Revenue: ' + final.annual_revenue); if (final.employees) notes.push('Employees: ' + final.employees); if (final.years_in_business) notes.push('Years in Business: ' + final.years_in_business); if (final.coverage_needed) notes.push('Coverage Needed: ' + final.coverage_needed); return { first_name: firstName, last_name: lastName, email: final.contact_email || final._contact_email || '', phone: final.contact_phone || final._contact_phone || '', insurance_type: final.insurance_type || PAGE_TYPE || 'general', address: street, city: city, state: state, zip: zip, business_name: final.business_name || '', nature_of_business: final.nature_of_business || '', notes: notes.join(' | '), source: 'website_chatbot', delivery_preference: final.delivery_preference || '' }; } /* Fix 1: Set missing data-webhook */ document.querySelectorAll('[data-assistant-root]').forEach(function(r){ if(!r.dataset.webhook) r.dataset.webhook = WEBHOOK; }); /* ── Dedup flags — prevents double-sending across Fix 2 and Fix 4 ── */ var emailSent = false; var arloSent = false; var acordSent = false; /* ── Helper: send lead to Arlo CRM (deduped) ── */ function sendToArlo(payload) { if (arloSent) return; arloSent = true; var arloPayload = buildArloCRMPayload(payload); console.log('[BL-LEAD] Sending to Arlo CRM:', arloPayload.first_name + ' ' + arloPayload.last_name); try { fetch(ARLO_CRM_WEBHOOK, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(arloPayload) }).then(function(r) { console.log('[BL-LEAD] Arlo CRM response:', r.status); }).catch(function(e) { console.warn('[BL-LEAD] Arlo CRM error:', e); }); } catch(e) { console.warn('[BL-LEAD] Arlo CRM error:', e); } } /* ── Helper: send lead email (deduped) ── */ function sendEmail(payload) { if (emailSent) return; emailSent = true; try { fetch(EMAIL_ENDPOINT, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }).catch(function(){}); } catch(e){} } /* ── Helper: trigger server-side ACORD generation for commercial (deduped) ── */ function sendAcord(payload) { if (acordSent || !IS_COMMERCIAL) return; acordSent = true; console.log('[BL-LEAD] Triggering server-side ACORD generation for:', payload.business_name || payload.contact_name); try { fetch(ACORD_GENERATOR, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }).then(function(r) { return r.json(); }).then(function(result) { console.log('[BL-LEAD] ACORD server result:', result.success ? 'SUCCESS (' + result.forms_count + ' forms)' : 'FAILED', result); }).catch(function(e) { console.warn('[BL-LEAD] ACORD server error:', e); }); } catch(e) { console.warn('[BL-LEAD] ACORD server error:', e); } } /* Fix 2: Patch global postLead — fires immediately on lead submission */ var _orig = window.postLead; if(typeof _orig === 'function'){ window.postLead = function(payload, target){ var result = _orig(payload, target || WEBHOOK); window.__blLastLeadPayload = payload; sendEmail(payload); sendToArlo(payload); sendAcord(payload); return result; }; } /* Fix 3: Track payloads from fetch calls */ var lastPayload = null; var origFetch = window.fetch; window.fetch = function(url, opts){ if(typeof url === 'string' && opts && opts.method === 'POST'){ if(url.indexOf('lead-webhook') !== -1){ try { lastPayload = JSON.parse(opts.body); window.__blLastLeadPayload = lastPayload; } catch(e){} } if(url.indexOf('webhooks/lead') !== -1){ try { var convexData = JSON.parse(opts.body); var contact = convexData.contact || {}; var answers = convexData.answers || {}; var mapped = { insurance_type: convexData.insurance_type || PAGE_TYPE, business_name: answers.business_name || answers.company_name || '', contact_name: contact.name || answers.full_name || answers.contact_name || '', _contact_name: contact.name || answers.full_name || '', contact_email: contact.email || answers.email || '', _contact_email: contact.email || '', contact_phone: contact.phone || answers.phone || '', _contact_phone: contact.phone || '', address: answers.address || answers.property_address || answers.business_address || '', coverage_needed: answers.coverage_needed || answers.insurance_type || convexData.insurance_type || '', entity_type: answers.entity_type || answers.business_type || '', nature_of_business: answers.nature_of_business || answers.industry || '', annual_revenue: answers.annual_revenue || answers.revenue || '', employees: answers.employees || answers.num_employees || '', years_in_business: answers.years_in_business || '', vehicle_year: answers.vehicle_year || '', vehicle_make: answers.vehicle_make || '', vehicle_model: answers.vehicle_model || '', vehicle_vin: answers.vehicle_vin || '', date_of_birth: answers.date_of_birth || '', coverage_preference: answers.coverage_preference || answers.coverage || '', current_coverage: answers.current_auto_coverage || answers.coverage_status || '', incidents: answers.incidents || '', discount_qualifiers: Array.isArray(answers.discount_qualifiers) ? answers.discount_qualifiers.join(', ') : (answers.discount_qualifiers || ''), vehicle_count: answers.vehicle_count || '', drivers: answers.drivers || '', year_built: answers.year_built || '', square_footage: answers.square_footage || '', construction_type: answers.construction_type || '', roof_type: answers.roof_type || '', roof_year: answers.roof_year || '', zip_code: answers.zip_code || answers.zip || answers.business_zip || '', delivery_preference: answers.delivery_preference || answers.delivery_method || '', _raw_answers: answers, _raw_convex: convexData }; lastPayload = mapped; window.__blLastLeadPayload = mapped; console.log('[BL-LEAD] Captured Convex chatbot data:', mapped.contact_name || mapped.business_name); } catch(e){ console.warn('[BL-LEAD] Parse error:', e); } } } return origFetch.apply(this, arguments); }; /* Fix 4: Completion observer — backup sends + Zapier */ document.querySelectorAll('[data-assistant-root]').forEach(function(root){ var log = root.querySelector('.assistant-log'); if(!log) return; var finalSent = false; new MutationObserver(function(){ if(finalSent) return; if(!root.querySelector('.bl-confirmation-wrap')) return; finalSent = true; if(lastPayload){ var final = Object.assign({}, lastPayload, { destination_email: lastPayload.destination_email || 'quotes@bellandlyons.com', quote_request_stage: 'completed_flow' }); /* Send to WP lead-webhook */ origFetch(WEBHOOK, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(final) }).catch(function(){}); /* Backup: email, Arlo, ACORD (deduped — only fires if Fix 2 didn't) */ sendEmail(final); sendToArlo(final); sendAcord(final); /* ── Build Zapier payload ── */ var typeLabel = (final.insurance_type || PAGE_TYPE || 'general').toUpperCase(); var leadName = final.contact_name || final._contact_name || final.business_name || 'Website Lead'; var emailSubject = 'New ' + typeLabel + ' Lead — ' + leadName; var zapierPayload = { lead_type: typeLabel, contact_name: final.contact_name || final._contact_name || '', email: final.contact_email || final._contact_email || '', phone: final.contact_phone || final._contact_phone || '', address: final.address || '', zip_code: final.zip_code || '', delivery_preference: final.delivery_preference || '', subject: emailSubject, timestamp: new Date().toISOString() }; if (IS_COMMERCIAL) { zapierPayload.business_name = final.business_name || ''; zapierPayload.lines_of_business = final.coverage_needed || ''; zapierPayload.entity_type = final.entity_type || ''; zapierPayload.nature_of_business = final.nature_of_business || ''; zapierPayload.annual_revenue = final.annual_revenue || ''; zapierPayload.employees = final.employees || ''; zapierPayload.years_in_business = final.years_in_business || ''; var lob = (final.coverage_needed || '').toLowerCase(); var acordForms = ['125']; if (lob.indexOf('general') >= 0 || lob.indexOf('liability') >= 0) acordForms.push('126'); if (lob.indexOf('worker') >= 0 || lob.indexOf('comp') >= 0) acordForms.push('130'); if (lob.indexOf('auto') >= 0) acordForms.push('127'); if (lob.indexOf('property') >= 0 || lob.indexOf('bop') >= 0) acordForms.push('140'); var pdfBase = window.location.origin + '/wp-json/bell-lyons/v1/acord-pdf-proxy?form='; zapierPayload.pdf_url_1 = pdfBase + acordForms[0]; zapierPayload.pdf_url_2 = acordForms[1] ? pdfBase + acordForms[1] : ''; zapierPayload.pdf_url_3 = acordForms[2] ? pdfBase + acordForms[2] : ''; zapierPayload.pdf_forms = acordForms.join(', '); zapierPayload.num_forms = acordForms.length; } else { zapierPayload.contact_name = final.contact_name || final._contact_name || ''; zapierPayload.date_of_birth = final.date_of_birth || ''; zapierPayload.coverage_preference = final.coverage_preference || ''; zapierPayload.current_coverage = final.current_coverage || ''; zapierPayload.incidents = final.incidents || ''; if (PAGE_TYPE === 'auto') { zapierPayload.vehicle_year = final.vehicle_year || ''; zapierPayload.vehicle_make = final.vehicle_make || ''; zapierPayload.vehicle_model = final.vehicle_model || ''; zapierPayload.vehicle_vin = final.vehicle_vin || ''; zapierPayload.vehicle_count = final.vehicle_count || ''; zapierPayload.drivers = final.drivers || ''; zapierPayload.discount_qualifiers = final.discount_qualifiers || ''; } else if (PAGE_TYPE === 'home') { zapierPayload.year_built = final.year_built || ''; zapierPayload.square_footage = final.square_footage || ''; zapierPayload.construction_type = final.construction_type || ''; zapierPayload.roof_type = final.roof_type || ''; zapierPayload.roof_year = final.roof_year || ''; } zapierPayload.html_body = buildPersonalEmailHTML(zapierPayload); } /* ── Send to Zapier (personal lines only — commercial uses ACORD email handler) ── */ if (!IS_COMMERCIAL) { console.log('[BL-LEAD] Sending ' + typeLabel + ' lead to Zapier:', leadName); origFetch(ZAPIER_PERSONAL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(zapierPayload) }).then(function(r) { console.log('[BL-LEAD] Zapier response:', r.status); }).catch(function(e) { console.warn('[BL-LEAD] Zapier error:', e); }); } /* ── Client-side ACORD trigger (kept as additional backup) ── */ if (IS_COMMERCIAL) { window.dispatchEvent(new CustomEvent('bl-acord-trigger', { detail: final })); } } }).observe(log, { childList: true, subtree: true }); }); })();
    $

    Don't Leave Money on the Table!

    See how much you could save with Bell & Lyons

    14+
    Carriers
    60s
    Free Quote
    $1,200+
    Avg Saved
    or
    Your info is secure • No spam, ever • Unsubscribe anytime

    You're All Set!

    We'll send you personalized rates shortly.

    Or get a quote right now →