curl --request POST \
--url https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"slug": "<string>",
"project": 123,
"agents": [
123
],
"description": "<string>",
"enum_values": "<unknown>",
"audio_enabled": true,
"prompt": "<string>",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"observability_enabled": true,
"simulation_enabled": true,
"sampling_enabled": true,
"alert_enabled": true,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"scenarios": "<unknown>",
"add_to_new_agents": true
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/"
payload = {
"name": "<string>",
"slug": "<string>",
"project": 123,
"agents": [123],
"description": "<string>",
"enum_values": "<unknown>",
"audio_enabled": True,
"prompt": "<string>",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"observability_enabled": True,
"simulation_enabled": True,
"sampling_enabled": True,
"alert_enabled": True,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"scenarios": "<unknown>",
"add_to_new_agents": True
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
project: 123,
agents: [123],
description: '<string>',
enum_values: '<unknown>',
audio_enabled: true,
prompt: '<string>',
evaluation_trigger_prompt: '<string>',
evaluation_trigger_custom_code: '<string>',
priority_assignment_prompt: '<string>',
configuration: '<unknown>',
observability_enabled: true,
simulation_enabled: true,
sampling_enabled: true,
alert_enabled: true,
alert_type: 'disabled',
alert_filters: '<unknown>',
slack_workspace: 123,
slack_channel_id: '<string>',
function_name: '<string>',
custom_code: '<string>',
vocera_defined_metric_code: '<string>',
scenarios: '<unknown>',
add_to_new_agents: true
})
};
fetch('https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'project' => 123,
'agents' => [
123
],
'description' => '<string>',
'enum_values' => '<unknown>',
'audio_enabled' => true,
'prompt' => '<string>',
'evaluation_trigger_prompt' => '<string>',
'evaluation_trigger_custom_code' => '<string>',
'priority_assignment_prompt' => '<string>',
'configuration' => '<unknown>',
'observability_enabled' => true,
'simulation_enabled' => true,
'sampling_enabled' => true,
'alert_enabled' => true,
'alert_type' => 'disabled',
'alert_filters' => '<unknown>',
'slack_workspace' => 123,
'slack_channel_id' => '<string>',
'function_name' => '<string>',
'custom_code' => '<string>',
'vocera_defined_metric_code' => '<string>',
'scenarios' => '<unknown>',
'add_to_new_agents' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"project\": 123,\n \"agents\": [\n 123\n ],\n \"description\": \"<string>\",\n \"enum_values\": \"<unknown>\",\n \"audio_enabled\": true,\n \"prompt\": \"<string>\",\n \"evaluation_trigger_prompt\": \"<string>\",\n \"evaluation_trigger_custom_code\": \"<string>\",\n \"priority_assignment_prompt\": \"<string>\",\n \"configuration\": \"<unknown>\",\n \"observability_enabled\": true,\n \"simulation_enabled\": true,\n \"sampling_enabled\": true,\n \"alert_enabled\": true,\n \"alert_type\": \"disabled\",\n \"alert_filters\": \"<unknown>\",\n \"slack_workspace\": 123,\n \"slack_channel_id\": \"<string>\",\n \"function_name\": \"<string>\",\n \"custom_code\": \"<string>\",\n \"vocera_defined_metric_code\": \"<string>\",\n \"scenarios\": \"<unknown>\",\n \"add_to_new_agents\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"project\": 123,\n \"agents\": [\n 123\n ],\n \"description\": \"<string>\",\n \"enum_values\": \"<unknown>\",\n \"audio_enabled\": true,\n \"prompt\": \"<string>\",\n \"evaluation_trigger_prompt\": \"<string>\",\n \"evaluation_trigger_custom_code\": \"<string>\",\n \"priority_assignment_prompt\": \"<string>\",\n \"configuration\": \"<unknown>\",\n \"observability_enabled\": true,\n \"simulation_enabled\": true,\n \"sampling_enabled\": true,\n \"alert_enabled\": true,\n \"alert_type\": \"disabled\",\n \"alert_filters\": \"<unknown>\",\n \"slack_workspace\": 123,\n \"slack_channel_id\": \"<string>\",\n \"function_name\": \"<string>\",\n \"custom_code\": \"<string>\",\n \"vocera_defined_metric_code\": \"<string>\",\n \"scenarios\": \"<unknown>\",\n \"add_to_new_agents\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"project\": 123,\n \"agents\": [\n 123\n ],\n \"description\": \"<string>\",\n \"enum_values\": \"<unknown>\",\n \"audio_enabled\": true,\n \"prompt\": \"<string>\",\n \"evaluation_trigger_prompt\": \"<string>\",\n \"evaluation_trigger_custom_code\": \"<string>\",\n \"priority_assignment_prompt\": \"<string>\",\n \"configuration\": \"<unknown>\",\n \"observability_enabled\": true,\n \"simulation_enabled\": true,\n \"sampling_enabled\": true,\n \"alert_enabled\": true,\n \"alert_type\": \"disabled\",\n \"alert_filters\": \"<unknown>\",\n \"slack_workspace\": 123,\n \"slack_channel_id\": \"<string>\",\n \"function_name\": \"<string>\",\n \"custom_code\": \"<string>\",\n \"vocera_defined_metric_code\": \"<string>\",\n \"scenarios\": \"<unknown>\",\n \"add_to_new_agents\": true\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"eval_type": "binary",
"id": 123,
"slug": "<string>",
"project": 123,
"agents": [
123
],
"description": "<string>",
"type": "basic",
"enum_values": "<unknown>",
"audio_enabled": true,
"prompt": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"overall_score": "<string>",
"total_score": "<string>",
"knowledge_base_files": "<string>",
"observability_enabled": true,
"simulation_enabled": true,
"sampling_enabled": true,
"alert_enabled": true,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"significant_change_alert_status": "enabled",
"significant_change_alert_direction": "",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"reviews": [
{
"metric": 123,
"id": 123,
"test_set": {
"agent": 123,
"id": 123,
"name": "<string>",
"transcript": "<string>",
"voice_recording_url": "<string>",
"call_end_reason": "<string>",
"duration": "<string>",
"source_model": "CallLog",
"source_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"expected_value": "<unknown>",
"actual_value": "<unknown>",
"explanation": "<unknown>",
"feedback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"window_size": 123,
"std_multiplier": 123,
"ewma_alpha": 123,
"add_to_new_agents": true,
"pending_optimisation_proposal": "<unknown>"
}Generate Metric Evaluation Trigger
Use AI to derive an evaluation_trigger for a metric — the condition that decides when the metric should run on a transcript. Prefer this over guessing the trigger by hand.
curl --request POST \
--url https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"slug": "<string>",
"project": 123,
"agents": [
123
],
"description": "<string>",
"enum_values": "<unknown>",
"audio_enabled": true,
"prompt": "<string>",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"observability_enabled": true,
"simulation_enabled": true,
"sampling_enabled": true,
"alert_enabled": true,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"scenarios": "<unknown>",
"add_to_new_agents": true
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/"
payload = {
"name": "<string>",
"slug": "<string>",
"project": 123,
"agents": [123],
"description": "<string>",
"enum_values": "<unknown>",
"audio_enabled": True,
"prompt": "<string>",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"observability_enabled": True,
"simulation_enabled": True,
"sampling_enabled": True,
"alert_enabled": True,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"scenarios": "<unknown>",
"add_to_new_agents": True
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
project: 123,
agents: [123],
description: '<string>',
enum_values: '<unknown>',
audio_enabled: true,
prompt: '<string>',
evaluation_trigger_prompt: '<string>',
evaluation_trigger_custom_code: '<string>',
priority_assignment_prompt: '<string>',
configuration: '<unknown>',
observability_enabled: true,
simulation_enabled: true,
sampling_enabled: true,
alert_enabled: true,
alert_type: 'disabled',
alert_filters: '<unknown>',
slack_workspace: 123,
slack_channel_id: '<string>',
function_name: '<string>',
custom_code: '<string>',
vocera_defined_metric_code: '<string>',
scenarios: '<unknown>',
add_to_new_agents: true
})
};
fetch('https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'project' => 123,
'agents' => [
123
],
'description' => '<string>',
'enum_values' => '<unknown>',
'audio_enabled' => true,
'prompt' => '<string>',
'evaluation_trigger_prompt' => '<string>',
'evaluation_trigger_custom_code' => '<string>',
'priority_assignment_prompt' => '<string>',
'configuration' => '<unknown>',
'observability_enabled' => true,
'simulation_enabled' => true,
'sampling_enabled' => true,
'alert_enabled' => true,
'alert_type' => 'disabled',
'alert_filters' => '<unknown>',
'slack_workspace' => 123,
'slack_channel_id' => '<string>',
'function_name' => '<string>',
'custom_code' => '<string>',
'vocera_defined_metric_code' => '<string>',
'scenarios' => '<unknown>',
'add_to_new_agents' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"project\": 123,\n \"agents\": [\n 123\n ],\n \"description\": \"<string>\",\n \"enum_values\": \"<unknown>\",\n \"audio_enabled\": true,\n \"prompt\": \"<string>\",\n \"evaluation_trigger_prompt\": \"<string>\",\n \"evaluation_trigger_custom_code\": \"<string>\",\n \"priority_assignment_prompt\": \"<string>\",\n \"configuration\": \"<unknown>\",\n \"observability_enabled\": true,\n \"simulation_enabled\": true,\n \"sampling_enabled\": true,\n \"alert_enabled\": true,\n \"alert_type\": \"disabled\",\n \"alert_filters\": \"<unknown>\",\n \"slack_workspace\": 123,\n \"slack_channel_id\": \"<string>\",\n \"function_name\": \"<string>\",\n \"custom_code\": \"<string>\",\n \"vocera_defined_metric_code\": \"<string>\",\n \"scenarios\": \"<unknown>\",\n \"add_to_new_agents\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"project\": 123,\n \"agents\": [\n 123\n ],\n \"description\": \"<string>\",\n \"enum_values\": \"<unknown>\",\n \"audio_enabled\": true,\n \"prompt\": \"<string>\",\n \"evaluation_trigger_prompt\": \"<string>\",\n \"evaluation_trigger_custom_code\": \"<string>\",\n \"priority_assignment_prompt\": \"<string>\",\n \"configuration\": \"<unknown>\",\n \"observability_enabled\": true,\n \"simulation_enabled\": true,\n \"sampling_enabled\": true,\n \"alert_enabled\": true,\n \"alert_type\": \"disabled\",\n \"alert_filters\": \"<unknown>\",\n \"slack_workspace\": 123,\n \"slack_channel_id\": \"<string>\",\n \"function_name\": \"<string>\",\n \"custom_code\": \"<string>\",\n \"vocera_defined_metric_code\": \"<string>\",\n \"scenarios\": \"<unknown>\",\n \"add_to_new_agents\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/metrics/generate_evaluation_trigger/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"project\": 123,\n \"agents\": [\n 123\n ],\n \"description\": \"<string>\",\n \"enum_values\": \"<unknown>\",\n \"audio_enabled\": true,\n \"prompt\": \"<string>\",\n \"evaluation_trigger_prompt\": \"<string>\",\n \"evaluation_trigger_custom_code\": \"<string>\",\n \"priority_assignment_prompt\": \"<string>\",\n \"configuration\": \"<unknown>\",\n \"observability_enabled\": true,\n \"simulation_enabled\": true,\n \"sampling_enabled\": true,\n \"alert_enabled\": true,\n \"alert_type\": \"disabled\",\n \"alert_filters\": \"<unknown>\",\n \"slack_workspace\": 123,\n \"slack_channel_id\": \"<string>\",\n \"function_name\": \"<string>\",\n \"custom_code\": \"<string>\",\n \"vocera_defined_metric_code\": \"<string>\",\n \"scenarios\": \"<unknown>\",\n \"add_to_new_agents\": true\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"eval_type": "binary",
"id": 123,
"slug": "<string>",
"project": 123,
"agents": [
123
],
"description": "<string>",
"type": "basic",
"enum_values": "<unknown>",
"audio_enabled": true,
"prompt": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"overall_score": "<string>",
"total_score": "<string>",
"knowledge_base_files": "<string>",
"observability_enabled": true,
"simulation_enabled": true,
"sampling_enabled": true,
"alert_enabled": true,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"significant_change_alert_status": "enabled",
"significant_change_alert_direction": "",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"reviews": [
{
"metric": 123,
"id": 123,
"test_set": {
"agent": 123,
"id": 123,
"name": "<string>",
"transcript": "<string>",
"voice_recording_url": "<string>",
"call_end_reason": "<string>",
"duration": "<string>",
"source_model": "CallLog",
"source_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"expected_value": "<unknown>",
"actual_value": "<unknown>",
"explanation": "<unknown>",
"feedback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"window_size": 123,
"std_multiplier": 123,
"ewma_alpha": 123,
"add_to_new_agents": true,
"pending_optimisation_proposal": "<unknown>"
}Authorizations
API Key Authentication. It should be included in the header of each request.
Body
Name of the metric.
Example: "Customer Satisfaction" or "Appointment Booking"
255binary- Binarycontinuous_qualitative- Continuous Qualitativenumeric- Numericenum- Enum
binary, continuous_qualitative, numeric, enum URL-friendly unique identifier in snake_case format. Example: "customer_satisfaction_1562"
255Description of what the metric measures.
Example: "Measures how satisfied customers are with the service provided"
Type of metric
basic- Basic (Deprecated in favor of LLM Judge)custom_prompt- Custom Prompt ( Deprecated in favor of LLM Judge)custom_code- Custom Codellm_judge- LLM Judge
basic, custom_prompt, custom_code, llm_judge List of possible enum values for enum type metrics.
Example: ["satisfied", "unsatisfied"]
Whether this metric requires audio analysis.
Example: true or false
Evaluation prompt for the metric.
Example: "Evaluate customer satisfaction based on conversation"
always- Alwaysautomatic- Automaticcustom- Custom
always, automatic, custom Type of trigger evaluation: LLM judge or custom code.
Only used when evaluation_trigger is CUSTOM.
Example: "llm_judge" or "custom_code"
llm_judge- LLM Judgecustom_code- Custom Code
llm_judge, custom_code Evaluation trigger prompt for the metric.
Example: "Evaluate metric only if call ended reason is main-agent-ended-call"
Python custom code to determine metric relevance. Code should set _result (bool) and _explanation (str). Example:
_result = True _explanation = "Metric is relevant" if "call_end_reason" in data and data["call_end_reason"] == "customer-hung-up": _result = False _explanation = "Customer hung up, metric not applicable"
Priority assignment prompt for the metric.
Custom configuration parameters for specific metrics if metric supports it. Example:
- For Infrastructure issues
{ "infra_issues_timeout": 10 }
Enable this metric for observability.
Example: true or false
Enable this metric for simulations.
Example: true or false
Enable sampling for this metric using project-level sample rate
Enable alerts for this metric when it fails (value=false).
Only applicable to binary metrics (eval_type=binary).
For other metric types, use significant_change_alert_status instead.
Example: true or false
disabled- Alerts Disablednormal- Normal Alertssignificant_change- Significant Change Alerts
disabled, normal, significant_change Filters to apply before computing alerts (CallLogQueryFilter format)
Slack workspace to send alerts to
Override channel ID for this metric's alerts
255Alert status: enabled or disabled.
enabled- Enableddisabled- Disabled
enabled, disabled Alert direction: increase only, decrease only, or both (empty = both).
Example: "increase", "decrease", or "both"
- `` - Both (Increase and Decrease)
increase- Increase Onlydecrease- Decrease Only
, increase, decrease Predefined function name
Example: "get_latency" or "check_critical_deviations"
255Python custom code for the metric. Example:
_resul = True _explanation = None if "call_end_reason" in data and data["call_end_reason"] == "customer_satisfaction": _result = True _explanation = "Customer expressed satisfaction with service"
Vocera defined metric code for the metric.
Example: "7fd534f5"
255When enabled, this metric is automatically assigned to new agents created in the project.
Response
Name of the metric.
Example: "Customer Satisfaction" or "Appointment Booking"
255binary- Binarycontinuous_qualitative- Continuous Qualitativenumeric- Numericenum- Enum
binary, continuous_qualitative, numeric, enum URL-friendly unique identifier in snake_case format. Example: "customer_satisfaction_1562"
255Description of what the metric measures.
Example: "Measures how satisfied customers are with the service provided"
Type of metric
basic- Basic (Deprecated in favor of LLM Judge)custom_prompt- Custom Prompt ( Deprecated in favor of LLM Judge)custom_code- Custom Codellm_judge- LLM Judge
basic, custom_prompt, custom_code, llm_judge List of possible enum values for enum type metrics.
Example: ["satisfied", "unsatisfied"]
Whether this metric requires audio analysis.
Example: true or false
Evaluation prompt for the metric.
Example: "Evaluate customer satisfaction based on conversation"
always- Alwaysautomatic- Automaticcustom- Custom
always, automatic, custom Type of trigger evaluation: LLM judge or custom code.
Only used when evaluation_trigger is CUSTOM.
Example: "llm_judge" or "custom_code"
llm_judge- LLM Judgecustom_code- Custom Code
llm_judge, custom_code Evaluation trigger prompt for the metric.
Example: "Evaluate metric only if call ended reason is main-agent-ended-call"
Python custom code to determine metric relevance. Code should set _result (bool) and _explanation (str). Example:
_result = True _explanation = "Metric is relevant" if "call_end_reason" in data and data["call_end_reason"] == "customer-hung-up": _result = False _explanation = "Customer hung up, metric not applicable"
Priority assignment prompt for the metric.
Custom configuration parameters for specific metrics if metric supports it. Example:
- For Infrastructure issues
{ "infra_issues_timeout": 10 }
The overall score for this metric across all test sets
The total score for this metric
Knowledge base files associated with this metric
Enable this metric for observability.
Example: true or false
Enable this metric for simulations.
Example: true or false
Enable sampling for this metric using project-level sample rate
Enable alerts for this metric when it fails (value=false).
Only applicable to binary metrics (eval_type=binary).
For other metric types, use significant_change_alert_status instead.
Example: true or false
disabled- Alerts Disablednormal- Normal Alertssignificant_change- Significant Change Alerts
disabled, normal, significant_change Filters to apply before computing alerts (CallLogQueryFilter format)
Slack workspace to send alerts to
Override channel ID for this metric's alerts
255Alert status: enabled or disabled.
enabled- Enableddisabled- Disabled
enabled, disabled Alert direction: increase only, decrease only, or both (empty = both).
Example: "increase", "decrease", or "both"
- `` - Both (Increase and Decrease)
increase- Increase Onlydecrease- Decrease Only
, increase, decrease Predefined function name
Example: "get_latency" or "check_critical_deviations"
255Python custom code for the metric. Example:
_resul = True _explanation = None if "call_end_reason" in data and data["call_end_reason"] == "customer_satisfaction": _result = True _explanation = "Customer expressed satisfaction with service"
Vocera defined metric code for the metric.
Example: "7fd534f5"
255Reviews associated with the metric
Show child attributes
Show child attributes
Window size for rolling statistics calculation.
Example: 50
Standard deviation multiplier for threshold calculation.
Example: 2.0
Alpha value for exponentially weighted moving average (EWMA) calculation.
Example: 0.1
When enabled, this metric is automatically assigned to new agents created in the project.
Unsaved proposal from a metric-optimiser cron run. Shape: {description, evaluation_trigger, type, custom_code, score, baseline_score, cron_job_id, cron_job_name, proposed_at}.