---
title: "Compute chart-ready results (buckets / series / values) for the stored dashboard, a subset of its panels, or ad-hoc panel definitions — optionally scoped to a saved view, a period preset (with the previous interval as previousValue) and extra filters. Same query the strip renders from"
method: POST
path: "/crm/objects/{objectName}/analytics/compute"
tags: ["crm"]
---

# Compute chart-ready results (buckets / series / values) for the stored dashboard, a subset of its panels, or ad-hoc panel definitions — optionally scoped to a saved view, a period preset (with the previous interval as previousValue) and extra filters. Same query the strip renders from

`POST /crm/objects/{objectName}/analytics/compute`

## Request

- Base URL: `https://www.dench.com/api/v1`
- URL: `https://www.dench.com/api/v1/crm/objects/{objectName}/analytics/compute`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Compute chart-ready results (buckets / series / values) for the stored dashboard, a subset of its panels, or ad-hoc panel definitions — optionally scoped to a saved view, a period preset (with the previous interval as previousValue) and extra filters. Same query the strip renders from.

## Path parameters

- `objectName` string, required

## Request body

- object
  - `viewName` string: Compute the saved view's own dashboard instead of the object's (ignored when the view inherits).
  - `panelIds` string[]: Only these stored panels.
  - `panels` object[]: Ad-hoc panel definitions to compute instead of the stored dashboard (nothing is persisted). id/title/metric/sortOrder are filled in when omitted.
    - `id` string: Stable id (template panels use `tpl:<template>:<slug>`).
    - `title` string
    - `type` 'stat' | 'bar' | 'line' | 'area' | 'donut' | 'funnel' | 'leaderboard' | 'forecast' | 'map', required
    - `metric` 'count' | 'sum' | 'avg' | 'min' | 'max'
    - `metricField` string: Numeric field for sum/avg/min/max. Ignored for count.
    - `groupBy` string: Bucketing field (enum/user/relation/boolean/text, or $location). On a time-series panel it splits the series into one line per value.
    - `dateField` string: Date field for line/area/forecast bucketing (or $createdAt).
    - `dateBucket` 'day' | 'week' | 'month' | 'quarter'
    - `filters` object: Panel-scoped FilterGroup, same shape as saved-view filters.
    - `size` 'sm' | 'md' | 'lg': Deprecated; ignored for layout. Use `span`.
    - `span` union: Card width on the 6-track dashboard grid: 2 = a third, 3 = half, 4 = two thirds, 6 = full row. Defaults: funnel 4; map and leaderboard 2; bar/donut grouped by a user field 2, by anything else 4; trends 3.
      - 2
      - 3
      - 4
      - 6
    - `hidden` boolean: Hide from the strip above the table; still shown in the full analytics view.
    - `sortOrder` number
    - `derived` 'conversion_rate' | 'win_rate' | 'won_amount' | 'lost_amount' | 'open_pipeline' | 'pipeline_forecast' | 'mrr' | 'arr': Role-driven derived metric; when set the panel computes from fieldRoles instead of metric/groupBy.
  - `period` 'all' | 'this_week' | 'this_month' | 'last_month' | 'this_quarter' | 'last_quarter' | 'this_year': Period preset. Scopes every panel by a date_preset on the object's closeDate role (else $createdAt) and fills previousValue from the previous calendar interval. "all" = no scope.
  - `extraFilters` object: FilterGroup applied to every panel (e.g. the view's rules). Forces the bounded scan path.
  - `compareFilters` object: FilterGroup for the comparison window; every panel's value over it comes back as previousValue. Derived automatically from `period`.
  - `fieldRolesOverride` object: Preview an unsaved role mapping.
    - `amount` string: Numeric field holding the deal value ("Amount") — the "Value field" in the setup sheet.
    - `stage` string: Enum field driving the pipeline ("Stage" / "Status") — the "Progress field".
    - `wonValues` string[]: `stage` options that count as won (closed, successful).
    - `lostValues` string[]: `stage` options that count as lost (closed, gone).
    - `convertedValues` string[]: `stage` options that count as converted (a lead reached "Qualified").
    - `closeDate` string: Date field for time bucketing, forecasts and the period pill (falls back to $createdAt).
    - `owner` string: User field naming who owns each record ("Owner"). Rankings on it default to a narrow card and draw member faces.
    - `location` string: Place-name field maps plot. May be a relation path like "Account.HQ Location" (one hop through a relation).
    - `recurrence` 'monthly' | 'annual' | 'one_time': How a won amount recurs: annual treats Amount as ARR, monthly as MRR, one_time disables MRR/ARR panels.
    - `stageProbabilities` object: Chance of closing per OPEN stage, 0..1, for the weighted forecast. Unlisted stages are spaced evenly; won = 1, lost = 0.
  - `assignedTo` string: Personal scope: "me" (the signed-in member / the human behind an agent session), "unassigned", or a member userId or email. Adds one has_any / is_empty rule on the object's assignee user field; rows, totalCount, sums and analytics all follow it. Never saved onto the view.
  - `assigneeField` string: Which `user` field "assigned" means. Default: the analytics owner role, else the task `Assignee`, else a user field named like owner/assignee, else the first user field.
  - `drillFilters` object[]: Click-to-filter chips, same as the strip: each scopes every panel EXCEPT those whose dimensions include `dimension`.
    - `dimension` string, required: The bare field the click came from — a panel's groupBy or dateField, or `$location` for a map. Panels drawn along it keep their full picture; every other panel is scoped.
    - `filter` object, required: FilterGroup selecting the clicked bucket.

## Response `200`

Successful response

- object
  - `objectName` string, required
  - `truncated` boolean, required: True when the table exceeded the 5,000-row scan and numbers are approximate.
  - `scannedRows` number, required
  - `locationRole` string
  - `panels` object[], required
    - `id` string, required
    - `unit` 'number' | 'currency' | 'percent', required
    - `value` number
    - `secondaryValue` number
    - `previousValue` number: The same value over the comparison window (period / compareFilters).
    - `buckets` object[]
      - `key` string, required
      - `label` string, required
      - `count` number, required
      - `value` number, required
      - `color` string
      - `amount` number: Funnel only: sum of the amount role over the rows in this stage.
    - `series` object[]
      - `bucket` string, required
      - `label` string, required
      - `value` number, required
      - `count` number, required
      - `projected` boolean
    - `seriesGroups` object[]
      - `key` string, required
      - `label` string, required
      - `color` string
      - `series` object[], required
        - `bucket` string, required
        - `label` string, required
        - `value` number, required
        - `count` number, required
        - `projected` boolean
    - `error` string

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication
- `404`: Operation or resource not found
- `500`: Server error

---

[API](https://skmtc.dev/dench/apis/dench-api.md) - [All operations](https://skmtc.dev/dench/apis/dench-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dench/apis/dench-api/revisions/4a145b38f19c?raw)
