Office Chat feature
JavaScript API for the chat widget
Control the widget from your own code: open it from a Help button, hide it on checkout, identify users and listen for new messages.
What you can call
- open and close the chat window, show and hide the launcher.
- identify a signed-in user (id, email, name, custom details, and the verification hash), and logout to clear them on shared computers.
- setAttributes to update details mid-session.
- startConversation with text already in the message box, for "Ask about this product" buttons.
- Listen for unread (with the count), open, close and message events.
Common uses
Open chat from a "Talk to us" link in your footer. Hide the launcher on your checkout page so it doesn't cover the Pay button. Show your own unread badge in your app's header. Prefill "I have a question about the Pro plan" from a button on the pricing page.
Example
A button on every product page
An outdoor gear store adds an "Ask about this item" button under each product. Clicking it starts a conversation with "Question about: Trailhead 40L pack" already typed, so the agent knows which product it is before the visitor finishes the sentence. On the checkout page the store hides the launcher and shows it again on the order confirmation page.
How to set it up
- 1
Install the widget.
- 2
Copy the calls you need from the JavaScript API reference in Settings > Widget > Installation.
- 3
Test them on the test-drive page or your staging site.
JavaScript API for the chat widget is part of Office Chat and included on every plan.
More Chat features
- Identity verification for signed-in usersTell the widget who your signed-in user is, and sign it on your server, so nobody can pretend to be a customer and read their conversations.
- Live chat widget for your websiteOne script tag puts a chat bubble on every page of your site. Everything after that is changed from your dashboard.
- Webhooks and REST APIGet a signed POST when something happens in chat, and read or write conversations and contacts with an API key.
- Answer chats from your phoneThe inbox works on your phone, with push notifications for new chats and mentions, so you can answer from wherever you are.
Compare
- Olark alternativeCompare Office Chat and Olark: $29 per agent against one flat team price, plus routing, email follow-ups and visitor details. Checked November 2026.
- Drift alternativeDrift is now part of Salesloft and sold through a sales call. Compare it with Office Chat: public pricing, website chat and routing for small teams.
- Intercom alternativeCompare Office Chat and Intercom for website chat: round robin, branding, Lite seats and what 10 agents pay per year. Prices checked November 2026.
Try Office Chat with your whole team
7-day trial with every feature. Cancel from the billing page whenever you like.