getOpportunityPipelineSummary Query
Breaks the opportunities matching the filters into forecast buckets (open, commit, most likely, best case, closed won, closed lost), each with a count and summed amount. Use it for a pipeline or forecast overview; getOpportunityStats returns only overall totals.
Access: workspace members with CRM access.
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 OpportunityPipelineSummary !.
Example
#
getOpportunityMaterials