Sales Dashboard
Per-agent sales dashboard data export
Retrieves sales dashboard performance data for a single agent
get
/sales_dashboard/performanceReturns 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.
Parámetros de consulta
- ID of the playbook to filter by
playbook_idstringobligatorioEjemplo:507f1f77bcf86cd799439011 - ID of the agent whose performance to return
user_idstringobligatorioEjemplo:507f1f77bcf86cd799439012 - 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)
periodstringobligatorioEjemplo:this_week - Start date for custom period (ISO 8601)
start_datestring (date)Ejemplo:2024-01-01 - End date for custom period (ISO 8601)
end_datestring (date)Ejemplo:2024-01-31
Respuestas
200performance data returned401unauthorized404playbook or user not found422date range exceeds limit
Petición
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'Respuesta de ejemplo · 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_goalsReturns 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.
Parámetros de consulta
- ID of the playbook to filter by
playbook_idstringobligatorioEjemplo:507f1f77bcf86cd799439011 - Start date for goal/actual records (ISO 8601)
start_datestring (date)obligatorioEjemplo:2024-01-01 - End date for goal/actual records (ISO 8601)
end_datestring (date)obligatorioEjemplo:2024-01-31
Respuestas
200sales goals data returned401unauthorized404playbook not found422start_date or end_date missing
Petición
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'Respuesta de ejemplo · 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
}
]
}