CommerceQuotes Class

Namespace

ConnectApi

CommerceQuotes Methods

These methods are for CommerceQuotes. All methods are static.

updateQuote(webstoreId, quoteId, updateQuoteInput)

Initiate a quote renegotiation or decline a quote.

This method initiates negotiation only when the quote status is Approved, as triggered by the Renegotiate or Decline action on the My Quotes page of the B2B storefront.

Updates quote status based on user action, changing Approved quotes back to Draft for renegotiation while saving comments, or setting status to Denied for rejected quotes.

API Version

67.0

Requires Chatter

No

Signature

public static ConnectApi.UpdateQuoteOutput updateQuote(String webstoreId, String quoteId, ConnectApi.updateQuoteInput updateQuoteInput)

Parameters

webstoreId
Type: String
ID of the webstore
quoteId
Type: String
ID of the quote whose status is to be updated.
updateQuoteInput
Type: ConnectApi.updateQuoteInput
Representation for updating the quote status and optionally creating an associated note.

Return Value

Type: ConnectApi.UpdateQuoteOutput

getQuoteDetail(webstoreId, quoteId, effectiveAccountId, fields)

Get quote details associated with a specified account.

API Version

66.0

Requires Chatter

No

Signature

public static ConnectApi.CommerceQuoteDetail getQuoteDetail(String webstoreId, String quoteId, String effectiveAccountId, String fields)

Parameters

webstoreId
Type: String
ID of the web store.
quoteId
Type: String
ID of the quote.
effectiveAccountId
Type: String
User account ID used to retreive associated quote details.
fields
Type: String
List of fields to include in the response. Supports fields from the objects, including Quote, Quote Line Item, and Product2.

Return Value

Type: ConnectApi.CommerceQuoteDetail

getQuotes(webstoreId, effectiveAccountId, fields, sortParam, pageSize, pageToken, earliestDate, latestDate)

Get all quotes associated with a specified account.

API Version

66.0

Requires Chatter

No

Signature

public static ConnectApi.CommerceQuoteCollection getQuotes(String webstoreId, String effectiveAccountId, String fields, ConnectApi.CommereQuotesSortOrder sortParam, Integer pageSize, String pageToken, String earliestDate, String latestDate)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
User account ID used to retreive associated quotes.
fields
Type: String
List of fields to include in the response. Supports fields from the objects, including Quote, Quote Line Item, and Product2.
sortParam
Type: ConnectApi.CommereQuotesSortOrder
Sort order for quotes. Valid values:
  • CreatedDateAsc—Sorts by the oldest created date.
  • CreatedDateDesc—Sorts by the most recent created date.
pageSize
Type: Integer
Number of items per page. Valid values are from 1 through 200. The default value is 25.
pageToken
Type: String
Base64 encoded page token to use to view a page of information. Page tokens are pageToken String returned as part of the response, such as currentPageToken or nextPageToken. If you don’t specify a value, the first page is returned.
earliestDate
Type: String
ISO 8601 date string for the oldest date from which to get quote records. Return quotes created on or after this date. Valid format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
latestDate
Type: String
ISO 8601 date string for the most recent date from which to get quote records. Return quotes created before this date. Valid format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.

createQuoteFromProduct(webstoreId, productId, createQuoteFromProductInput)

Create a quote from a product.

This method creates a new quote from a product on the Product Display Pages (PDP) in a B2B storefront. It creates a temporary (secondary) cart to process the request. It converts the product details into quote line items based on the specified product ID and quantity. After processing, the secondary cart is deleted, regardless of whether the API call succeeds or fails.

Supported product types by license:

  • Simple products—Supported with B2B Commerce Only or B2B Commerce and Revenue Cloud licenses.
  • Static Bundled—Supported only with the B2B Commerce and Revenue Cloud licenses.

API Version

67.0

Requires Chatter

No

Signature

public static ConnectApi.CreateQuoteFromProductOutput createQuoteFromProduct(String webstoreId, String productId, ConnectApi.CreateQuoteFromProductInput createQuoteFromProductInput)

Parameters

webstoreId
Type: String
ID of the webstore.
productId
Type: String
ID of the product to convert to a quote.
createQuoteFromProductInput
Type: ConnectApi.CreateQuoteFromProductInput
Representation for creating a quote from a product.