🏢 SyndicationAI Embeddable Widget

🚀 Widget Integration Code

Add this to your website:

<script> window.SyndicationAI = { apiUrl: 'http://chat.afterburnerequity.com/api', position: 'bottom-right', primaryColor: '#2563EB', secondaryColor: '#10B981' }; </script> <script> (function() { 'use strict'; const WIDGET_CONFIG = { apiUrl: window.AfterburnerEquity?.apiUrl || window.SyndicationAI?.apiUrl || 'https://chat.afterburnerequity.com/api', position: window.AfterburnerEquity?.position || window.SyndicationAI?.position || 'bottom-right', primaryColor: window.AfterburnerEquity?.primaryColor || window.SyndicationAI?.primaryColor || '#1B365D', secondaryColor: window.AfterburnerEquity?.secondaryColor || window.SyndicationAI?.secondaryColor || '#D4AF37', features: { chat: window.AfterburnerEquity?.features?.chat !== false, voice: window.AfterburnerEquity?.features?.voice !== false, appointments: window.AfterburnerEquity?.features?.appointments !== false }, branding: { companyName: window.AfterburnerEquity?.branding?.companyName || 'Afterburner Equity', tagline: window.AfterburnerEquity?.branding?.tagline || 'Real Estate Investment Experts', logoEmoji: window.AfterburnerEquity?.branding?.logoEmoji || '🏢' } }; function generateSessionId() { return 'widget_' + Math.random().toString(36).substr(2, 9) + Date.now().toString(36); } function createWidget() { const widgetId = 'syndication-ai-widget-' + Date.now(); const sessionId = generateSessionId(); const widgetHTML = ` `; document.body.insertAdjacentHTML('beforeend', widgetHTML); initializeWidget(widgetId, sessionId); } function getPositionStyles() { switch(WIDGET_CONFIG.position) { case 'bottom-left': return 'bottom: 20px; left: 20px;'; case 'top-right': return 'top: 20px; right: 20px;'; case 'top-left': return 'top: 20px; left: 20px;'; default: return 'bottom: 20px; right: 20px;'; } } function getTogglePositionStyles() { return getPositionStyles(); } function initializeWidget(widgetId, sessionId) { const widget = document.getElementById(widgetId); const toggle = document.getElementById(`widget-toggle-${widgetId}`); const closeBtn = document.getElementById(`close-widget-${widgetId}`); const chatInput = document.getElementById(`chat-input-${widgetId}`); const sendBtn = document.getElementById(`send-button-${widgetId}`); toggle.addEventListener('click', () => { const isVisible = widget.style.display !== 'none'; widget.style.display = isVisible ? 'none' : 'block'; toggle.style.display = isVisible ? 'flex' : 'none'; }); closeBtn.addEventListener('click', () => { widget.style.display = 'none'; toggle.style.display = 'flex'; }); function sendMessage() { const message = chatInput.value.trim(); if (!message) return; addMessage(message, 'user', widgetId); chatInput.value = ''; fetch(`${WIDGET_CONFIG.apiUrl}/chat/message`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message, sessionId }) }) .then(response => { if (!response.ok) { throw new Error(`HTTP ${response.status}: ${response.statusText}`); } return response.json(); }) .then(data => { if (data.message) { addMessage(data.message, 'ai', widgetId, data.suggestedActions); } else if (data.error) { addMessage(`I encountered an issue: ${data.error}. Let me try to help you anyway - what specific aspect of real estate investing interests you?`, 'ai', widgetId); } else { addMessage('Let me help you with your real estate questions. What would you like to know about our multifamily, assisted living, industrial, or mixed-use investment opportunities?', 'ai', widgetId); } }) .catch(error => { console.error('Chat error:', error); addMessage('I\'m here to help with real estate questions. While I resolve a technical issue, feel free to ask about multifamily, assisted living, industrial, or mixed-use investment opportunities. What interests you most?', 'ai', widgetId, ['Tell me about multifamily', 'Join our Investor Club']); }); } sendBtn.addEventListener('click', sendMessage); chatInput.addEventListener('keypress', (e) => { if (e.key === 'Enter') sendMessage(); }); const appointmentBtn = document.getElementById(`book-appointment-${widgetId}`); if (appointmentBtn) { appointmentBtn.addEventListener('click', () => { addMessage('Sending you over to the booking page!', 'ai', widgetId); window.open('https://www.afterburnerequity.com/schedule-call', '_blank'); }); } } function addMessage(content, type, widgetId, suggestedActions = []) { const messagesContainer = document.getElementById(`chat-messages-${widgetId}`); const isUser = type === 'user'; const messageHTML = `
${isUser ? '👤' : 'Jessica'}
${content} ${suggestedActions && suggestedActions.length > 0 ? `
${suggestedActions.map(action => ` `).join('')}
` : ''}
`; messagesContainer.insertAdjacentHTML('beforeend', messageHTML); // Ensure smooth auto-scroll to show new response at top of visible area setTimeout(() => { const newMessage = messagesContainer.lastElementChild; if (newMessage) { // Calculate optimal scroll position to show new message at top const containerHeight = messagesContainer.clientHeight; const messageOffsetTop = newMessage.offsetTop; const targetScrollTop = Math.max(0, messageOffsetTop - 20); // 20px padding from top messagesContainer.scrollTop = targetScrollTop; } }, 50); } // Make handleCTAClick globally accessible window.handleCTAClick = function(action, widgetId) { const lowerAction = action.toLowerCase(); // Check if this is a scheduling/consultation action if (lowerAction.includes('schedule') || lowerAction.includes('call') || lowerAction.includes('consultation') || lowerAction.includes('book')) { // Redirect to Schedule A Call page window.open('https://afterburnerequity.com/schedule-call', '_blank'); } else if (lowerAction.includes('join') && lowerAction.includes('investor')) { // Redirect to Investor Club signup window.open('https://investors.afterburnerequity.com/investor-sign-up-basic-info-1', '_blank'); } else { // For other actions, add to chat input and focus it const chatInput = document.getElementById('chat-input-' + widgetId); if (chatInput) { chatInput.value = action; chatInput.focus(); } } }; if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', createWidget); } else { createWidget(); } })(); </script>

🎯 Sales-Optimized Features

💬 Consultative Chat

AI asks probing questions to understand investor needs and qualifies prospects through strategic conversation.

🧠 Insight Selling

Challenges conventional thinking with contrarian market perspectives and unique investment insights.

🤝 Relationship Building

Positions as long-term advisor, references successful investors, and builds trust through expertise.

📅 Appointment Focused

Every interaction guides toward booking consultations with strategic suggested actions.

📊 Integration Benefits