Welcome to Afterburner Equity. I'm Jessica, your real estate syndication assistant. We specialize in helping investors access institutional-grade commercial assets through passive syndication strategies.
Are you most interested in cash flow, appreciation, or tax-advantaged wealth building?
${WIDGET_CONFIG.features.appointments ? `` : ''}
`;
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 = `
`;
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
Lead Qualification: AI identifies serious investors through strategic questioning
24/7 Availability: Captures leads even when your team is offline
Expert Knowledge: Covers all 7 syndication topics with professional expertise
Conversion Focused: Uses proven sales methodologies to drive appointments
Evolvly.io Integration: Automatically syncs conversations and appointments
Cross-Platform: Works on any website, integrates with Slack