Attach predefined metrics to a project
Changed onCopy one or more predefined metrics (e.g. Voice Tone + Clarity, Latency, CSAT) into a project so they evaluate its calls. Pass project_id and either predefined_metric_ids or metric_codes from the predefined metrics list. Use this to add these built-in metrics — they cannot be created through the metrics create endpoint.
Request
- Base URLhttps://api.cekura.ai
- URLhttps://api.cekura.ai/test_framework/v1/predefined-metrics/copy/
- Auth
- API key in header X-CEKURA-API-KEY
- or HTTP bearer
- or HTTP bearer
Request body
IDs of the predefined metrics to attach. Get these from the predefined metrics list.
Codes of the predefined metrics to attach. Provide this or predefined_metric_ids.
Project to attach the metrics to. Provide either project_id or agent_id, not both.
Agent to attach the metrics to. Provide either project_id or agent_id, not both.
Optional scenario IDs to scope the metrics to (max 1000). Omit to apply across the target.
Response
URL-friendly unique identifier in snake_case format. Example: "customer_satisfaction_1562"
Name of the metric. Example: "Customer Satisfaction" or "Appointment Booking"
Description of what the metric measures. Example: "Measures how satisfied customers are with the service provided"
Predefined function name Example: "get_latency" or "check_critical_deviations"
Type of metric
- basic - Basic (Deprecated in favor of LLM Judge)
- custom_prompt - Custom Prompt ( Deprecated in favor of LLM Judge)
- custom_code - Custom Code
- llm_judge - LLM Judge
- binary - Binary
- continuous_qualitative - Continuous Qualitative
- numeric - Numeric
- enum - Enum
Whether this metric requires audio analysis. Example: true or false
Enable this metric for observability. Example: true or false
Enable this metric for simulations. Example: true or false
Enable sampling for this metric using its sample_rate, or the project sample rate when unset
Sampling rate for this metric (0.0 to 1.0). Overrides the project sample rate when set.
Evaluation prompt for the metric. Example: "Evaluate customer satisfaction based on conversation"
Display order for the metric. Example: 1
- always - Always
- automatic - Automatic
- custom - Custom
- llm_judge - LLM Judge
- custom_code - 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.
Vocera defined metric code for the metric. Example: "7fd534f5"
List of knowledge base file IDs for the metric. Example: [123, 456]
Metric Cost Example: 0.10
- disabled - Alerts Disabled
- normal - Normal Alerts
- significant_change - Significant Change Alerts
Alert status: enabled or disabled.
- enabled - Enabled
- disabled - Disabled
Alert direction: increase only, decrease only, or both (empty = both). Example: "increase", "decrease", or "both"
- `` - Both (Increase and Decrease)
- increase - Increase Only
- decrease - Decrease Only
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.
Slack workspace to send alerts to
Override channel ID for this metric's alerts
Whether this metric produces an LLM-judge narrative: a custom_code metric whose code delegates to the LLM judge internally. Computed server-side because the custom_code body is write-only and not exposed on read. Example: true
Changes
- info
endpoint added
- info