Create and Save Quote Proposal API

Create and save a CPQ quote proposal.

Required Editions
Available in: Salesforce CPQ Winter ’19 and later

Salesforce CPQ doesn’t support attaching Additional Document records through API.

Formats

JSON, Apex

HTTP Method

POST

Authentication

Authorization: Bearer token

REQUEST

Parameter 1

Name: name

Type: String

Required: No

Description: The document name

Parameter 2

Name: paperSize

Type: String

Required: No

Description: Options: Default, Letter, Legal, A4

Parameter 3

Name: outputFormat

Type: String

Required: No

Description: Options: pdf, word. Defaults to pdf.

Parameter 4

Name: quoteID

Type: Id

Required: Yes

Description: The quote ID

Parameter 5

Name: templateId

Type: Id

Required: Yes

Description: The quote template ID

Parameter 6

Name: language

Type: String

Required: No

Description: Defaults to en_US

RESPONSE

Type

jobId

Description

Apex queueable job Id

The request body data.json file generates and saves a quote proposal.

An example response body after creating the Apex job for generating the quote proposal.

Before saving the GenerateQuoteProposal example class, make sure that the CPQ model classes are added as individual Apex classes in your org.

Run the following code in anonymous Apex to get Apex job ID for generating and saving the quote proposal.