Home Estatebud Copilot

Estatebud Copilot

3 articles

Installing and configuring the Copilot widget

Copilot is an AI chat assistant for your website. It answers visitors questions about your listings, searches your properties, explains how buying and renting work, collects contact details from interested visitors and emails your team a transcript of every conversation. This article explains how to add the widget to your website and every configuration option. For controlling the chat from your own code, see Copilot JavaScript API and events. For what happens during and after a conversation, see How Copilot conversations work. Installation Add the following code to every page where the chat should appear, just before the closing </body> tag. Replace YOUR_WIDGET_TOKEN with the token you received from Estatebud. <script> window.EstatebudCopilot = { token: 'YOUR_WIDGET_TOKEN' }; </script> <script src="https://dev-widget.estatebud.com/embed.js" async></script> The configuration object must be defined before embed.js loads. The script only creates the widget once per page, so including it twice does no harm. Allowed domains For security, the widget only loads on websites that have been registered for your token. Send Estatebud every hostname the widget should run on, for example example.com and www.example.com: hostnames only, without https:// or a path. If a domain is missing, the widget does not appear and the browser console shows: [Copilot] Invalid domain: "www.example.com". Your domain name must be added to the list of allowed domains. Single-page websites Websites that change pages without a full reload (React, Vue, Next.js and similar) are supported automatically. The widget follows pushState, replaceState and the browser's back and forward buttons, so it always knows which page the visitor is on. Configuration options All options go in the window.EstatebudCopilot object. Option Type Default Description token string required Your widget token. Without it the widget does not load. position string bottom_right Where the chat button appears: bottom_right or bottom_left (with an underscore). locale string visitor's browser language Forces the interface language, e.g. 'el' . See Languages . i18n object none Replaces selected interface texts. See Translation overrides . inviteMessage object none Shows a greeting bubble next to the chat button. See Invite message . Full example <script> window.EstatebudCopilot = { token: 'YOUR_WIDGET_TOKEN', position: 'bottom_left', locale: 'en', i18n: { home_title: 'Welcome to Sunshine Estates! 👋', home_text: 'Ask us anything about our properties.' }, inviteMessage: { text: '👋 Hi! Looking for a home in Paphos? I can help.', delay: 5000 } }; </script> <script src="https://dev-widget.estatebud.com/embed.js" async></script> Invite message An invite message is a short greeting that pops up next to the chat button to start a conversation. It is shown only when the visitor has no open conversation and the chat is closed. When the visitor opens the chat, the invite appears as the first message from the assistant. Field Type Description text string The greeting. Leave it empty to show no invite. delay number How long to wait before showing it, in milliseconds (5000 = 5 seconds). Default 0. You can also show an invite later from your own code, for example on a specific page or after the visitor scrolls. See the inviteMessage command in Copilot JavaScript API and events. Languages and translation overrides Interface languages The widget interface (buttons, labels, placeholders and disclaimers) is available in 14 languages: Code Language Code Language bg Bulgarian it Italian da Danish nb Norwegian de German nl Dutch el Greek pl Polish en English ro Romanian es Spanish ru Russian fr French sv Swedish How the interface language is chosen: 1. The locale option, if it is set to one of the codes above. 2. Otherwise the visitor's browser language, if it is one of the codes above. 3. Otherwise English. The conversation itself is not limited to these languages. The assistant always replies in the language the visitor writes in, whatever the interface language is. Translation overrides You can replace these interface texts with your own wording through the i18n option. Overrides apply in every language, so if your site has several languages, set them per page language. Key Where it appears Default (English) home_title Heading on the chat's start screen Hello! 👋 home_text Text under the heading on the start screen How can we help you? Other keys are ignored. Example for a multilingual site: <script> var lang = document.documentElement.lang || 'en'; window.EstatebudCopilot = { token: 'YOUR_WIDGET_TOKEN', locale: lang, i18n: lang === 'el' ? { home_title: 'Καλώς ήρθατε! 👋', home_text: 'Πώς μπορούμε να σας βοηθήσουμε;' } : { home_title: 'Welcome! 👋', home_text: 'How can we help you today?' } }; </script> Widget settings These settings are stored with your widget by Estatebud, not in the embed code. Contact Estatebud to change them. Setting Description Assistant name The name the assistant uses for itself and shows on its messages, e.g. "Sophia". Brand color Main color of the chat button and header, as a hex color (e.g. #5c73e5 ). Text color on brand color auto (chosen for best contrast), light or dark . Logo Your logo, shown in the chat header. Avatar Image shown next to the assistant's messages. Approach How actively the assistant asks for contact details. See below. Time zone The time zone used for times in transcript emails. Allowed domains The hostnames the widget may load on (see Installation ). Transcript recipients The email addresses that receive transcripts (To, Cc or Bcc). Approach Approach Behavior Relaxed Just helps. Never asks for contact details on its own; only collects them when the visitor offers them or asks to be contacted or to book a viewing. Balanced (default) Answers the question first and in full, then invites the visitor once, to share their name. Collects email or phone when the visitor wants a callback, a viewing or a follow-up. Persistent Asks for name and email or phone before handling requests such as viewings, listing questions or searches, then continues with the request straight away. Troubleshooting Problem Solution The chat button does not appear. Check that window.EstatebudCopilot with your token is defined before embed.js , and look in the browser console for "Invalid domain". The chat button is on the wrong side. Use bottom_left with an underscore. Any other value, including bottom-left , puts the button on the right. The interface is in the wrong language. Set the locale option to the page language. It must be one of the 14 supported codes. My i18n text is not shown. Only home_title and home_text can be overridden. The invite message does not appear. It is only shown when the visitor has no open conversation and the chat is closed. Check that text is not empty, and remember that delay is in milliseconds.

