Contract Renewer API
Receive a CPQ contract in a request, and return quote information for one or more renewal quotes.
| Required Editions |
|---|
| Available in: Salesforce CPQ Summer ’16 and later |
- Service Provider Name
SBQQ.ContractManipulationAPI.ContractRenewer
- Formats
JSON, Apex
- HTTP Method
PATCH
- Authentication
Authorization: Bearer token
All of these user permissions are required.
- Insert and update on quote and opportunity objects
- Read on quote, opportunity, and product2 objects
- Delete on quote object
- Parameter 1
Name: context
Type: RenewalContext
Required: Yes
Description: JSON object containing the contracts to renew. Include the IDs of each contract to renew. If there’s more than one contract, include the ID of the contract to use as the main contract.
- Attribute 1
Name: masterContractId
Type: Id
Required: No
Description: If you’re renewing multiple contracts, specify the ID of the main contract.
- Attribute 2
Name: renewedContracts
Type: ContractModel[]
Required: Yes
Description: One or more ContractModels to renew.
- Attribute 3
Available in: Salesforce CPQ Winter ’21 and later
Name: returnOnlyQuoteId
Type: boolean
Required: No
Description: If
true, return the ID of the renewed quotes. Iffalseornull, return the information for the renewed quotes.Default value is
false.
If returnOnlyQuoteId is false or null:
- Type
QuoteModel[]
- Description
Representation of one or more SBQQ__Quote__c data for renewal quotes.
If returnOnlyQuoteId is true:
- Type
integer
- Description
The ID of the SBQQ__Quote__c record.
Where possible, we changed noninclusive terms to align with our company value of Equality. Because changing terms in our code can break current implementations, we maintained this metadata type’s name.
This request body context.json file renews one or more Contracts. The context value is a JSON formatted string.
An example response body after renewing a quote. The actual response is a JSON formatted string.
Before saving the ContractRenewer example class, ensure that you've created individual Apex classes for your CPQ models.
Example response body for returnOnlyQuoteId = true: