Skip to main content

Ratio

Custom stats: ratio, percentage, and advanced formula stats built from report KPIs, shown as report columns.

📄️ Add a Custom Stat

Creates a ratio, percentage, or advanced formula custom stat, which reports then offer as a column. `ratio` and `percentage` stats divide `numerator` by `denominator`; `formula` stats evaluate `formula` with the `$` variables mapped in `scopes`. Each input is a numeric report KPI or another custom stat's `ratioId`: call /report/column and use the `value` of a column whose `type` is `number`, such as `contact.pitches` or `meetingAttendance.count`. A formula must parse, and a stat cannot reference itself directly or through other stats. `scopeId` is the company, team, or user the stat belongs to; omit it to use the caller's company. Requires the `ratio:save` permission for that scope.

📄️ Update a Custom Stat

Replaces an existing custom stat with the definition sent, so send every field you want to keep: start from /ratio/get. `ratio` and `percentage` stats divide `numerator` by `denominator`; `formula` stats evaluate `formula` with the `$` variables mapped in `scopes`. Each input is a numeric report KPI or another custom stat's `ratioId`: call /report/column and use the `value` of a column whose `type` is `number`, such as `contact.pitches` or `meetingAttendance.count`. A formula must parse, and a stat cannot reference itself directly or through other stats. `ratioId` and `scopeId` are required; a different `scopeId` moves the stat to that company, team, or user. Requires the `ratio:save` permission for both the stat's stored scope and the requested `scopeId`.