Last updated on Nov 10, 2026

Copilot JavaScript API and events

Your website can control the Copilot chat widget programmatically using Copilot's JavaScript API, for example to open the chat from your own button, show a greeting on certain pages, or send chat activity to your analytics. This article describes the commands and events that make this possible. The widget must already be installed. See Installing and configuring the Copilot widget. Commands When embed.js has loaded, it adds a global function window.Copilot(command, argument) that lets your website control the chat. Command Argument Returns Description open none nothing Opens the chat window. close none nothing Closes the chat window. toggle none nothing Opens the chat if it is closed, closes it if it is open. inviteMessage { text, delay } nothing Shows an invite message: a greeting bubble next to the chat button. delay is in milliseconds. It is only shown when the visitor has no open conversation and the chat is closed. isReady none true / false Whether the widget has finished loading. isOpen none true / false Whether the chat window is open. onReady function nothing Calls your function when the widget has loaded. onOpen function nothing Calls your function every time the chat opens. onClose function nothing Calls your function every time the chat closes. onMessage function nothing Calls your function for every new message from the assistant. open, close, toggle and inviteMessage do nothing until the widget is ready, so call them from onReady or after checking isReady. Examples Open the chat from your own button: <button onclick="window.Copilot && window.Copilot('open')">Chat with us</button> Show an invite on property pages after 10 seconds: window.Copilot('onReady', function () { if (location.pathname.indexOf('/property') === 0) { window.Copilot('inviteMessage', { text: 'Questions about this property? Ask me anything 😊', delay: 10000 }); } }); Open the chat when the visitor clicks any link pointing to #chat: document.addEventListener('click', function (event) { var link = event.target.closest('a[href="#chat"]'); if (!link || !window.Copilot) return; event.preventDefault(); window.Copilot('open'); }); Events The widget sends four events. You can listen to them in two ways: - With the API: window.Copilot('onReady', fn), onOpen, onClose and onMessage. Your function receives the event details as its argument. - The details are in event.detail. This also works in code that runs before embed.js has loaded. Event When Details ready The widget has loaded and the API commands work. { token } open The chat window opens, by the visitor or through the API. {} close The chat window closes. {} message A new message from the assistant arrives. { text, messageId, timestamp } The browser event names have no separator between Estatebud_Copilot and the event name: it is Estatebud_Copilotopen, not Estatebud_Copilot_open. Details of the message event Field Type Description text string The message text (may contain Markdown, e.g. **bold** and lists). messageId string Unique id of the message. timestamp number Time the message was sent, unix format. Messages shown again when the visitor reloads a page do not fire message; only new ones do. Example: send events to Google Analytics window.Copilot('onOpen', function () { gtag('event', 'copilot_open'); }); window.Copilot('onClose', function () { gtag('event', 'copilot_close'); }); window.Copilot('onMessage', function (data) { gtag('event', 'copilot_reply', { message_id: data.messageId }); }); The same works with any other analytics or tag manager, e.g. by pushing to dataLayer: window.Copilot('onOpen', function () { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: 'copilot_open' }); }); Troubleshooting Problem Solution window.Copilot is undefined. embed.js has not run yet. Copilot('open') does nothing. The widget is not ready yet. Call it inside Copilot('onReady') . message does not fire for old messages. That is expected: it only fires for new assistant messages, not for messages shown again after a page reload. Copilot('inviteMessage', …) shows nothing. The invite is only shown when the visitor has no open conversation and the chat is closed. Check that text is not empty and that delay is in milliseconds.

