getOpportunityStats Query
Gets aggregate counts for CRM opportunities matching supplied filters.
Arguments
#
searchParams
accountId
accountIds
ownerId
ownerIds
ownerIdIsNull
pipelineIds
excludeStageIds
Exclude opportunities in these stages. Matches the stage id, or the stage key on records without one.
stageIds
stageKeys
stageState
isWon
isLost
Only deals whose stage outcome is explicitly lost (true), or every other deal (false). Dormant and other no-outcome closed deals are not lost; isWon: false still includes them.
forecastCategories
excludeForecastCategories
Exclude opportunities in these forecast categories.
typeIds
Business type option ids from the workspace's business type setting (settings.crmFieldOptions.opportunityType).
minAmount
maxAmount
closeDateAfter
closeDateBefore
includeUnownedRecords
Include opportunities with no owner, on its own or alongside ownerIds. Insights uses this for its Unassigned option.
Response
#
Returns OpportunityStats !.