Manage conversational AI dashboard configuration including chart visibility and data collection settings for workspace-wide analytics.
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient({ apiKey: "your-api-key" });
// Access this API via: client.conversationalAi.dashboard.settingsRetrieve current dashboard settings for the workspace.
/**
* Retrieve ConvAI dashboard settings for the workspace
* @param requestOptions - Optional request configuration
* @returns Dashboard settings including chart configurations
* @throws UnprocessableEntityError if request fails
*/
client.conversationalAi.dashboard.settings.get(
requestOptions?: RequestOptions
): HttpResponsePromise<GetConvAiDashboardSettingsResponseModel>;
interface GetConvAiDashboardSettingsResponseModel {
/** Array of dashboard chart configurations */
charts?: DashboardChartItem[];
}
type DashboardChartItem =
| { type: "call_success"; /* call success chart config */ }
| { type: "criteria"; /* criteria chart config */ }
| { type: "data_collection"; /* data collection chart config */ };Update dashboard settings for the workspace.
/**
* Update ConvAI dashboard settings for the workspace
* @param request - Dashboard settings to update
* @param requestOptions - Optional request configuration
* @returns Updated dashboard settings
* @throws UnprocessableEntityError if validation fails
*/
client.conversationalAi.dashboard.settings.update(
request?: PatchConvAiDashboardSettingsRequest,
requestOptions?: RequestOptions
): HttpResponsePromise<GetConvAiDashboardSettingsResponseModel>;
interface PatchConvAiDashboardSettingsRequest {
/** Array of chart configurations to set */
charts?: DashboardChartItemInput[];
}
type DashboardChartItemInput =
| { type: "call_success"; /* call success chart config */ }
| { type: "criteria"; /* criteria chart config */ }
| { type: "data_collection"; /* data collection chart config */ };The dashboard supports three types of charts:
Displays metrics related to successful agent calls and completion rates.
Shows performance against defined success criteria and evaluation metrics.
Visualizes collected data from agent interactions and user inputs.
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient({ apiKey: "your-api-key" });
// Retrieve current dashboard configuration
const settings = await client.conversationalAi.dashboard.settings.get();
console.log("Current dashboard configuration:");
if (settings.charts) {
console.log(`Number of charts: ${settings.charts.length}`);
settings.charts.forEach((chart, idx) => {
console.log(`Chart ${idx + 1}: ${chart.type}`);
});
} else {
console.log("No charts configured");
}// Update dashboard settings
const updatedSettings = await client.conversationalAi.dashboard.settings.update({
charts: [
{ type: "call_success" },
{ type: "criteria" },
{ type: "data_collection" },
],
});
console.log("Dashboard updated successfully");
console.log(`Active charts: ${updatedSettings.charts?.length ?? 0}`);// Clear all dashboard charts
const clearedSettings = await client.conversationalAi.dashboard.settings.update({
charts: [],
});
console.log("All dashboard charts cleared");// Check if specific chart type is enabled
async function isChartEnabled(chartType: string): Promise<boolean> {
const settings = await client.conversationalAi.dashboard.settings.get();
return settings.charts?.some(chart => chart.type === chartType) ?? false;
}
const hasCallSuccess = await isChartEnabled("call_success");
console.log(`Call success chart enabled: ${hasCallSuccess}`);// Add a new chart while preserving existing ones
async function addChart(newChartType: string): Promise<void> {
// Get current settings
const current = await client.conversationalAi.dashboard.settings.get();
// Add new chart if not already present
const charts = current.charts || [];
const alreadyExists = charts.some(chart => chart.type === newChartType);
if (!alreadyExists) {
await client.conversationalAi.dashboard.settings.update({
charts: [...charts, { type: newChartType as any }],
});
console.log(`Added ${newChartType} chart to dashboard`);
} else {
console.log(`${newChartType} chart already exists`);
}
}
await addChart("criteria");// Remove a specific chart type
async function removeChart(chartTypeToRemove: string): Promise<void> {
const current = await client.conversationalAi.dashboard.settings.get();
if (current.charts) {
const filtered = current.charts.filter(
chart => chart.type !== chartTypeToRemove
);
await client.conversationalAi.dashboard.settings.update({
charts: filtered,
});
console.log(`Removed ${chartTypeToRemove} chart from dashboard`);
}
}
await removeChart("data_collection");// Reset dashboard to default configuration with all chart types
async function resetDashboard(): Promise<void> {
const defaultCharts = [
{ type: "call_success" },
{ type: "criteria" },
{ type: "data_collection" },
] as const;
await client.conversationalAi.dashboard.settings.update({
charts: defaultCharts as any,
});
console.log("Dashboard reset to default configuration");
}
await resetDashboard();// Get all configured chart types
async function getChartTypes(): Promise<string[]> {
const settings = await client.conversationalAi.dashboard.settings.get();
return settings.charts?.map(chart => chart.type) ?? [];
}
const chartTypes = await getChartTypes();
console.log("Active chart types:", chartTypes);Workspace-Wide Settings: Dashboard settings apply to the entire workspace and affect all team members' views.
Chart Selection: Enable only the charts that provide value for your monitoring needs to avoid dashboard clutter.
Regular Review: Periodically review dashboard settings to ensure they align with current analytics needs.
Incremental Changes: When updating charts, retrieve current settings first to avoid accidentally removing existing configurations.