find_entities_by_metric
Filter groups or accounts by performance metrics like visit counts, ratings, or call durations to identify entities meeting specific criteria.
Instructions
Find groups or accounts filtered by metrics. Supports single metric (legacy) or multiple metrics (recommended). Available metrics: account_count (groups only), visit_count, provider_rating, patient_rating, avg_call_duration, unique_providers, unique_patients, provider_rating_count, patient_rating_count. Can filter accounts by group. Returns entities matching ALL criteria with their metric values.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entityType | Yes | Type of entity to find: "group" to find groups, "account" to find accounts | |
| metric | No | Single metric to filter by (use metrics array for multiple filters). Available: account_count (groups only), visit_count, provider_rating, patient_rating, avg_call_duration, unique_providers, unique_patients, provider_rating_count, patient_rating_count | |
| min | No | Minimum value when using single metric (use metrics array for multiple filters) | |
| max | No | Maximum value when using single metric (use metrics array for multiple filters) | |
| metrics | No | Array of metric filters. Use this for filtering by multiple metrics simultaneously. Each filter requires metric and at least one of min/max. | |
| startDate | No | Start date in ISO format (YYYY-MM-DD) or date math (e.g., "now-30d", "now-1y"). Defaults to "now-1y" | |
| endDate | No | End date in ISO format (YYYY-MM-DD) or date math (e.g., "now"). Defaults to "now" | |
| subscription | No | Optional subscription tier to filter by | |
| group | No | Optional group name to filter by (only valid when entityType="account") | |
| limit | No | Maximum number of results to return (default: 10, max: 500). Recommended: do not set over 10. |