Live Chat
Chat in real time with the people using your apps and websites. They don't need an account to write to you.
Get started
Add Live Chat for your app
In the App Store, click Add on Live Chat and pick the app. Each app gets its own.
Put the chat in your app or website
Pick your platform. On a website that already has the Affiliateo code, there's nothing to install.
Show the bubble
HTML<!-- The Affiliateo code you already have: the bubble shows by itself --> <script defer data-app="YOUR_APP_ID" src="https://affiliateo.com/t.js" ></script>
Or open it from your own button
HTML<button onclick="window.AffiliateoChat && AffiliateoChat.open()">Chat with us</button>
Answer from your dashboard
Open the app's Live Chat in your sidebar. Chats waiting for a reply come first.
Calls
| What it does | Swift and Kotlin | Flutter | React Native | Website (npm) |
|---|---|---|---|---|
| Show the bubble | Affiliateo.showChatBubble() | AffiliateoChat(child: child!) | <AffiliateoChat /> | showChatBubble() |
| Hide the bubble on this screen | Affiliateo.hideChatBubble() | AffiliateoChat(visible: false) | - | hideChatBubble() |
| Open the chat from your own button | Affiliateo.openChat() | Affiliateo.openChat(context) | useAffiliateoChat().openChat() | openChat() |
| Is the chat on for this app? | Affiliateo.chatAvailable() | Affiliateo.chatAvailable() | useAffiliateoChat().enabled | - |
| Your own look (wins over the dashboard) | Affiliateo.setChatBubbleLook(color: "#7C3AED") | AffiliateoChat(color: Color(0xFF7C3AED)) | <AffiliateoChat color="#7C3AED" /> | data-chat-color="#7C3AED" |
| Your own placeholder text | Affiliateo.setChatPlaceholder("Ask us anything") | AffiliateoChat(placeholder: 'Ask us anything') | <AffiliateoChat placeholder="Ask us anything" /> | data-chat-placeholder="Ask us anything" |
| Your own wiggle time in seconds (0 turns it off) | Affiliateo.setChatBubbleWiggle(seconds: 20) | Affiliateo.setChatBubbleWiggle(seconds: 20) | <AffiliateoChat wiggleSeconds={20} /> | data-chat-wiggle="20" |
| Keep the bubble above your tab bar | Affiliateo.setChatBubblePadding(bottom: 60) | AffiliateoChat(bottomPadding: 60) | - | - |
| Name the screen, for Where it shows | Affiliateo.page("settings") | Affiliateo.page('settings') | useAffiliateoScreen('settings') | - |
| Let sheets you draw in Compose cover it | Affiliateo.chatBubbleLayer(context) | - | - | - |
| Start a fresh chat after sign-out | Affiliateo.logout() | Affiliateo.logout() | logout() | logout() |
Kotlin's openChat takes the screen: openChat(activity), and chatBubbleLayer is Kotlin only: put it under the sheets you draw in Compose. In React Native, leave <AffiliateoChat /> out where the bubble shouldn't show. With the script tag, the website calls are AffiliateoChat.show(), .hide() and .open(), and pages are matched by their address.
Where it shows
- In the Live Chat settings, Where it shows opens a checklist of the pages and screens people visited in the last 30 days, most visited first: the same list your funnels use. Pick every page and screen, only the ones you check, or everywhere except the ones you uncheck.
- Websites are matched by the page address, with nothing to add: /pricing, or /blog/* for a whole section (it matches /blog too). Capitals and a trailing slash don't matter.
- Apps are matched by the screen names they send with Affiliateo.page() (in React Native, useAffiliateoScreen). Give each main screen a short name that stays the same, like today or settings. A screen the app never names doesn't show the bubble under "Only on the ones I check".
- Up to 50 pages and screens, each up to 200 characters. Add one by hand before anyone has visited it.
- On the API and the MCP it's page_mode (all, only or except) and page_rules; list_funnel_candidates gives the pages and screens people visited.
Who answers
- Only you see a Live Chat until you let your whole team in, or pick team members and affiliates, from its visibility setting. Affiliates never see visitors' emails and can't send links.
- Let your team in and every team member allowed to answer Live Chat sees every chat of that app, and every reply. In Team you choose who may answer Live Chat (moderators and up at first) and which apps each person answers.
- Under "Private + team" you can add affiliates too: they answer that app's chats beside your team, with an affiliate's limits (no visitor emails, no links).
- Turn on "Let people request access" under "Private + people you pick" and team members and the app's affiliates who can't open the Live Chat see a Request access button; under "Private + team + people you pick", the app's affiliates do. Approve adds them to the people you picked and tells them. Deny tells nobody, and they can ask again after an hour.
- Everyone starts offline, you included: each person turns on their own Online / Offline switch. You show as online while it says Online, Affiliateo is open, and you've been active in it in the last 15 minutes. The chat shows as online while at least one person who answers is online.
- Online / Offline only changes what visitors see: when nobody who answers is online, the green dot goes and your offline message shows. Chats still come in, and you're still notified.
- Everyone who answers is notified of a new chat until someone takes it. After that, only that person and you are.
- The first person to reply takes the chat: everyone else sees who is answering, and it moves to that person's Mine list.
- While a teammate types a reply you see "Ana is typing…". Once someone has taken a chat, your reply box waits behind Reply anyway, so two people don't answer at once.
- Turn on "Affiliates answer their own visitors" and each affiliate answers only the people who came through their link. Visitors who came with no affiliate link go only to you and your team. They see only messages sent after you turn it on, and turning it off and on again starts fresh.
- When an affiliate who answers their own visitors is online, they get 30 seconds to answer first, from their visitor's first message nobody has answered. Once they reply, the chat stays theirs while they're online; if they only start typing, it opens to everyone again after 2 minutes with nothing sent. You are never held.
- For a visitor an affiliate brought, that affiliate being online lights the green dot too, even while you're offline.
- An affiliate you pick under "Private + people you pick" sees every chat of that app, not only their own visitors.
Notifications
- When you reply, the person gets a notification on their phone with your app's name and your message, like a text message. A tap opens the chat on top of the screen they were on.
- Swift and Kotlin: the SDK shows a real notification by itself, with your app open or closed. While the chat is open on screen nothing shows, because they already see your reply.
- React Native and Flutter: while your app is closed or in the background, the phone shows the notification by itself. While your app is open, the SDK shows its own banner at the top of the screen for 5 seconds, and a tap opens the chat. Set inAppBanner to false if your app shows chat notifications itself.
- While your app is closed, the reply comes as a push. Your app needs push notifications turned on, and it gives the SDK its push token. Today these pushes are sent with Affiliateo's own Apple and Firebase keys, so they only reach apps set up with Affiliateo. Sending with your own keys will come later.
- Swift: give the token to Affiliateo.setChatPushToken(deviceToken). In willPresent, return Affiliateo.chatNotificationPresentation(for: notification). In didReceive, call Affiliateo.handleChatNotification(response). Right after the person allows notifications, call Affiliateo.chatNotificationsAllowed().
- Kotlin: give the Firebase token to Affiliateo.setChatPushToken(token). In your messaging service, call Affiliateo.handleChatPush(context, data). In your activity, call Affiliateo.handleChatIntent(activity, intent). Right after the person allows notifications, call Affiliateo.chatNotificationsAllowed(context).
- React Native: call registerChatPushToken(token) with the token from your push library. When the person taps a notification, pass its data to handleChatNotification(data): it opens the chat when it was a chat reply. Right after the person allows notifications, call chatNotificationsAllowed().
- Flutter: call Affiliateo.registerChatPushToken(token, platform) with the token from your push library. When the person taps a notification, pass its data to Affiliateo.handleChatNotification(data): it opens the chat when it was a chat reply. Right after the person allows notifications, call Affiliateo.chatNotificationsAllowed().
- Capacitor and Cordova (the m.js script): it works like React Native. Call Affiliateo.registerChatPushToken(token, platform, { bundleId }) with the token from your push plugin. When the person taps a notification, pass its data to Affiliateo.handleChatNotification(data). Right after the person allows notifications, call Affiliateo.chatNotificationsAllowed(). To turn the banner off, add chatInAppBanner: false to Affiliateo.configure().
- iPhone with Firebase Messaging: the push carries Firebase's message id, so a tap should reach Firebase's own opened-from-notification callbacks, where you call handleChatNotification. Try the tap on a real iPhone before you ship.
- Your greeting comes as a notification too: once, right after the person allows notifications, if they have not opened the chat yet. It is in their language when you wrote the greeting in that language.
- You need SDK 4.17.0 or later for Swift, Kotlin, React Native or Flutter. The m.js script for Capacitor and Cordova is always the newest. Websites get no notifications.
Closer commission
- Pay whoever answers a customer in Live Chat when that customer buys within 60 days: a percent of each payment (1 to 25%) or a fixed amount ($0.01 to $50), renewals included. Turn it on in the affiliate app's settings, or with update_app on the API and the MCP (closer_bonus_type and closer_bonus_rate).
- A sale counts when the customer chatted through this Live Chat on the same phone or browser that buys, and Affiliateo tracks the purchase. To match on your app's own user id, call identify(userId) before the chat starts.
- The first person to reply earns it, unless the customer waited 10 minutes and someone else took over. You never earn it yourself, a refund takes it back, and a sale no affiliate brought carries Affiliateo's 1% fee.
Set it up with the API, the MCP or your code
The API and the MCP save to your dashboard, and every website and app follows at once. Your app's or website's own code changes only that app or website, and wins there.
| What it does | Dashboard | API and MCP | Your code |
|---|---|---|---|
| Add a Live Chat for an app, its name and icon | - | ||
| Turn it on or off | Hide or show the bubble | ||
| Greeting, red 1 and offline message | - | ||
| Placeholder text | |||
| Languages (add, edit, remove) | - | ||
| Corner, size, style and colors | |||
| How often the bubble wiggles | |||
| Which pages and screens | Hide or show the bubble | ||
| Who answers, and the affiliates switch | - | ||
| A team member's permission and apps | - | ||
| Your Online / Offline switch | - | ||
| Answering chats | - | - |
API: GET and PATCH /api/v1/businesses/:slug/live-chat/settings, GET and PUT /api/v1/businesses/:slug/live-chat/availability for your Online / Offline switch, and GET /api/v1/businesses/:slug/live-chat/access-requests with POST …/access-requests/:requestId/approve or …/deny for the requests to answer. MCP: get_live_chat_settings, update_live_chat_settings, get_live_chat_availability, set_live_chat_availability, list_live_chat_access_requests, approve_live_chat_access_request and deny_live_chat_access_request; add a Live Chat with add_sidebar_app (app_slug live_chat and app_id). API reference
Good to know
- Each app has its own Live Chat: its own row in the sidebar, its own chats and its own settings.
- Drag another Live Chat from the sidebar into the page to answer several apps side by side.
- The greeting, offline message, placeholder text, languages, the bubble's corner, size, style and colors, and where it shows all change from the gear, live, with no app update.
- Set the bubble's color, icon color, style (solid or glass), corner and size, and the chat's send button color, in your code and it wins over the dashboard; anything you leave out keeps the dashboard's choice. On a website, add data-chat-color, data-chat-icon-color, data-chat-send-color, data-chat-style, data-chat-corner or data-chat-size to the Affiliateo script.
- Write the greeting, offline message and placeholder text in each language from Languages in the settings: visitors see their language's version, or the main text. In code, pass the placeholder text in your app's own translation.
- Sheets and pop-ups your app opens cover the bubble, and it's back when they close. On Android, sheets you draw inside a Compose screen cover it once Affiliateo.chatBubbleLayer() sits under them.
- Visitors can't send links, but they can leave their email so you can write back.