Last updated on Nov 10, 2026

How Copilot conversations work

This article explains what the Copilot assistant does during a conversation with a visitor, how it follows up and closes conversations, and what your team receives afterwards. To add the widget to your website, see Installing and configuring the Copilot widget. What the assistant can do - Search your listings by area, type, price, bedrooms, features and more, and show results as cards. It understands your own area names and widens the search when nothing matches. - Answer questions about a listing, such as: price, features, location, distances to places nearby, photos and floor plans. - Recognise the page the visitor is on, so "is this one still available?" refers to the listing they are looking at. - Find similar properties to a listing. - Answer questions about your company, such as services, offices and opening hours. - Explain general topics such as how buying, renting or mortgages usually work. - Collect leads (name, email and/or phone) and pass them on to Estatebud. - Handle seller enquiries from owners who want to sell or rent out a property. The assistant replies in the language the visitor writes in, and speaks on behalf of your company. How actively it asks for contact details depends on your widget's approach setting (relaxed, balanced or persistent). See Installing and configuring the Copilot widget. Location - For "near me" searches, the assistant can ask for the visitor's location. The browser asks the visitor for permission first. Transcript emails A few minutes after a conversation ends, the transcript recipients set for your widget receive an email with: - a short summary of what the visitor wanted; - the contact details the visitor gave (name, email and phone); - the full conversation history, plus visitor activity events; - the visitor's rating, if they left one. If the assistant asked for contact details because the visitor wanted something only your team can provide, such as a viewing or an answer to a question, but none were given, the summary says so: "Contact details requested but not provided." Privacy and security - The widget only loads on your registered domains. - Before chatting, visitors see a short notice with a link to your privacy policy and a note that answers are AI-generated. - The widget runs in its own frame, so it does not interfere with your website's styles or scripts. Troubleshooting Problem Solution The assistant says a listing is no longer available. The listing is unpublished or archived in Estatebud, or its page on your website returns "not found". Publish it again if it should be available. Distances to nearby places are approximate. The listing has no map location in Estatebud, so distances are measured from the centre of its area. Add a map location to the listing for exact distances. Transcript emails do not arrive. Ask Estatebud to check the transcript recipients for your widget, and check your spam folder. Transcripts are sent a few minutes after a conversation ends. Times in transcripts are wrong. Ask Estatebud to change your widget's timezone.

Last updated on Nov 10, 2026