John2121 commited on
Commit
24efc5b
·
1 Parent(s): 0785cfc

Polish UI copy and assistant tone to industry-standard concierge voice

Browse files
Files changed (3) hide show
  1. chat.js +8 -8
  2. index.html +8 -7
  3. lead-config.json +2 -2
chat.js CHANGED
@@ -114,8 +114,8 @@ const M2 = (container = mainChatMessages) => {
114
  });
115
 
116
  if (res.ok) {
117
- if (status) status.textContent = 'Lead sent — thank you! Our team will contact you.';
118
- appendMessage('Thanks — I sent your request to our team. Someone will reach out soon.', 'ai', container);
119
  setTimeout(() => {
120
  const f = document.getElementById('lead-form');
121
  if (f) f.parentElement.remove();
@@ -180,13 +180,13 @@ const M4 = (messageText, container = mainChatMessages, sender = 'ai', streaming
180
  }
181
  };
182
 
183
- // M5: Fallback response generator
184
  const M5 = (text) => {
185
  const lowerText = (text || '').toLowerCase();
186
  if (lowerText.includes('buy') || lowerText.includes('sell') || lowerText.includes('consult') || lowerText.includes('schedule') || lowerText.includes('book')) {
187
- return `I can help you with that. Would you like me to collect some quick details so our team (${x2?.business?.phoneDisplay || ''}) can contact you?`;
188
  }
189
- return 'Thanks — I can help with listings, valuations, and scheduling. Would you like a quick form to get started?';
190
  };
191
 
192
  // Pipeline: compose M1..M4
@@ -244,9 +244,9 @@ M1().then(() => {
244
  });
245
  });
246
 
247
- // Welcome message
248
- M4(`Hello! I'm ${x2?.chat?.assistantName || 'Assistant'}. I can help you buy, sell, or schedule a consultation.`, mainChatMessages, 'ai', true);
249
- if (chatMessages) M4('Need help? Ask me about buying, selling, or scheduling.', chatMessages, 'ai', true);
250
  });
251
 
252
  // Expose pipeline and M2 externally
 
114
  });
115
 
116
  if (res.ok) {
117
+ if (status) status.textContent = 'Lead submitted — thank you. A member of our team will be in touch shortly.';
118
+ appendMessage('Thanks — your details have been sent to our team. We will reach out to schedule next steps.', 'ai', container);
119
  setTimeout(() => {
120
  const f = document.getElementById('lead-form');
121
  if (f) f.parentElement.remove();
 
180
  }
181
  };
182
 
183
+ // M5: Fallback response generator (concierge tone)
184
  const M5 = (text) => {
185
  const lowerText = (text || '').toLowerCase();
186
  if (lowerText.includes('buy') || lowerText.includes('sell') || lowerText.includes('consult') || lowerText.includes('schedule') || lowerText.includes('book')) {
187
+ return `I can help with that. Would you like me to collect a few details so our team (${x2?.business?.phoneDisplay || ''}) can follow up and assist you directly?`;
188
  }
189
+ return 'I can help with listings, valuations, or booking a showing. Would you like to complete a short form so we can get started?';
190
  };
191
 
192
  // Pipeline: compose M1..M4
 
244
  });
245
  });
246
 
247
+ // Welcome message (concierge tone)
248
+ M4(`Hello I'm ${x2?.chat?.assistantName || 'Assistant'}. How can I help you with your real estate needs today?`, mainChatMessages, 'ai', true);
249
+ if (chatMessages) M4('Quick options: find homes, sell my home, request a valuation, or book a showing.', chatMessages, 'ai', true);
250
  });
251
 
252
  // Expose pipeline and M2 externally
index.html CHANGED
@@ -187,9 +187,10 @@
187
  <div class="search-bar p-6 rounded-2xl max-w-3xl mx-auto mb-8 animate-slide-up">
188
  <div class="max-w-3xl mx-auto">
189
  <div class="mb-4 text-left">
190
- <h3 class="text-2xl font-extrabold text-exit-dark">Chat with our AI Assistant</h3>
191
- <p class="text-sm text-gray-200">Ask about buying, selling, valuations, or schedule a
192
- consultation. The AI can gather lead details and submit them to our team.</p>
 
