Skip to main content

Documentation Index

Fetch the complete documentation index at: https://orbit-docs.devotel.io/llms.txt

Use this file to discover all available pages before exploring further.

Web SDK

The Devotel Web SDK (@devotel/orbit-web) is the browser-side SDK that powers the embeddable Orbit Chat widget, AI agent surfaces, and the WebRTC softphone. It ships as a native ES module + a UMD build, has no peer-dependency on a framework (works in vanilla, React, Vue, Svelte, Solid), and uses Web Push (VAPID) for re-engagement notifications.

Installation

npm install @devotel/orbit-web
Or via CDN:
<script type="module" src="https://cdn.jsdelivr.net/npm/@devotel/orbit-web/dist/orbit.es.js"></script>

Quick Start

<!doctype html>
<html>
  <head>
    <script type="module">
      import { OrbitWeb } from '@devotel/orbit-web';

      const orbit = new OrbitWeb({
        publicKey: 'dv_pub_live_your_public_key_here',
        // optional — identify the visitor for personalised AI agent context
        identity: { id: 'user_42', email: 'user@example.com' },
      });

      // Mount the chat widget on the page
      orbit.chat.mount('#orbit-chat');

      // Make a programmatic call from a click handler
      document.querySelector('#call-sales').addEventListener('click', () => {
        orbit.softphone.call('+18005551234');
      });
    </script>
  </head>
  <body>
    <div id="orbit-chat"></div>
    <button id="call-sales">Call sales</button>
  </body>
</html>

Modules

Chat widget

Embeds the same Inbox-backed live chat that operators see on the dashboard. The widget supports text, file uploads, typing indicators, AI-agent fallback, and human-handoff escalation.
orbit.chat.mount('#orbit-chat', {
  agent: 'agent_support',
  greeting: 'Hi! How can we help?',
  position: 'bottom-right',
});

Softphone (WebRTC voice)

A LiveKit-backed softphone that places outbound PSTN calls or joins inbound voice flows. Call control hooks into Orbit’s voice routing rules (IVR, AI agent, human handoff).
const session = await orbit.softphone.call('+14155552671', {
  callerId: '+18005551234',
});

session.on('ringing', () => console.log('Ringing'));
session.on('answered', () => console.log('Answered'));
session.on('ended', (reason) => console.log('Ended:', reason));

Web Push subscriptions

// Request browser permission and register the device with Orbit
const sub = await orbit.push.subscribe({ topics: ['order_updates'] });
console.log('Subscribed:', sub.endpoint);

Personalisation events

orbit.events.track('checkout_started', { cart_total_cents: 14999 });
orbit.events.identify('user_42', { plan: 'business' });

Configuration

OptionTypeDefaultDescription
publicKeystringYour Devotel public key (dv_pub_live_*) — required. NEVER ship a secret key in browser code.
identity{ id, email?, traits? }Optional visitor identity for personalisation + auto-routing.
baseUrlstringhttps://orbit-api.devotel.io/api/v1API base URL.
theme'light' | 'dark' | 'system''system'Widget theme.
localestringbrowser defaultUI language for the chat widget.

Source

For server-side / private-key operations (sending messages on behalf of the user, accessing PII, etc.) use the Node.js SDK — never the Web SDK with a secret key.

Authentication

Web SDK uses public keys only (dv_pub_live_*). Public keys are scoped to messaging surfaces that are safe to expose in browser code: chat widget submission, softphone signalling, push subscription registration, personalisation events. They cannot send messages on behalf of arbitrary recipients, mutate billing, or access PII. See the authentication guide for the full scope matrix.