DocumentationAPI ReferenceReact SDKRelease Notes
ScaleAI

Getting Started

OverviewInstallationQuick Start

Core

Provider & Setup

Hooks

AgentsOutbound CallsCall HistoryPhone NumbersIntegration CredentialsWebhooksKnowledge BasesFunction ToolsFunction Logs

Realtime

Realtime

UI

Components

Reference

TypesUtilities
Go to platform

Components

Add managed call-history views or compose the SDK's presentation components.

The UI entry point provides a managed call-history list and detail panel, plus smaller components for custom layouts. Import the SDK stylesheet once; see Installation.

Managed call-history list

CallHistoryList combines query, filter, table, pagination, and CSV export behavior:

import { CallHistoryList } from "@scalereal/sr-voice-engine-react-sdk/ui";

export function CallsPanel() {
  return (
    <CallHistoryList
      initialParams={{ page: 1, size: 20 }}
      onSelectCall={(call) => console.log("Selected", call.id)}
    />
  );
}

Props:

  • initialParams seeds the filter hook with ListCallHistoryParams (including custom_attributes filters).
  • visibleFilters selects from search, status, direction, and dateRange; all are shown by default.
  • pageSizeOptions defaults to [10, 20, 50].
  • onSelectCall receives the selected CallHistory row.
  • onExportCSV replaces the default CSV exporter; onError receives export errors.
  • className styles the outer wrapper; emptyMessage changes the no-results text.

Call detail panel

CallDetails fetches and renders the selected call, summary, metrics, transcript, recording player, and export buttons:

import { CallDetails } from "@scalereal/sr-voice-engine-react-sdk/ui";

export function CallPanel({ callSessionId }: { callSessionId: string }) {
  return <CallDetails callSessionId={callSessionId} colorScheme="auto" />;
}

CallDetails accepts callSessionId, colorScheme (light, dark, or auto), optional renderAudioPlayer(callSessionId), CSV/PDF export overrides, onError, and className.

Compose a custom layout

  • CallHistoryTable renders provided CallHistory[]. Pass isLoading, sortField, sortDirection, onSort, onSelectCall, emptyMessage, and className as needed. It does not fetch data.
  • TranscriptView renders stored or realtime TranscriptMessage[]. Pass showTimestamps, emptyMessage, and className to customize it.
  • AudioPlayer loads a recording for a callSessionId. It accepts colorScheme, onError, and className.
  • ExportButtons accepts calls for CSV and call for PDF; omit a value to hide that action. Pass custom exporters with onExportCSV or onExportPDF, plus onError and className.
  • StatusBadge styles call status, direction, or sentiment text. It accepts status, optional replacement children, and className.

For complete control, pair useCallHistoryFilters with useCallHistory and render CallHistoryTable yourself. See Call History.

Imports

Import components from the /ui subpath to keep UI imports explicit:

import {
  AudioPlayer,
  CallDetails,
  CallHistoryList,
  CallHistoryTable,
  ExportButtons,
  StatusBadge,
  TranscriptView,
} from "@scalereal/sr-voice-engine-react-sdk/ui";

Component imports come from the /ui entry point only — the package root is the SDK core and does not re-export components. UI components require the stylesheet import @scalereal/sr-voice-engine-react-sdk/css.

Related pages

  • Call History Compose hooks, filters, and exports.
  • Provider & Setup Provide query and service context.
  • Realtime Render live transcript updates.
  • Theming and style customization Import and configure SDK styles.

Realtime

Stream live call transcripts over WebSocket and track post-call processing stages over SSE.

Types

Domain models, request parameters, and common response types.

On this page

Managed call-history listCall detail panelCompose a custom layoutImportsRelated pages