CPQ quote document generation is triggered via the ServiceRouter or the CPQ document generation button; for API automation, use the appropriate ServiceRouter saver.
Ensure the quote has an associated quote template (SBQQ__QuoteTemplate__c) set on the SBQQ__Quote__c record (SBQQ__DefaultTemplate__c or the specific template field — verify field name).
Trigger document generation by POSTing to /services/apexrest/SBQQ/ServiceRouter?saver=SBQQ.DocumentAPI.DocumentSaver (verify exact saver name against CPQ documentation) with a payload containing the quote ID and document generation options.
CPQ generates a PDF or Word document based on the template and creates an SBQQ__QuoteDocument__c record linked to the quote, and typically also attaches the document as a Salesforce File (ContentDocument).
Poll or query SBQQ__QuoteDocument__c WHERE SBQQ__Quote__c = '{quoteId}' to retrieve the generated document record and its associated ContentDocumentId.
Retrieve the file content via GET /services/data/{apiVersion}/sobjects/ContentVersion/{contentVersionId}/VersionData.
Known gotchas
Document generation is asynchronous in some CPQ configurations; the ServiceRouter call may return before the document is fully rendered, requiring a short polling loop.
The exact saver name for document generation varies by CPQ version; consult CPQ release notes rather than assuming the identifier.
If the quote lacks a valid template assignment, document generation will fail with a template-not-found error; verify template configuration before calling the API.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp