Magidoc

generatePipelineCoachSummary
Mutation

Generates an AI coaching summary of the CRM pipeline (headline, summary, risks, opportunities, recommended actions), optionally scoped by owners and close-date window. Results are cached per scope for 24 hours; forceRefresh regenerates.

Access: workspace members with CRM access.

Arguments

#

workspaceId

ID !
Non-null

forceRefresh

ownerIds

[ID !]

Restricts the coached pipeline to opportunities owned by these users — Insights resolves a selected team to its members. Omitted coaches the whole workspace; an explicitly empty list is a scope that matches nothing (a team with no members), not an absent one. Part of the summary cache key, so each scope caches separately rather than serving another scope's narrative — including empty, which keys apart from omitted.

includeUnownedRecords

Include opportunities with no owner.

closeDateAfter

Restricts the coached pipeline to deals closing in this window. Also part of the cache key, for the same reason as ownerIds.

closeDateBefore

Response

#

Returns PipelineCoachSummary !.

Example

#