Sales Dashboard

Per-agent sales dashboard data export

Retrieves sales dashboard performance data for a single agent

get/sales_dashboard/performance

Returns performance data for one agent on a playbook: KPI cards (won, conversion_rate, tasks, contacted) with team tier badge for the given time period, and a 30-day daily chart for all metrics. Unlike the team dashboard endpoints, this is always scoped to a single agent.

Query parameters

  • playbook_idstringrequired
    ID of the playbook to filter by
    Example: 507f1f77bcf86cd799439011
  • user_idstringrequired
    ID of the agent whose performance to return
    Example: 507f1f77bcf86cd799439012
  • periodstringrequired
    Time period (e.g. this_week, this_month, last_week, last_month, last_two_months, last_7_days, last_14_days, last_30_days, custom)
    Example: this_week
  • start_datestring (date)
    Start date for custom period (ISO 8601)
    Example: 2024-01-01
  • end_datestring (date)
    End date for custom period (ISO 8601)
    Example: 2024-01-31

Responses

  • 200performance data returned
  • 401unauthorized
  • 404playbook or user not found
  • 422date range exceeds limit
Request
curl -X GET 'https://api.vixiees.com/api/v1/sales_dashboard/performance?playbook_id=507f1f77bcf86cd799439011&user_id=507f1f77bcf86cd799439012&period=this_week' \
  -H 'X-Api-Key: YOUR_API_KEY'
Example response 路 200
{
  "kpis": [
    {
      "metric": "won",
      "value": 0,
      "tier": "string"
    }
  ],
  "chart": [
    {
      "metric": "string",
      "mean": 0,
      "data": [
        {
          "date": "string",
          "value": 0
        }
      ],
      "empty": true
    }
  ]
}

Retrieves daily sales goals and their goal/actual records

get/sales_dashboard/sales_goals

Returns the playbook's daily sales goals (target per metric: new_leads, won_deals) and the daily goal/actual records for those metrics within the given date range.

Query parameters

  • playbook_idstringrequired
    ID of the playbook to filter by
    Example: 507f1f77bcf86cd799439011
  • start_datestring (date)required
    Start date for goal/actual records (ISO 8601)
    Example: 2024-01-01
  • end_datestring (date)required
    End date for goal/actual records (ISO 8601)
    Example: 2024-01-31

Responses

  • 200sales goals data returned
  • 401unauthorized
  • 404playbook not found
  • 422start_date or end_date missing
Request
curl -X GET 'https://api.vixiees.com/api/v1/sales_dashboard/sales_goals?playbook_id=507f1f77bcf86cd799439011&start_date=2024-01-01&end_date=2024-01-31' \
  -H 'X-Api-Key: YOUR_API_KEY'
Example response 路 200
{
  "goals": [
    {
      "id": "string",
      "metric": "new_leads",
      "target_value": 10
    }
  ],
  "records": [
    {
      "id": "string",
      "metric": "new_leads",
      "date": "2024-01-01",
      "goal_value": 10,
      "actual_value": 4
    }
  ]
}