TypeScript SDK
Verticals
Domain taxonomy for analysis and streaming
A vertical selects which domain taxonomy and KPI set the API applies. Pass it on any analysis or streaming call via the vertical option.
Usage
const result = await client.analyze(audio, {
vertical: 'contact_center',
sessionId: 'sess_123',
});
console.log(result.vertical_analysis?.state);
console.log(result.kpi_predictions);The same option works on createStream() and createRealtimeStream().
Values
| Vertical |
|---|
contact_center |
healthcare |
sales |
education |
hr_interviews |
media_entertainment |
finance |
legal |
States, metrics, and KPI IDs depend on your org configuration. Read vertical_analysis and kpi_predictions from live responses.
Example shape
result.vertical_analysis = {
vertical: 'contact_center',
state: 'frustrated',
metrics: { /* org-specific */ },
alerts: [{ metric: 'escalation_risk', value: 0.71, threshold: 0.5 }],
};Vertical configuration is managed in the dashboard. The SDK forwards the vertical string only.
Session outcomes
After a call ends, send labeled outcomes so KPIs can learn from production data:
await client.submitSessionOutcome({
sessionId: 'sess_123',
outcomes: [
{ kpi_id: 'final_csat', scalar_value: 2.0 },
{ kpi_id: 'escalated', boolean_value: true },
],
notes: 'Transferred to supervisor',
});