Sales, finance and marketing reports
Read Quote status funnel totals
/a/Report_getQuotesTotalNetStatusFunnel
Aggregate selected Quote statuses into one whole-range funnel column, using counts or legacy net totals.
When to use this endpoint
Aggregate selected Quote statuses into one whole-range funnel column, using counts or legacy net totals. Use this for an explicit integration request or investigation of the older Dashboard funnel widget; the result is chart series, not raw object records or a PDF.
One res row per legend entry, each containing one number. type is "custom" and xLabels1 is []; the handler does not return xLabels.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. The handler requires login and account feature bit 8192 in employer.features.
The dispatcher rejects these legacy Report routes for a user with configured TeamAccess record scope, including assigned-only/parent-manager access or a department hierarchy scope. It returns an explicit legacy-report scope error; it does not return a silently partial chart.
For an allowed unscoped request, the handler reads the authenticated tenant and adds no Reports/Quotes/Invoices page-permission check, account-manager restriction or per-object ownership check. Selecting user IDs is a chart filter, not authorization.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
daysFrom | Integer string | Yes | Start of range: relative day offset when durationType is omitted/not 1; Unix seconds when durationType=1. Must be an integer string or integer; blank and malformed values are rejected. Use an ordered, bounded range. |
daysTo | Integer string | Yes | End of range in the same mode as daysFrom. Must be an integer; no reversed-range validation. The handler expands to the final day’s 23:59:59 unless the behavior below says otherwise. |
durationType | Integer string | No | Defaults to 0. Exactly 1 uses Unix seconds; every other integer treats daysFrom/daysTo as offsets from the current PHP time. ISO date strings are not parsed as dates. |
displayType | Integer string | Yes | 0 counts; 1 net value. Other values fall back to counts. Value aggregates are integer-converted; this is not a precise currency export. |
legend | Nonempty native array of numeric status strings | Yes | Status IDs in the desired response-series order. No All/Opportunity expansion. Empty or malformed lists are rejected before SQL. |
Example request
$report = FM_api('Report_getQuotesTotalNetStatusFunnel', [
'daysFrom'=>'1768003200',
'daysTo'=>'1768003200',
'durationType'=>'1',
'displayType'=>'0',
'legend'=>['1'],
]);
Example response
{
"type": "custom",
"res": [
[
0
]
],
"xLabels1": []
}
The example uses Unix seconds for 2026-01-10 00:00:00 UTC. The handler expands the resulting account-local date to its documented day boundaries.
Representative empty-cohort result from the real handler with a January 2026 summary axis.
One res row per legend entry, each containing one number. type is "custom" and xLabels1 is []; the handler does not return xLabels.
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"This legacy report does not support your configured record scope. Use the scoped Contracts reports or table exports."} | The dispatcher detects configured TeamAccess record scope. This applies before the handler’s own checks. |
{"error":"no permission to access api"} | Account reporting feature bit 8192 is absent. |
{"error":"missing parameter: daysFrom"} | daysFrom omitted or null. Present blank scalars and malformed list controls return an invalid-parameter error instead. Required lists must be native arrays. |
{"error":"missing parameter: daysTo"} | daysTo omitted or null. Present blank scalars and malformed list controls return an invalid-parameter error instead. Required lists must be native arrays. |
{"error":"missing parameter: displayType"} | displayType omitted or null. Present blank scalars and malformed list controls return an invalid-parameter error instead. Required lists must be native arrays. |
{"error":"missing parameter: legend"} | legend omitted or null. Present blank scalars and malformed list controls return an invalid-parameter error instead. Required lists must be native arrays. |
{"error":"invalid parameter: legend"} | A supplied numeric control is malformed, a list has the wrong shape or an unsupported token, or frequency/userType is outside 0–3. The message names the invalid control; validation occurs before chart SQL. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- List controls must be native lists of strings or integers. Encoded JSON strings, nested/object-keyed arrays and nonnumeric IDs are rejected before SQL. Only the documented All, Opportunity and composite legend tokens are accepted. Empty user/status/leadSource lists are invalid; empty legends are accepted only on the status-series reports, MarketingExpense and SalesPerLeadSource.
- Filters cdate inclusively and groups by numeric status across the entire range. There are no entity, frequency, payment-date or win-date filters.
- legend order defines res row order, even though SQL orders status numerically. Unmatched statuses retain a zero cell. Duplicate legend values initialize duplicate rows but only the first match receives data.
- displayType=0 counts rows. displayType=1 requests total_net sums, then truncates each returned aggregate to an integer.
- No paid/won restriction is implicit; list each desired status explicitly, including draft or cancelled if required.
- A literal All or Opportunity legend token is not expanded by this handler. The older Dashboard widget now supplies its explicit numeric status list. Empty or malformed lists return an invalid-parameter error.
- There is no pagination, row limit or result checkpoint. Keep the date range and entity selection bounded; label helpers expand every selected period/entity combination.
- The underlying aggregate queries do not exclude deleted source objects. Related label/source queries also have no general active/deleted filter. Totals can differ from active-record lists; no deletion behavior is changed by this documentation.
- PHP date conversion uses the account timezone setting (missing/null falls back to Europe/Dublin; blank means UTC). SQL date/Unix functions use the database session timezone; alignment is not enforced by this handler. Date endpoints are expanded to whole local days, not retained at the supplied time of day.
- Amounts are aggregate reporting numbers without currency codes or decimal preservation. Do not treat them as an invoice/quote ledger export.
- No direct mobile-app or m-service caller was found for this route. Browser report definitions are separate from the newer Report_getData template contract.
Side effects
- Reads report data only. No record, audit, status, notification, mail, report-cache or schema writes occur. Date helpers temporarily change PHP timezone on paths noted above.
See it in Fieldmotion
CRM1
On the older Dashboard, add Quotes Total Net per Status Funnel and filter Network for Report_getQuotesTotalNetStatusFunnel. The widget supplies numeric legend IDs from its local status list, adds translated chart labels in the browser, and renders one centered bar per status. API callers still supply an explicit nonempty numeric legend.
CRM2
No current CRM2 catalogue item or direct caller was found for this legacy status-funnel route. The saved Reports dashboard exposes QuotesStatusUser for status series, while the newer template widget calls Report_getData.
Related endpoints
Report_getOpportunityQuoteWonFunnel— Compare unquoted opportunities, non-won Quotes and won/paid Quotes created during one reporting range.Report_getQuotesStatusUser— Compare selected Quote statuses and an optional overall series across report periods and selected owners or customers.Report_getInvoicesStatusUser— Compare selected Invoice statuses and an optional overall series across report periods and selected owners or customers.