Skip to main content
Four analytics tools cover different levels of analysis — from simple record counts to full workspace summaries.

Tools

ToolDescriptionKey Params
analytics.recordsAggregate records by field valuesobject_type_slug, metrics, group_by, filters
analytics.pipelinePipeline-specific metrics (conversion, velocity)list_id, metrics, time_range
analytics.datalakeQuery datalake models (activities, emails, meetings, etc.)model, metrics, group_by, time_range, time_bucket
analytics.summaryHigh-level workspace summarytime_range

Metrics

MetricDescription
countNumber of records
sumSum of a numeric field
avgAverage of a numeric field
min / maxMin/max of a field
conversion_ratePercentage that reached a target stage (pipeline only)
avg_time_in_stageAverage days in each stage (pipeline only)
velocityAverage days from entry to close (pipeline only)

Time Buckets

day week month quarter year

Examples

Count deals by stage

{
  "tool": "analytics.records",
  "params": {
    "object_type_slug": "deals",
    "metrics": ["count", "sum"],
    "group_by": "Stage",
    "filters": [
      { "field": "Stage", "operator": "not_in", "value": ["Closed Lost"] }
    ]
  }
}
Response:
{
  "success": true,
  "data": {
    "groups": [
      { "Stage": "Qualified", "count": 12, "sum_Deal Value": 340000 },
      { "Stage": "Proposal Sent", "count": 8, "sum_Deal Value": 520000 },
      { "Stage": "Negotiation", "count": 5, "sum_Deal Value": 410000 },
      { "Stage": "Closed Won", "count": 15, "sum_Deal Value": 1250000 }
    ]
  }
}

Get pipeline conversion metrics

{
  "tool": "analytics.pipeline",
  "params": {
    "list_id": "lst_abc123",
    "metrics": ["conversion_rate", "velocity", "avg_time_in_stage"],
    "time_range": {
      "start": "2026-01-01",
      "end": "2026-03-23"
    }
  }
}

Query datalake — emails per week

{
  "tool": "analytics.datalake",
  "params": {
    "model": "communication",
    "metrics": ["count"],
    "group_by": "direction",
    "time_range": {
      "start": "2026-01-01",
      "end": "2026-03-23"
    },
    "time_bucket": "week"
  }
}

Workspace summary

{
  "tool": "analytics.summary",
  "params": {
    "time_range": {
      "start": "2026-03-01",
      "end": "2026-03-23"
    }
  }
}