{
  "queue_options": [
    { "queue_id": "sales_kz", "name": "Продажи KZ" },
    { "queue_id": "support_kz", "name": "Поддержка KZ" },
    { "queue_id": "vip_kz", "name": "VIP-линия" },
    { "queue_id": "retention_kz", "name": "Удержание" }
  ],
  "agents": [
    "agent.aigerim",
    "agent.dias",
    "agent.nurdaulet",
    "agent.madina",
    "agent.ruslan",
    "agent.tomiris"
  ],
  "queue_factors": {
    "sales_kz": 1.08,
    "support_kz": 0.96,
    "vip_kz": 0.58,
    "retention_kz": 0.72
  },
  "channel_base": {
    "voice": { "total": 620, "answered": 584, "abandoned": 36 },
    "telegram": { "total": 214, "answered": 205, "abandoned": 9 },
    "whatsapp": { "total": 182, "answered": 171, "abandoned": 11 },
    "webchat": { "total": 141, "answered": 132, "abandoned": 9 },
    "email": { "total": 108, "answered": 94, "abandoned": 14 }
  },
  "ai_reason_labels": {
    "requested_human": "Запрос оператора",
    "knowledge_or_tool_gap": "Не хватило знаний или инструмента",
    "policy_or_sensitive": "Чувствительный сценарий",
    "delivery_or_runtime_error": "Ошибка доставки или runtime",
    "manual_claim": "Ручной takeover",
    "other": "Другая причина"
  },
  "interaction_statuses": [
    "closed",
    "in_progress",
    "closed",
    "new",
    "closed",
    "escalated"
  ],
  "agent_state_cycle": [
    "READY",
    "BUSY",
    "READY",
    "BREAK",
    "BUSY",
    "OFFLINE"
  ],
  "coverage_note": "Показаны демонстрационные данные для временного наполнения витрины.",
  "dashboard_coverage": {
    "implemented_metrics": ["SL", "ASA", "AHT", "Abandon", "FCR", "DigitalShare"],
    "dimensions": ["queue", "channel", "agent", "shift"],
    "supported_filters": ["preset", "from_ts", "to_ts", "queue_id", "channel"]
  },
  "ai_channel_rows": [
    {
      "channel": "telegram",
      "sessions_started": 176,
      "ai_only_sessions": 106,
      "human_touched_sessions": 58,
      "handoff_rate": 24.4,
      "ai_latency_avg_ms": 1380,
      "containment_rate": 60.2,
      "closed_without_operator_rate": 52.1
    },
    {
      "channel": "whatsapp",
      "sessions_started": 142,
      "ai_only_sessions": 80,
      "human_touched_sessions": 54,
      "handoff_rate": 28.9,
      "ai_latency_avg_ms": 1524,
      "containment_rate": 56.4,
      "closed_without_operator_rate": 48.6
    }
  ],
  "voice_name_flow": {
    "totals": {
      "scenario_calls": 196,
      "start_obtained": 118,
      "downstream_ai_obtained": 34,
      "followup_required": 18,
      "name_not_obtained": 26,
      "manual_corrected": 12,
      "handoff_confirmed_name": 14,
      "handoff_unconfirmed_name": 28,
      "needed_downstream": 78
    },
    "languages": [
      {
        "language": "ru",
        "share": 0.58,
        "start_capture_rate": 66.2,
        "downstream_rescue_rate": 47.4,
        "handoff_unconfirmed_rate": 31.8,
        "manual_correction_rate": 14.6
      },
      {
        "language": "kz",
        "share": 0.29,
        "start_capture_rate": 61.7,
        "downstream_rescue_rate": 51.3,
        "handoff_unconfirmed_rate": 28.4,
        "manual_correction_rate": 11.8
      },
      {
        "language": "unknown",
        "share": 0.13,
        "start_capture_rate": 44.8,
        "downstream_rescue_rate": 36.1,
        "handoff_unconfirmed_rate": 46.5,
        "manual_correction_rate": 23.0
      }
    ],
    "queues": [
      {
        "queue_id": "sales_kz",
        "share": 0.31,
        "start_capture_rate": 68.4,
        "downstream_rescue_rate": 49.6,
        "handoff_unconfirmed_rate": 24.1,
        "manual_correction_rate": 11.2
      },
      {
        "queue_id": "support_kz",
        "share": 0.39,
        "start_capture_rate": 61.2,
        "downstream_rescue_rate": 46.9,
        "handoff_unconfirmed_rate": 31.8,
        "manual_correction_rate": 15.4
      },
      {
        "queue_id": "vip_kz",
        "share": 0.11,
        "start_capture_rate": 73.5,
        "downstream_rescue_rate": 52.8,
        "handoff_unconfirmed_rate": 18.6,
        "manual_correction_rate": 8.9
      },
      {
        "queue_id": "retention_kz",
        "share": 0.19,
        "start_capture_rate": 55.1,
        "downstream_rescue_rate": 39.4,
        "handoff_unconfirmed_rate": 37.9,
        "manual_correction_rate": 19.7
      }
    ],
    "coverage": {
      "sessions_with_start_decision": 192,
      "sessions_with_final_ai_state": 184,
      "sessions_with_manual_overlay": 12,
      "note": "Мок-данные по voice name-flow показывают стартовый захват имени, добор AI и ручное исправление оператором."
    },
    "trend_profiles": {
      "scenario_calls": { "base": 24, "step": 2.4, "cycle": 4 },
      "start_capture_rate": { "base": 60.5, "step": 2.2, "cycle": 4 },
      "downstream_rescue_rate": { "base": 40.2, "step": 1.9, "cycle": 5 },
      "handoff_unconfirmed_rate": { "base": 33.1, "step": 2.4, "cycle": 4 },
      "manual_correction_rate": { "base": 14.4, "step": 1.5, "cycle": 3 }
    },
    "empty_note": "За выбранный период нет звонков, прошедших через сценарий сбора имени."
  },
  "voice_name_labels": {
    "scenario_calls": "Звонки в сценарии",
    "start_obtained": "Имя взято сразу",
    "needed_downstream": "Потребовался AI после старта",
    "downstream_ai_obtained": "Имя добрал AI после follow-up",
    "handoff_confirmed_name": "Передача с подтверждённым именем",
    "handoff_unconfirmed_name": "Передача без подтверждённого имени",
    "confirmed_name": "Передача с подтверждённым именем",
    "unconfirmed_name": "Передача без подтверждённого имени"
  },
  "agent_shift_rows": [
    {
      "shift_key": "night",
      "label": "Ночная смена",
      "agents_with_activity": 2,
      "interactions_total": 18,
      "answered_total": 17,
      "avg_handle_seconds": 356,
      "fcr_rate": 69.5
    },
    {
      "shift_key": "day",
      "label": "Дневная смена",
      "agents_with_activity": 5,
      "interactions_total": 52,
      "answered_total": 53,
      "avg_handle_seconds": 318,
      "fcr_rate": 76.8
    },
    {
      "shift_key": "evening",
      "label": "Вечерняя смена",
      "agents_with_activity": 3,
      "interactions_total": 30,
      "answered_total": 30,
      "avg_handle_seconds": 334,
      "fcr_rate": 73.4
    }
  ]
}