193
  </div>
194
 
195
  <div id="main-chat-messages" role="log" aria-live="polite"
@@ -198,13 +199,13 @@
198
 
199
  <div class="flex flex-wrap gap-2 mb-3">
200
  <button class="quick-reply px-3 py-1 rounded-full bg-exit-blue text-white text-sm"
201
- data-text="I'm looking to buy">Buy</button>
202
  <button class="quick-reply px-3 py-1 rounded-full bg-exit-green text-white text-sm"
203
- data-text="I'm looking to sell">Sell</button>
204
  <button class="quick-reply px-3 py-1 rounded-full bg-white text-exit-blue text-sm border"
205
- data-text="What's my home worth?">Value my home</button>
206
  <button class="quick-reply px-3 py-1 rounded-full bg-white text-exit-blue text-sm border"
207
- data-text="Schedule a showing">Schedule showing</button>
208
  </div>
209
 
210
  <div class="flex gap-3">
 
187
  <div class="search-bar p-6 rounded-2xl max-w-3xl mx-auto mb-8 animate-slide-up">
188
  <div class="max-w-3xl mx-auto">
189
  <div class="mb-4 text-left">
190
+ <h3 class="text-2xl font-extrabold text-exit-dark">Talk with our Property Concierge</h3>
191
+ <p class="text-sm text-gray-200">Get local expertise — inquire about buying, selling, home
192
+ valuations, or book a showing. We'll collect the details and connect you with an agent.
193
+ </p>
194
  </div>
195
 
196
  <div id="main-chat-messages" role="log" aria-live="polite"
 
199
 
200
  <div class="flex flex-wrap gap-2 mb-3">
201
  <button class="quick-reply px-3 py-1 rounded-full bg-exit-blue text-white text-sm"
202
+ data-text="I'm ready to buy">Find homes</button>
203
  <button class="quick-reply px-3 py-1 rounded-full bg-exit-green text-white text-sm"
204
+ data-text="I'm ready to sell">Sell my home</button>
205
  <button class="quick-reply px-3 py-1 rounded-full bg-white text-exit-blue text-sm border"
206
+ data-text="What's my home worth?">Get valuation</button>
207
  <button class="quick-reply px-3 py-1 rounded-full bg-white text-exit-blue text-sm border"
208
+ data-text="Schedule a showing">Book a showing</button>
209
  </div>
210
 
211
  <div class="flex gap-3">
lead-config.json CHANGED
@@ -16,8 +16,8 @@
16
  "formsubmitEndpoint": "https://formsubmit.co/ajax/info@exitcw.com"
17
  },
18
  "chat": {
19
- "assistantName": "EXIT Realty CW Assistant",
20
- "prompt": "You are a persuasive, friendly AI assistant representing EXIT REALTY CW in Plover, WI. Your primary objective is to convert visitors into qualified leads by asking short, targeted questions and collecting: full name, email, phone, intent (buy/sell/rent), location/address, price range, and timeline. Use conversational language, show local expertise, and offer clear next steps (quick form, schedule showing, or call). Ask one question at a time. When the user indicates readiness (words like 'yes', 'book', 'schedule', 'ready', or asks to meet), show the inline lead form and prefill intent if available. Do not give legal or financial advice. Keep messages concise, confident, and locally-relevant.",
21
  "intents": [
22
  "consult",
23
  "schedule",
 
16
  "formsubmitEndpoint": "https://formsubmit.co/ajax/info@exitcw.com"
17
  },
18
  "chat": {
19
+ "assistantName": "EXIT Realty CW Concierge",
20
+ "prompt": "You are the EXIT REALTY CW Concierge a professional real estate assistant for Plover, WI. Your role is to provide concise, locally-informed answers and to qualify leads when appropriate by collecting: full name, email, phone, intent (buy/sell/rent), location/address, price range, and timeline. Ask one clear question at a time, offer concrete next steps (book a showing, request a valuation, or connect with an agent), and present the inline lead form when the visitor is ready. Keep a professional, helpful tone; never provide legal or financial advice.",
21
  "intents": [
22
  "consult",
23
  "schedule",