> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/crm-sales/salesforce-cpq.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Salesforce CPQ

Salesforce CPQ handles quoting inside Salesforce. Add products to quotes, calculate quotes, and amend and create contracts.

![Salesforce CPQ logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0b971390fdf5a27350cd0e4c58fdf0a0a0d5448e%2Fvlocity.png?alt=media)

|                    |                                                                                      |
| ------------------ | ------------------------------------------------------------------------------------ |
| **Category**       | [CRM and sales](https://docs.fastn.ai/connectors/catalog/crm-sales.md)               |
| **Website**        | [salesforce.com](https://salesforce.com)                                             |
| **Authentication** | Instance URL and access token, OAuth 2.0                                             |
| **Slug**           | `salesforceCpq`                                                                      |
| **On fastn.ai**    | [Embed Salesforce CPQ in your product](https://fastn.ai/integrations/salesforce-cpq) |

## Setup

Your customers sign in to Salesforce CPQ through Fastn's own OAuth app, so nothing needs setting up first. To show your own app on the consent screen instead, add your OAuth app on the connector's **Auth** tab under **Manage providers**.

## Connect in Fastn

Your customers connect Salesforce CPQ from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Salesforce CPQ**.
2. Select **Connect** on the Salesforce CPQ card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Salesforce CPQ offers more than one sign-in method. Choose one in **Auth Method**, then:
   * For a key or credential method, fill in the fields the form asks for, using the values from [Setup](#setup) above. Then select **Connect**.

     <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-51fb88ef328c525b5b11f8d7094bab11efc333b8%2Fconnect-credentials.png?alt=media" alt="The Connect ServiceNow dialog with an optional account name and the Instance, Username and Password fields, and Cancel and Connect buttons"><figcaption><p>A connect form that asks for credentials. Each connector asks for its own fields.</p></figcaption></figure>
   * For OAuth 2.0, keep the **Default** auth provider, or choose your own OAuth app if you added one. Pick the **Scopes** you need, select **Authorize**, then sign in to Salesforce CPQ and approve access in the window that opens.

     <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0e2bbdd7109cec207402cf6883484b8525b7fbf5%2Fconnect-oauth.png?alt=media" alt="The Connect Salesforce dialog for OAuth 2.0 with the Default auth provider, an optional account name, the Scopes selector and an Authorize button"><figcaption><p>A connect form for OAuth 2.0. Salesforce is shown here.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Salesforce CPQ's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Add Products To Quote (CPQ API)</td><td><code>addProductsToQuote</code></td><td>CPQ Quote API: add one or more ProductModels to a QuoteModel and get the model back with the new quote lines (each carrying its key, productQuantityEditable, productHasDimensions and descriptionLocked). Does NOT save - pipe the result into calculateQuote and then saveQuote. ignoreCalculate must be hardcoded true per Salesforce. groupKey is 0-indexed and only meaningful on grouped quotes. Salesforce CPQ Summer '16 and later.</td></tr><tr><td>Amend Contract (CPQ API)</td><td><code>amendContract</code></td><td>CPQ Contract Manipulation API: generate an amendment quote from an existing contract, the API equivalent of the Amend button. Returns the new amendment QuoteModel. The Salesforce guide says this loader takes no request body, but the Apex REST ServiceRouter still requires an entity body - calling it with none Pass {} unless Salesforce documents context fields later. The connected user needs unusually broad access for this to work: create, read, insert, update and delete on both Quote and Opportunity, plus read on Product2 - without full Opportunity access the amendment fails. Salesforce CPQ Summer '16 and later.</td></tr><tr><td>Approve Approval Request (Advanced Approvals API)</td><td><code>approveApprovalRequest</code></td><td>Advanced Approvals API: approve an sbaa__Approval__c record with an optional comment. Note this endpoint lives under the SEPARATE Advanced Approvals managed package (namespace sbaa) at /services/apexrest/sbaa/ServiceRouter, not the CPQ SBQQ router - it Advanced Approvals Spring '21 and later. Approval API labels are English only.</td></tr><tr><td>Calculate Quote (CPQ API)</td><td><code>calculateQuote</code></td><td>CPQ Quote API: run CPQ's pricing engine over a QuoteModel and get the recalculated model back (net totals, customer totals, per-line SBQQ__NetTotal__c and every price rule applied). Does NOT save - pipe the result into saveQuote. The context wraps the model under a quote key: {"quote": {...QuoteModel...}}. Salesforce documents this as performing like an asynchronous calculation and advises against it where instant results are needed; it also requires an Apex CalculateCallback class when the quote has quote-scoped product rules, which cannot be supplied over REST. Salesforce CPQ Summer '16 and later.</td></tr><tr><td>Contract Opportunity (CPQ)</td><td><code>contractOpportunity</code></td><td>Trigger CPQ's contracting process on an opportunity by setting SBQQ__Contracted__c. This is a CPQ-specific field on the standard Opportunity object: flipping it to true makes CPQ generate the Contract, the SBQQ__Subscription__c records for subscription products and Assets for the rest. It is asynchronous - the contract and subscriptions appear shortly afterwards, so poll listSubscriptionsForAccount rather than expecting them in this response. The opportunity needs a primary quote that has been ordered.</td></tr><tr><td>Contract Order (CPQ)</td><td><code>contractOrder</code></td><td>Trigger CPQ's order-based contracting by setting SBQQ__Contracted__c on an Order. This is the order-level equivalent of contractOpportunity and is the right one to use in orgs configured to contract from orders rather than opportunities. The order must be Activated. Asynchronous - poll listSubscriptionsForContract afterwards.</td></tr><tr><td>Create Apex Class (webhook infrastructure)</td><td><code>createApexClass</code></td><td>Webhook infrastructure, not part of the CPQ product surface. Creates an Apex class in the org via the Tooling API; this connector's event subscription code uses it to provision the callout helper that POSTs SBQQ record changes to a Fastn webhook URL. Pass the full class source as Body; Salesforce extracts the class name from the declaration. Must be stage:live for the subscription resolver to see it.</td></tr><tr><td>Create Apex Trigger (webhook infrastructure)</td><td><code>createApexTrigger</code></td><td>Webhook infrastructure, not part of the CPQ product surface. Creates an Apex trigger on an SBQQ object via the Tooling API and binds it to the callout helper class. TableEnumOrId is the sObject API name the trigger fires on, e.g. SBQQ__Quote__c. Must be stage:live for the subscription resolver to see it.</td></tr><tr><td>Create CPQ Block Price</td><td><code>createBlockPrice</code></td><td>Create a block price (SBQQ__BlockPrice__c) - one quantity band that is charged a flat price rather than a per-unit one. The product's pricing method must be Block for CPQ to use these. Bounds are lower-inclusive and upper-exclusive. SBQQ__ExpirationDate__c does not exist on this object in CPQ 262.1 (only SBQQ__EffectiveDate__c does), and CurrencyIsoCode exists only in a multi-currency org. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Configuration Attribute</td><td><code>createConfigurationAttribute</code></td><td>Create a configuration attribute (SBQQ__ConfigurationAttribute__c) on a bundle - the configurator control that pushes one value onto every option at once. SBQQ__TargetField__c is the API name of the field it writes on the quote lines. Scope it to one feature with SBQQ__Feature__c, or leave that empty for the whole bundle. SBQQ__ShownValues__c and SBQQ__HiddenValues__c narrow a picklist's choices. Returns {id, success, errors}.</td></tr></tbody></table>

<details>

<summary>View 88 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Create CPQ Configuration Rule</td><td><code>createConfigurationRule</code></td><td>Scope a product rule to one bundle by creating a configuration rule (SBQQ__ConfigurationRule__c). Without one, a Product-scoped rule applies wherever its conditions match; with one, it only runs inside the named bundle. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Contracted Price</td><td><code>createContractedPrice</code></td><td>Create a contracted price (SBQQ__ContractedPrice__c) - a negotiated price or discount for one product on one account, which CPQ applies ahead of list pricing. Set either SBQQ__Price__c (a fixed price) or SBQQ__Discount__c (a percentage off list), not both. Multi-currency orgs need one record per currency; CPQ does not convert. Overlapping effective-date ranges for the same account, product and currency are rejected. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Cost</td><td><code>createCost</code></td><td>Create a cost record (SBQQ__Cost__c) - the per-unit cost CPQ uses for margin and cost-plus pricing. Returns {id, success, errors}. SBQQ__Cost__c in CPQ 262.1 carries neither effective/expiration dates nor CurrencyIsoCode; CurrencyIsoCode only exists in a multi-currency org.</td></tr><tr><td>Create CPQ Discount Schedule</td><td><code>createDiscountSchedule</code></td><td>Create a discount schedule (SBQQ__DiscountSchedule__c), the container for a volume or term discount curve. Add the actual bands with createDiscountTier afterwards - a schedule with no tiers discounts nothing. Range applies the matching tier's discount to the whole quantity; Slab blends across every tier the quantity spans. SBQQ__AggregationScope__c decides whether quantity is totalled across the quote or only within a line group, and SBQQ__CrossProducts__c (plural - SBQQ__CrossProduct__c does not exist in CPQ 262.1) totals across every product sharing the schedule. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Discount Tier</td><td><code>createDiscountTier</code></td><td>Add a tier (SBQQ__DiscountTier__c) to a discount schedule. Bounds are lower-inclusive and upper-exclusive, so consecutive tiers share a boundary value: 1-10, 10-50, 50-blank. Leave the upper bound empty on the last tier to make it open-ended. Set SBQQ__Discount__c for a percentage or SBQQ__DiscountAmount__c for a currency amount, matching the schedule's SBQQ__DiscountUnit__c. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Error Condition</td><td><code>createErrorCondition</code></td><td>Add an error condition (SBQQ__ErrorCondition__c) to a product rule - one test of a field on the quote, quote line, product option or feature. Several conditions on a rule combine according to the rule's SBQQ__ConditionsMet__c. SBQQ__TestedObject__c and SBQQ__TestedField__c name what is inspected, SBQQ__Operator__c and SBQQ__FilterValue__c the comparison. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Option Constraint</td><td><code>createOptionConstraint</code></td><td>Create an option constraint (SBQQ__OptionConstraint__c) between two options of the same bundle. Type Dependency means the constrained option can only be selected when the constraining one is; Exclusion means the two cannot be selected together. The real lookups are SBQQ__ConstrainedOption__c and SBQQ__ConstrainingOption__c - SBQQ__ConstrainedProductOption__c, SBQQ__ConstrainingProductOption__c and SBQQ__Group__c do not exist in CPQ 262.1. Both lookups are filtered by SBQQ__ConfiguredSKU__c, so supply the bundle product id as well. Option constraints override product rules where both apply. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Price Action</td><td><code>createPriceAction</code></td><td>Create a price action (SBQQ__PriceAction__c) - the write half of a price rule, setting one pricing field on the target record when the rule's conditions are met. SBQQ__TargetField__c and SBQQ__SourceField__c do not exist on this object in CPQ 262.1: the target field is the SBQQ__Field__c picklist, and a source is given by SBQQ__SourceVariable__c, SBQQ__SourceLookupField__c or SBQQ__ValueField__c. Supply exactly one of Value, Formula, SourceVariable or ValueField. The parent rule's SBQQ__TargetObject__c must be Calculator for a quote/quote-line pricing write to fire. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Price Condition</td><td><code>createPriceCondition</code></td><td>Add a price condition (SBQQ__PriceCondition__c) to a price rule - one test against the quote, a quote line, a product option or a summary variable. Conditions on a rule combine according to the rule's SBQQ__ConditionsMet__c. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Price Rule</td><td><code>createPriceRule</code></td><td>Create a price rule (SBQQ__PriceRule__c) - the container for price conditions and price actions that write pricing fields during calculation or configuration. SBQQ__EvaluationScope__c and SBQQ__Description__c do not exist on this object in CPQ 262.1: the scope field is SBQQ__TargetObject__c (Calculator or Configurator), and every price action on the rule depends on it being set correctly. Add conditions with createPriceCondition and actions with createPriceAction. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Product Action</td><td><code>createProductAction</code></td><td>Create a product action (SBQQ__ProductAction__c) - what a Selection- or Filter-type product rule does when it fires: add, remove, show, hide, enable or disable a product or option. Target one product with SBQQ__Product__c, or a set with SBQQ__FilterField__c plus SBQQ__FilterValue__c. SBQQ__Quantity__c, SBQQ__Order__c and SBQQ__FilterOperator__c do not exist on this object in CPQ 262.1. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Product Feature</td><td><code>createProductFeature</code></td><td>Create a feature (SBQQ__ProductFeature__c) on a CPQ bundle - the grouping that product options are filed under in the configurator. Min and max option counts turn the feature into a "pick between N and M of these" control. SBQQ__OptionSelectionMethod__c decides how the options are presented: Click for checkboxes, Add for a search-and-add list, Dynamic for options sourced by a filter. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Product Option</td><td><code>createProductOption</code></td><td>Create a product option (SBQQ__ProductOption__c) - one child product offered inside a CPQ bundle. SBQQ__CanOrderSeparately__c does not exist on this object in CPQ 262.1, and SBQQ__PriceEditable__c and SBQQ__ProductName__c exist but are read-only formula fields, so none of the three can be written. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Product Rule</td><td><code>createProductRule</code></td><td>Create a product rule (SBQQ__ProductRule__c) - the container for the error conditions and product actions that validate or auto-configure a bundle. SBQQ__Message__c and SBQQ__Description__c do not exist on this object in CPQ 262.1: the message field is SBQQ__ErrorMessage__c. SBQQ__Scope__c only accepts Product or Quote. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Quote</td><td><code>createQuote</code></td><td>Create a quote (SBQQ__Quote__c). The quote's Name is an auto-number. SBQQ__ApplyAdditionalDiscountLast__c, SBQQ__ApplyPartnerDiscountFirst__c and SBQQ__ChannelDiscountsOffList__c do not exist on this object in CPQ 262.1 - those discount-ordering switches are package-level settings, not quote fields. CurrencyIsoCode only exists in a multi-currency org. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Quote Line</td><td><code>createQuoteLine</code></td><td>Create a CPQ quote line (SBQQ__QuoteLine__c) directly as an sObject. SBQQ__Quote__c and SBQQ__Product__c are required. Only the fields you supply are sent. Note this bypasses CPQ's configurator and pricing engine: the line is created but not priced, so follow it with calculateQuote and saveQuote, or use addProductsToQuote instead to let CPQ build the line (that is the right call for bundles, since it resolves options, features and product rules). Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Quote Line Group</td><td><code>createQuoteLineGroup</code></td><td>Create a quote line group (SBQQ__QuoteLineGroup__c) on a CPQ quote. The parent quote must have SBQQ__LineItemsGrouped__c true or the group is ignored by the quote line editor. Set SBQQ__SeparateContract__c true to have the group produce its own contract on activation. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Quote Term</td><td><code>createQuoteTerm</code></td><td>Create a quote term (SBQQ__QuoteTerm__c) - one clause CPQ merges into a generated quote document. Name is an auto-number on this object and cannot be supplied: sending it returns INVALID_FIELD_FOR_INSERT_UPDATE. SBQQ__PrintOrder__c is mandatory - the field is not nillable and has no default, so omitting it returns REQUIRED_FIELD_MISSING. Returns {id, success, errors}.</td></tr><tr><td>Create CPQ Summary Variable</td><td><code>createSummaryVariable</code></td><td>Create a summary variable (SBQQ__SummaryVariable__c) - a named aggregate over quote lines that price and product rules can test or write. SBQQ__FilterOperator__c and SBQQ__VariableElement__c do not exist on this object in CPQ 262.1; a filter is expressed with SBQQ__FilterField__c plus SBQQ__FilterValue__c. Returns {id, success, errors}.</td></tr><tr><td>Create Remote Site Setting (webhook infrastructure)</td><td><code>createRemoteSite</code></td><td>Webhook infrastructure, not part of the CPQ product surface. Authorizes an outbound callout host via the Tooling API so the webhook Apex class can POST to it. Salesforce matches Remote Site Settings by EXACT host, so the Fastn webhook host (for example live.gcp.fastn.ai) needs its own entry; a mismatch throws a CalloutException that the Apex class swallows and events vanish silently. Must be stage:live for the subscription resolver to see it.</td></tr><tr><td>Delete Apex Class (webhook infrastructure)</td><td><code>deleteApexClass</code></td><td>Webhook infrastructure, not part of the CPQ product surface. Deletes an Apex class by Tooling API record Id. Used by the unsubscription code after the trigger that references the class has been deleted.</td></tr><tr><td>Delete Apex Trigger (webhook infrastructure)</td><td><code>deleteApexTrigger</code></td><td>Webhook infrastructure, not part of the CPQ product surface. Deletes an Apex trigger by Tooling API record Id. The unsubscription code deletes the trigger before the class it references.</td></tr><tr><td>Delete CPQ Block Price</td><td><code>deleteBlockPrice</code></td><td>Delete a block price (SBQQ__BlockPrice__c) by Id. Quantities that fall in the removed band no longer price at all under Block pricing, so remove or re-bound the neighbouring bands too.</td></tr><tr><td>Delete CPQ Contracted Price</td><td><code>deleteContractedPrice</code></td><td>Delete a contracted price (SBQQ__ContractedPrice__c) by Id. The account falls back to list pricing, or to an inherited parent-account contracted price if one exists.</td></tr><tr><td>Delete CPQ Discount Tier</td><td><code>deleteDiscountTier</code></td><td>Delete a tier (SBQQ__DiscountTier__c) from a discount schedule by Id. Mind the gap it leaves: quantities that fall in the removed band get no discount rather than the neighbouring tier's.</td></tr><tr><td>Delete CPQ Price Rule</td><td><code>deletePriceRule</code></td><td>Delete a price rule (SBQQ__PriceRule__c) by Id. Its price conditions and price actions go with it. Prefer setting SBQQ__Active__c false unless the definition really should be gone.</td></tr><tr><td>Delete CPQ Product Feature</td><td><code>deleteProductFeature</code></td><td>Delete a feature (SBQQ__ProductFeature__c) from a CPQ bundle by Id. Product options filed under the feature lose their grouping, so reassign or delete them first.</td></tr><tr><td>Delete CPQ Product Option</td><td><code>deleteProductOption</code></td><td>Remove an option from a CPQ bundle (SBQQ__ProductOption__c) by Id. Option constraints referencing it are removed with it. Existing quote lines generated from this option are not affected.</td></tr><tr><td>Delete CPQ Product Rule</td><td><code>deleteProductRule</code></td><td>Delete a product rule (SBQQ__ProductRule__c) by Id. Its error conditions, product actions and configuration rules go with it. Prefer setting SBQQ__Active__c false unless you really want the definition gone.</td></tr><tr><td>Delete CPQ Quote</td><td><code>deleteQuote</code></td><td>Delete a CPQ quote (SBQQ__Quote__c) by Id. Cascades to its quote lines and line groups. The record goes to the org recycle bin.</td></tr><tr><td>Delete CPQ Quote Line</td><td><code>deleteQuoteLine</code></td><td>Delete a CPQ quote line (SBQQ__QuoteLine__c) by Id. Deleting a bundle parent also removes the child lines that point at it through SBQQ__RequiredBy__c. Recalculate the quote afterwards.</td></tr><tr><td>Delete CPQ Quote Line Group</td><td><code>deleteQuoteLineGroup</code></td><td>Delete a quote line group (SBQQ__QuoteLineGroup__c) by Id. Lines pointing at the group through SBQQ__Group__c are deleted with it, so move any lines you want to keep into another group first.</td></tr><tr><td>Delete CPQ Quote Term</td><td><code>deleteQuoteTerm</code></td><td>Delete a quote term (SBQQ__QuoteTerm__c) by Id. Its term conditions go with it.</td></tr><tr><td>Generate Quote Document (CPQ API)</td><td><code>generateQuoteDocument</code></td><td>CPQ Quote Document API: render a quote against a quote template and store the result as an SBQQ__QuoteDocument__c. This call is ASYNCHRONOUS - the response body is an Apex queueable job Id (e.g. "7070R00000Nj8mjQAB"), not the document; poll AsyncApexJob for that Id and then read the new SBQQ__QuoteDocument__c. CPQ does not support attaching Additional Document records through the API. Salesforce CPQ Winter '19 and later.</td></tr><tr><td>Get Apex Class By Name (webhook infrastructure)</td><td><code>getApexClassByName</code></td><td>Webhook infrastructure, not part of the CPQ product surface. Looks up an Apex class by developer name via the Tooling API and returns its Id and Body, so the subscription code can tell a reusable helper class from a stale one with an old webhook URL baked in. Returns an empty records array when not found.</td></tr><tr><td>Get Apex Trigger By Name (webhook infrastructure)</td><td><code>getApexTriggerByName</code></td><td>Webhook infrastructure, not part of the CPQ product surface. Looks up an Apex trigger by developer name via the Tooling API so the subscription code can reuse or replace it. Returns an empty records array when not found.</td></tr><tr><td>Get CPQ Product Option</td><td><code>getProductOption</code></td><td>Get one product option (SBQQ__ProductOption__c) by record Id with every field - the bundle it belongs to, the product it offers, and the selection, quantity and pricing behaviour CPQ applies when the bundle is configured.</td></tr><tr><td>Get CPQ Quote</td><td><code>getQuote</code></td><td>Get one CPQ quote (SBQQ__Quote__c) by record Id with every field. This is the plain sObject read; use readQuote instead when you want CPQ's own QuoteModel with the lines and groups embedded.</td></tr><tr><td>Get CPQ Quote Line</td><td><code>getQuoteLine</code></td><td>Get one CPQ quote line (SBQQ__QuoteLine__c) by record Id with every field, including the pricing fields CPQ calculated (list, regular, customer, partner and net price) and the subscription dates.</td></tr><tr><td>Get CPQ Subscription</td><td><code>getSubscription</code></td><td>Get one CPQ subscription (SBQQ__Subscription__c) by record Id with every field, including the renewal quantity and pricing that drive the next renewal quote, and the quote line it originated from.</td></tr><tr><td>List CPQ Block Prices For Product</td><td><code>listBlockPricesForProduct</code></td><td>List the block prices (SBQQ__BlockPrice__c) for one product - the fixed price charged for a whole quantity band rather than per unit, used when a product's pricing method is Block. Bounds are lower-inclusive and upper-exclusive. Max 200 rows.</td></tr><tr><td>List CPQ Configuration Attributes For Product</td><td><code>listConfigurationAttributesForProduct</code></td><td>List the configuration attributes (SBQQ__ConfigurationAttribute__c) on one bundle. A configuration attribute is the control at the top of the configurator that sets one field's value across every option in the bundle or feature at once - colour, region, term and so on. SBQQ__TargetField__c names the field it writes. Max 200 rows.</td></tr><tr><td>List CPQ Configuration Rules</td><td><code>listConfigurationRules</code></td><td>List the configuration rules (SBQQ__ConfigurationRule__c) in the org - the junction records that scope a product rule to one specific bundle, so the same rule can be reused across bundles without firing everywhere. Max 200 rows.</td></tr><tr><td>List CPQ Contracted Prices For Account</td><td><code>listContractedPricesForAccount</code></td><td>List an account's contracted prices (SBQQ__ContractedPrice__c) - the negotiated per-customer prices or discounts that beat list pricing for specific products. CPQ also inherits contracted prices down the account hierarchy unless the account has SBQQ__IgnoreParentContractedPrices__c set. Max 200 rows.</td></tr><tr><td>List CPQ Costs For Product</td><td><code>listCostsForProduct</code></td><td>List the cost records (SBQQ__Cost__c) for one product - the unit costs CPQ prices from when a quote line uses the Cost pricing method (cost plus markup). One record per currency. Max 200 rows.</td></tr><tr><td>List CPQ Discount Schedules</td><td><code>listDiscountSchedules</code></td><td>List the discount schedules (SBQQ__DiscountSchedule__c) in the org - the volume and term discount curves CPQ applies to quote lines. SBQQ__Type__c Range means one tier applies to the whole quantity, Slab means the discount is blended across the preceding tiers. Max 200 rows.</td></tr><tr><td>List CPQ Discount Tiers For Schedule</td><td><code>listDiscountTiersForSchedule</code></td><td>List the tiers (SBQQ__DiscountTier__c) of one discount schedule, in ascending lower bound. Bounds are lower-inclusive and upper-exclusive, so a 1-10 tier and a 10-50 tier do not overlap at 10. Max 200 rows.</td></tr><tr><td>List CPQ Error Conditions For Rule</td><td><code>listErrorConditionsForRule</code></td><td>List the error conditions (SBQQ__ErrorCondition__c) attached to one product rule - the tests that decide whether the rule fires. How they combine is set by the rule's SBQQ__ConditionsMet__c. Max 200 rows.</td></tr><tr><td>List CPQ Option Constraints For Option</td><td><code>listOptionConstraintsForOption</code></td><td>List the option constraints (SBQQ__OptionConstraint__c) where one product option is the constraining side - the rules that say selecting this option requires (Dependency) or forbids (Exclusion) another option in the same bundle. Option constraints override product rules when both apply. Max 200 rows.</td></tr><tr><td>List CPQ Price Actions For Rule</td><td><code>listPriceActionsForRule</code></td><td>List the price actions (SBQQ__PriceAction__c) on one price rule - the field writes the rule performs when its conditions are met, such as setting a discount percentage or injecting a unit price. Max 200 rows.</td></tr><tr><td>List CPQ Price Conditions For Rule</td><td><code>listPriceConditionsForRule</code></td><td>List the price conditions (SBQQ__PriceCondition__c) on one price rule - the tests that decide whether the rule's price actions run. Max 200 rows.</td></tr><tr><td>List CPQ Price Dimensions For Product</td><td><code>listDimensionsForProduct</code></td><td>List the price dimensions (SBQQ__Dimension__c) on one product - the segments that turn a subscription into a multi-dimensional quote, so each year, quarter or month of the term can be priced separately. Segment index 0 is the one-time or activation segment; 1 upwards are the recurring segments. Max 200 rows.</td></tr><tr><td>List CPQ Price Rules</td><td><code>listPriceRules</code></td><td>List the price rules (SBQQ__PriceRule__c) in the org - the automation that injects prices, discounts and field values during calculation or configuration. Conditions live on SBQQ__PriceCondition__c and the writes on SBQQ__PriceAction__c. Max 200 rows.</td></tr><tr><td>List CPQ Product Actions For Rule</td><td><code>listProductActionsForRule</code></td><td>List the product actions (SBQQ__ProductAction__c) attached to one product rule - what the rule does to the configuration when it fires: add, remove, show, hide, enable or disable a product or a filtered set of options. Max 200 rows.</td></tr><tr><td>List CPQ Product Features For Product</td><td><code>listProductFeaturesForProduct</code></td><td>List the features (SBQQ__ProductFeature__c) of one bundle. A feature groups related product options in the configurator and enforces how many of them may be chosen through SBQQ__MinOptionCount__c and SBQQ__MaxOptionCount__c. Max 200 rows.</td></tr><tr><td>List CPQ Product Options For Product</td><td><code>listProductOptionsForProduct</code></td><td>List the product options (SBQQ__ProductOption__c) that make up one bundle, in display order. SBQQ__ConfiguredSKU__c is the parent bundle and SBQQ__OptionalSKU__c is the child product each option offers. This is the definition of the bundle; readProduct returns the same structure resolved into a CPQ ProductModel. Max 200 rows.</td></tr><tr><td>List CPQ Product Rules</td><td><code>listProductRules</code></td><td>List the product rules (SBQQ__ProductRule__c) in the org - the validation, alert, selection and filter rules CPQ runs while a bundle is configured or a quote is edited. Each rule's conditions live on SBQQ__ErrorCondition__c and its consequences on SBQQ__ProductAction__c. Max 200 rows.</td></tr><tr><td>List CPQ Quote Documents For Quote</td><td><code>listQuoteDocumentsForQuote</code></td><td>List the generated documents (SBQQ__QuoteDocument__c) for one quote, newest first. These records are produced by CPQ's document generation (see generateQuoteDocument) and are read-only audit records - never create or update them directly. Each one points at the stored PDF or Word file; fetch the file itself through the salesforce connector's ContentVersion or Attachment actions. Max 200 rows.</td></tr><tr><td>List CPQ Quote Line Groups For Quote</td><td><code>listQuoteLineGroupsForQuote</code></td><td>List the quote line groups (SBQQ__QuoteLineGroup__c) on one CPQ quote, in display order. Groups only exist when the quote has SBQQ__LineItemsGrouped__c true. A group with SBQQ__SeparateContract__c true becomes its own contract when the quote is ordered and contracted. Max 200 rows.</td></tr><tr><td>List CPQ Quote Lines For Quote</td><td><code>listQuoteLinesForQuote</code></td><td>List the quote lines (SBQQ__QuoteLine__c) on one CPQ quote, in line-number order. Bundle children point at their parent line through SBQQ__RequiredBy__c, so the flat list reconstructs the bundle tree. Max 200 rows.</td></tr><tr><td>List CPQ Quote Templates</td><td><code>listQuoteTemplates</code></td><td>List the quote templates (SBQQ__QuoteTemplate__c) configured in the org. You need one of these Ids to call generateQuoteDocument or to resolve terms with readQuoteTerms; SBQQ__IsDefault__c marks the org default. Max 200 rows.</td></tr><tr><td>List CPQ Quote Terms</td><td><code>listQuoteTerms</code></td><td>List the quote terms (SBQQ__QuoteTerm__c) defined in the org - the reusable legal clauses that print on quote documents. SBQQ__Body__c holds the clause text and supports CPQ merge syntax. Use readQuoteTerms instead to see which terms actually resolve for a given quote and template. Max 200 rows.</td></tr><tr><td>List CPQ Quotes</td><td><code>listQuotes</code></td><td>List Salesforce CPQ quotes (SBQQ__Quote__c) via SELECT FIELDS(ALL)... LIMIT 200. These are CPQ quotes, NOT the standard Salesforce Quote object - use the salesforce connector's listQuotes for those. Fixed SOQL, max 200 rows (Salesforce caps FIELDS(ALL) at 200 so nextRecordsUrl is never returned); for filtering beyond the dedicated list actions use the salesforce connector's executeSoqlQuery.</td></tr><tr><td>List CPQ Quotes For Opportunity</td><td><code>listQuotesForOpportunity</code></td><td>List every CPQ quote (SBQQ__Quote__c) on one opportunity, newest first, via SOQL on SBQQ__Opportunity2__c. SBQQ__Primary__c marks the one quote that syncs its lines back to the opportunity. Max 200 rows.</td></tr><tr><td>List CPQ Subscriptions For Account</td><td><code>listSubscriptionsForAccount</code></td><td>List an account's CPQ subscriptions (SBQQ__Subscription__c) - the live recurring entitlements CPQ created when quotes were contracted. This is the object an amendment or renewal quote is built from. Max 200 rows.</td></tr><tr><td>List CPQ Subscriptions For Contract</td><td><code>listSubscriptionsForContract</code></td><td>List the CPQ subscriptions (SBQQ__Subscription__c) created under one contract. Use this before amendContract or renewContracts to see exactly what is being amended or renewed. Max 200 rows.</td></tr><tr><td>List CPQ Summary Variables</td><td><code>listSummaryVariables</code></td><td>List the summary variables (SBQQ__SummaryVariable__c) in the org - the named aggregates (sum, min, max, average, count) over a filtered set of quote lines that product rules and price rules test against. Max 200 rows.</td></tr><tr><td>List CPQ-Configured Products</td><td><code>listCpqProducts</code></td><td>List Product2 records along with their CPQ configuration fields - how the product behaves in the configurator and the pricing engine (bundle configuration type, option layout, subscription pricing, pricing method, asset conversion). Use this rather than the salesforce connector's listProducts when what you need is the CPQ setup of a product, for example to find which products are configurable bundles before calling readProduct. Max 200 rows.</td></tr><tr><td>Load Product Configuration (CPQ API)</td><td><code>loadProductConfiguration</code></td><td>CPQ Configuration API: load a configurable product's ConfigurationModel in the context of a quote, so a caller can drive the configurator (options, features, configuration attributes) outside the CPQ UI. uid is the Product2 Id. Pass parentProduct to inherit configuration attributes from a parent bundle. Returns a ProductModel. Salesforce CPQ Spring '17 and later.</td></tr><tr><td>Read Product (CPQ API)</td><td><code>readProduct</code></td><td>CPQ Product API: load a product as a CPQ ProductModel - the Product2 record plus its options, features and configuration - ready to hand to addProductsToQuote. uid is the Product2 Id and the context carries the pricebook. The connected user needs read access to Product2. Salesforce CPQ Summer '16 and later.</td></tr><tr><td>Read Quote (CPQ API)</td><td><code>readQuote</code></td><td>CPQ Quote API: read a full QuoteModel through SBQQ.ServiceRouter.read. Returns the quote record plus every quote line and line group as CPQ's own JSON model (record, nextKey, netTotal, netNonSegmentTotal, customerTotal, lineItems[], lineItemGroups[]) - this is the model you feed back into calculateQuote, addProductsToQuote, validateQuote and saveQuote. The only GET in the CPQ API. Salesforce CPQ Summer '16 and later.</td></tr><tr><td>Read Quote Terms (CPQ API)</td><td><code>readQuoteTerms</code></td><td>CPQ Quote Term API: read the terms and conditions that apply to a quote, optionally resolved against a quote template and a language. Without templateId the terms associated with the template contents are not returned. The raw upstream response is a bare array of QuoteTermModels; Fastn surfaces it under items. Salesforce CPQ Summer '19 and later.</td></tr><tr><td>Reject Approval Request (Advanced Approvals API)</td><td><code>rejectApprovalRequest</code></td><td>Advanced Approvals API: reject an sbaa__Approval__c record with an optional comment. Note this endpoint lives under the SEPARATE Advanced Approvals managed package (namespace sbaa) at /services/apexrest/sbaa/ServiceRouter, not the CPQ SBQQ router - it Advanced Approvals Spring '21 and later.</td></tr><tr><td>Renew Contracts (CPQ API)</td><td><code>renewContracts</code></td><td>CPQ Contract Manipulation API: generate renewal quotes for one or more contracts, the API equivalent of the Renew button. Pass masterContractId to co-term several contracts onto one master. The raw upstream response is a bare array of QuoteModels (or, with returnOnlyQuoteId true, the bare quote id object); Fastn surfaces it under items. Salesforce CPQ Summer '16 and later; returnOnlyQuoteId is Winter '21 and later.</td></tr><tr><td>Run Configuration Load Rules (CPQ API)</td><td><code>runConfigurationLoadRules</code></td><td>CPQ Configuration API: invoke every load-event product rule for a configurable product and get the resulting ProductModel back. This is what applies auto-selection, hiding and default-setting rules when a bundle is opened. uid is the Product2 Id. lineItemKey identifies upgrade options in amendment flows; dynamicOptionSkus supplies dynamically sourced option SKUs. Salesforce CPQ Spring '17 and later.</td></tr><tr><td>Save Quote (CPQ API)</td><td><code>saveQuote</code></td><td>CPQ Quote API: persist a whole QuoteModel through SBQQ.ServiceRouter.save - the quote header, every quote line and every line group in one call, running CPQ's own save logic rather than raw sObject DML. The provider name travels in the body, not the query string, which is why this call has no query parameters. Pass the model as a JSON string (the model CPQ returned from readQuote or calculateQuote, re-serialized); Fastn escapes it into the body for you. Returns the saved QuoteModel. Salesforce CPQ Summer '16 and later.</td></tr><tr><td>Set Contract Renewal Fields (CPQ)</td><td><code>setContractRenewalFields</code></td><td>Set CPQ's renewal fields on a standard Contract. SBQQ__RenewalForecast__c true makes CPQ create the renewal opportunity with forecast amounts; SBQQ__RenewalQuoted__c true marks that a renewal quote now exists - until it is set, the renewal opportunity has no renewal quote attached. Both are CPQ-added fields on the standard Contract object. Contract generation itself is asynchronous, so allow time after contracting before setting these.</td></tr><tr><td>Update CPQ Contracted Price</td><td><code>updateContractedPrice</code></td><td>Update a contracted price (SBQQ__ContractedPrice__c) by Id. Only id is required; omitted fields are untouched. Quotes already calculated keep their old prices until recalculated.</td></tr><tr><td>Update CPQ Price Rule</td><td><code>updatePriceRule</code></td><td>Update a price rule (SBQQ__PriceRule__c) by Id. Only id is required; omitted fields are untouched. Setting SBQQ__Active__c false retires the rule without losing its conditions and actions. Quotes already calculated keep their prices until recalculated.</td></tr><tr><td>Update CPQ Product Option</td><td><code>updateProductOption</code></td><td>Update a product option (SBQQ__ProductOption__c) by Id. Only id is required; omitted fields are untouched. Changes affect future configurations only - quote lines already generated from this option are not retrofitted.</td></tr><tr><td>Update CPQ Product Rule</td><td><code>updateProductRule</code></td><td>Update a product rule (SBQQ__ProductRule__c) by Id. Only id is required; omitted fields are untouched. Setting SBQQ__Active__c false is the safe way to retire a rule without deleting its conditions and actions.</td></tr><tr><td>Update CPQ Quote</td><td><code>updateQuote</code></td><td>Update a CPQ quote (SBQQ__Quote__c) by Id. Only id is required; every other field you supply is sent and omitted fields are untouched. Send at least one field, an empty body is rejected with JSON_PARSER_ERROR. Editing pricing-relevant fields here does NOT recalculate the quote - run calculateQuote and saveQuote for that. Rollup fields such as SBQQ__NetAmount__c are read-only.</td></tr><tr><td>Update CPQ Quote Line</td><td><code>updateQuoteLine</code></td><td>Update a CPQ quote line (SBQQ__QuoteLine__c) by Id. Only id is required; omitted fields are untouched. Send at least one field. This does NOT reprice the quote - run calculateQuote then saveQuote afterwards, or CPQ's totals will disagree with the line. SBQQ__NetPrice__c and SBQQ__NetTotal__c are calculated, not writable.</td></tr><tr><td>Update CPQ Quote Line Group</td><td><code>updateQuoteLineGroup</code></td><td>Update a quote line group (SBQQ__QuoteLineGroup__c) by Id. Only id is required; omitted fields are untouched. Send at least one field. List and net totals on the group are rollups and are not writable.</td></tr><tr><td>Update CPQ Quote Term</td><td><code>updateQuoteTerm</code></td><td>Update a quote term (SBQQ__QuoteTerm__c) by Id. Only id is required; omitted fields are untouched. Name is an auto-number on this object and is not writable - sending it returns INVALID_FIELD_FOR_INSERT_UPDATE.</td></tr><tr><td>Update CPQ Subscription</td><td><code>updateSubscription</code></td><td>Update a subscription (SBQQ__Subscription__c) by Id - the renewal-forecasting fields CPQ reads when it builds a renewal quote. SBQQ__RenewalTerm__c and SBQQ__RenewalPricingMethod__c do not exist on this object in CPQ 262.1; renewal term and pricing method live on the parent Contract (see setContractRenewalFields).</td></tr><tr><td>Validate Product Configuration (CPQ API)</td><td><code>validateProductConfiguration</code></td><td>CPQ Configuration API: run validation product rules against a product configuration and get the ConfigurationModel back with validationMessages populated. uid is the Product2 Id. The event property is required and selects which rule set runs: Load, Save, Edit or Always. Salesforce CPQ Spring '17 and later.</td></tr><tr><td>Validate Quote (CPQ API)</td><td><code>validateQuote</code></td><td>CPQ Quote API: run CPQ's validation product rules against a QuoteModel and get the error messages back. Returns a bare JSON array of strings, empty when the quote is valid; Fastn surfaces it under items. Unlike calculateQuote the context here is the QuoteModel itself, NOT wrapped in a quote key. Salesforce CPQ Winter '19 and later. Note: the Salesforce curl sample spells the provider QuoteAPI.QuoteValidator without the SBQQ prefix while the Apex sample on the same page uses the fully qualified SBQQ.QuoteAPI.QuoteValidator, which is what this action sends.</td></tr></tbody></table>

</details>

## Events

Start a workflow when one of these happens, with an [app event trigger](https://docs.fastn.ai/build/integrations/triggers.md).

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>CPQ Contracted Price Created</td><td><code>sbqq__contractedprice__c.created</code></td><td>Fires after a new SBQQ__ContractedPrice__c record is inserted.</td></tr><tr><td>CPQ Contracted Price Deleted</td><td><code>sbqq__contractedprice__c.deleted</code></td><td>Fires after an SBQQ__ContractedPrice__c record is deleted.</td></tr><tr><td>CPQ Contracted Price Updated</td><td><code>sbqq__contractedprice__c.updated</code></td><td>Fires after an SBQQ__ContractedPrice__c record is updated.</td></tr><tr><td>CPQ Quote Created</td><td><code>sbqq__quote__c.created</code></td><td>Fires after a new SBQQ__Quote__c record is inserted.</td></tr><tr><td>CPQ Quote Deleted</td><td><code>sbqq__quote__c.deleted</code></td><td>Fires after an SBQQ__Quote__c record is deleted.</td></tr><tr><td>CPQ Quote Document Generated</td><td><code>sbqq__quotedocument__c.created</code></td><td>Fires after a new SBQQ__QuoteDocument__c record is inserted, which is the completion signal for the asynchronous generateQuoteDocument call.</td></tr><tr><td>CPQ Quote Line Created</td><td><code>sbqq__quoteline__c.created</code></td><td>Fires after a new SBQQ__QuoteLine__c record is inserted. Note a bundle produces one event per line, parent and children.</td></tr><tr><td>CPQ Quote Line Deleted</td><td><code>sbqq__quoteline__c.deleted</code></td><td>Fires after an SBQQ__QuoteLine__c record is deleted.</td></tr><tr><td>CPQ Quote Line Group Created</td><td><code>sbqq__quotelinegroup__c.created</code></td><td>Fires after a new SBQQ__QuoteLineGroup__c record is inserted.</td></tr><tr><td>CPQ Quote Line Group Deleted</td><td><code>sbqq__quotelinegroup__c.deleted</code></td><td>Fires after an SBQQ__QuoteLineGroup__c record is deleted.</td></tr></tbody></table>

<details>

<summary>View 6 more events</summary>

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>CPQ Quote Line Group Updated</td><td><code>sbqq__quotelinegroup__c.updated</code></td><td>Fires after an SBQQ__QuoteLineGroup__c record is updated.</td></tr><tr><td>CPQ Quote Line Updated</td><td><code>sbqq__quoteline__c.updated</code></td><td>Fires after an SBQQ__QuoteLine__c record is updated. Recalculating a quote updates every line, so expect a burst.</td></tr><tr><td>CPQ Quote Updated</td><td><code>sbqq__quote__c.updated</code></td><td>Fires after an SBQQ__Quote__c record is updated. This is the one to bind for status changes such as Draft to Approved.</td></tr><tr><td>CPQ Subscription Created</td><td><code>sbqq__subscription__c.created</code></td><td>Fires after a new SBQQ__Subscription__c record is inserted, which is how CPQ signals that a quote has been contracted and a recurring entitlement now exists.</td></tr><tr><td>CPQ Subscription Deleted</td><td><code>sbqq__subscription__c.deleted</code></td><td>Fires after an SBQQ__Subscription__c record is deleted.</td></tr><tr><td>CPQ Subscription Updated</td><td><code>sbqq__subscription__c.updated</code></td><td>Fires after an SBQQ__Subscription__c record is updated, including renewal-forecast changes.</td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/crm-sales/salesforce-cpq.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
