CommerceQuotes Class

ConnectApi

These methods are for CommerceQuotes. All methods are static.

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.

67.0

No

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

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.

Type: ConnectApi.UpdateQuoteOutput

Get quote details associated with a specified account.

66.0

No

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

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.

Type: ConnectApi.CommerceQuoteDetail

Get all quotes associated with a specified account.

66.0

No

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

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.

Type: ConnectApi.CommerceQuoteCollection

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.

67.0

No

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

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.

Type: ConnectApi.CreateQuoteFromProductOutput