Create a boolean threshold derived from an existing metric. The source metric is addressed by its UUID or its stable slug. The threshold fires when the source metric meets the comparison condition. Scope and supported contexts are inherited from the source metric.
Documentation Index
Fetch the complete documentation index at: https://docs.roark.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The metric definition's Roark ID (UUID) or its stable slug (e.g. customer_satisfaction).
Input for creating a new threshold derived from a source metric.
Name of the metric
1 - 100"Customer Satisfaction"
Comparison operator
GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, EQUALS, NOT_EQUALS "GREATER_THAN_OR_EQUALS"
Value to compare the source metric against (as a string)
1"4"
Stable slug for the metric. Auto-generated from name if omitted.
1 - 50"customer_satisfaction"
How to aggregate the source metric before applying the comparison (default: EACH)
EACH, COUNT, AVERAGE, MIN, MAX, MEDIAN, P95, P99, SUM Required when aggregationMode is COUNT. The threshold fires when the count is met.
x >= 0When the source metric is per-participant, restrict evaluation to this role. Only valid for sources with TURN/SEGMENT contexts.
AGENT, CUSTOMER, SIMULATED_CUSTOMER, BACKGROUND_SPEAKER Variant of the source metric to use
The created threshold (as a metric definition)
Metric definition data