Quote Management Functions
The Quote Management drop-in provides API functions for managing negotiable quotes and quote templates, including creating quote requests, working with quote templates, managing items and quantities, and handling attachments.
| Function | Description |
|---|---|
acceptQuoteTemplate | Accepts a negotiable quote template. |
addQuoteTemplateLineItemNote | Adds a buyer’s note to a specific item in a negotiable quote template. |
addQuoteTemplateShippingAddress | Assigns a shipping address to a negotiable quote template. |
cancelQuoteTemplate | Cancels a negotiable quote template. |
closeNegotiableQuote | Closes one or more negotiable quotes and emits success or error events with operation results. |
createQuoteTemplate | Creates a new negotiable quote template from an existing quote. |
deleteQuote | Deletes one or more negotiable quotes. |
deleteQuoteTemplate | Permanently deletes a negotiable quote template. |
duplicateQuote | Creates a copy of a negotiable quote and emits an event with the duplicated quote data. |
generateQuoteFromTemplate | Generates a negotiable quote from an accepted quote template. |
getQuoteData | Retrieves negotiable quote details by ID and emits an event with the latest quote data. |
getQuoteTemplateData | Fetches negotiable quote template data by template ID. |
getQuoteTemplates | Retrieves the list of negotiable quote templates for the authenticated customer and emits an event with the template list. |
getStoreConfig | Retrieves store configuration used by Quote Management. |
negotiableQuotes | Retrieves the list of negotiable quotes for the authenticated customer. |
openQuoteTemplate | Opens an existing negotiable quote template. |
removeNegotiableQuoteItems | Removes one or more items from a negotiable quote and emits an event with the updated quote data. |
removeQuoteTemplateItems | Removes one or more products from an existing negotiable quote template. |
renameNegotiableQuote | Renames a negotiable quote. |
requestNegotiableQuote | Creates a new negotiable quote request from the current cart. |
sendForReview | Submits a negotiable quote for review by the seller. |
sendQuoteTemplateForReview | Submits a negotiable quote template for review by the seller. |
setQuoteTemplateExpirationDate | Sets the expiration date for a negotiable quote template. |
setLineItemNote | Sets a note for a specific negotiable quote line item and emits events with the updated quote data. |
setShippingAddress | Sets or updates the shipping address for a negotiable quote. |
updateQuantities | Updates the quantities of items in a negotiable quote. |
updateQuoteTemplateItemQuantities | Changes the quantity of one or more items in an existing negotiable quote template. |
uploadFile | Uploads a file attachment and returns a key for associating the file with a quote or quote template. |
acceptQuoteTemplate
Section titled “acceptQuoteTemplate”Accepts a negotiable quote template. This action finalizes the acceptance of a quote template from the buyer’s side, returns the updated template data on success, and emits an event for successful acceptance.
const acceptQuoteTemplate = async ( params: AcceptQuoteTemplateParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | AcceptQuoteTemplateParams | Yes | An object of type `AcceptQuoteTemplateParams` containing the template UID and acceptance details. See the type definition for available fields. |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns NegotiableQuoteModel.
addQuoteTemplateLineItemNote
Section titled “addQuoteTemplateLineItemNote”Adds a buyer’s note to a specific item in a negotiable quote template. This allows buyers to provide additional information or special instructions for individual line items.
const addQuoteTemplateLineItemNote = async ( params: AddQuoteTemplateLineItemNoteParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | AddQuoteTemplateLineItemNoteParams | Yes | An object of type `AddQuoteTemplateLineItemNoteParams` containing the template UID, item UID, and note text to add to a specific line item. |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns void.
addQuoteTemplateShippingAddress
Section titled “addQuoteTemplateShippingAddress”Assigns a shipping address to a negotiable quote template. This can be either a previously-defined customer address (by ID) or a new address provided with full details.
const addQuoteTemplateShippingAddress = async ( params: AddQuoteTemplateShippingAddressParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | AddQuoteTemplateShippingAddressParams | Yes | An object of type `AddQuoteTemplateShippingAddressParams` containing the template UID and shipping address details (street, city, region, postal code, country). |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns void.
cancelQuoteTemplate
Section titled “cancelQuoteTemplate”Cancels a negotiable quote template. This action allows buyers to cancel a quote template they no longer need, with an optional comment to provide the reason for cancellation. Returns the updated template data on success and emits an event for successful cancellation.
const cancelQuoteTemplate = async ( params: CancelQuoteTemplateParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | CancelQuoteTemplateParams | Yes | An object of type `CancelQuoteTemplateParams` containing the template UID to cancel. This moves the quote template to canceled status. |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns void.
closeNegotiableQuote
Section titled “closeNegotiableQuote”Closes one or more negotiable quotes and emits success or error events with operation results.
const closeNegotiableQuote = async ( input: CloseNegotiableQuoteInput): Promise<CloseNegotiableQuoteResult>| Parameter | Type | Req? | Description |
|---|---|---|---|
input | CloseNegotiableQuoteInput | Yes | An object containing an array of quote UIDs to close. Required field: quoteUids (array of strings, must not be empty). |
Events
Section titled “Events”Emits the following events: quote-management/negotiable-quote-close-error, quote-management/negotiable-quote-closed.
Returns
Section titled “Returns”Returns CloseNegotiableQuoteResult.
createQuoteTemplate
Section titled “createQuoteTemplate”Creates a new negotiable quote template from an existing quote. Returns the newly created template data on success and emits an event with the template data and user permissions.
const createQuoteTemplate = async ( quoteId: string): Promise<NegotiableQuoteTemplateModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
quoteId | string | Yes | The unique identifier for the negotiable quote to convert into a reusable template. Creates a template that can be used to generate similar quotes in the future. |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns NegotiableQuoteTemplateModel or null.
deleteQuote
Section titled “deleteQuote”Deletes one or more negotiable quotes. Deleted quotes become invisible from both the Admin and storefront. On success, it emits an event with the deleted quote UIDs.
const deleteQuote = async ( quoteUids: string[] | string): Promise<DeleteQuoteOutput>| Parameter | Type | Req? | Description |
|---|---|---|---|
quoteUids | string[] | string | Yes | One or more negotiable quote unique identifiers to delete. Can be a single UID string or an array of UIDs for batch deletion. This permanently removes the quotes. |
Events
Section titled “Events”Emits the following events: quote-management/negotiable-quote-delete-error, quote-management/negotiable-quote-deleted.
Returns
Section titled “Returns”Returns DeleteQuoteOutput.
deleteQuoteTemplate
Section titled “deleteQuoteTemplate”Permanently deletes a negotiable quote template. This action removes the template from the system, returns a success result, and emits an event for successful deletion. This operation is irreversible.
const deleteQuoteTemplate = async ( params: DeleteQuoteTemplateParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | DeleteQuoteTemplateParams | Yes | An object of type `DeleteQuoteTemplateParams` containing the template UID to delete. This permanently removes the quote template. |
Events
Section titled “Events”Emits the quote-management/quote-template-deleted event.
Returns
Section titled “Returns”Returns void.
duplicateQuote
Section titled “duplicateQuote”Creates a copy of a negotiable quote and emits an event with the duplicated quote data.
Signature
Section titled “Signature”function duplicateQuote(input: DuplicateQuoteInput): Promise<NegotiableQuoteModel | null>Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
input | DuplicateQuoteInput | Yes | An object containing the original quote UID, duplicated quote UID, and optional out-of-stock flag. Required fields: quoteUid (string), duplicatedQuoteUid (string). Optional field: hasOutOfStockItems (boolean). |
Returns
Section titled “Returns”Returns Promise<NegotiableQuoteModel | null>.
Events
Section titled “Events”Emits the quote-management/quote-duplicated event.
generateQuoteFromTemplate
Section titled “generateQuoteFromTemplate”Generates a negotiable quote from an accepted quote template. This creates a new quote based on the template’s configuration and items.
const generateQuoteFromTemplate = async ( params: GenerateQuoteFromTemplateParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | GenerateQuoteFromTemplateParams | Yes | An object of type `GenerateQuoteFromTemplateParams` containing the template UID and any customization parameters. Creates a new negotiable quote based on the template structure. |
Events
Section titled “Events”Emits the quote-management/quote-template-generated event.
Returns
Section titled “Returns”Returns void.
getQuoteData
Section titled “getQuoteData”Retrieves negotiable quote details by ID and emits an event with the latest quote data.
const getQuoteData = async ( quoteId: string): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
quoteId | string | Yes | The unique identifier for the negotiable quote to retrieve. Returns complete quote details including items, prices, history, comments, and negotiation status. |
Events
Section titled “Events”Emits the quote-management/quote-data event.
Returns
Section titled “Returns”Returns void.
getQuoteTemplateData
Section titled “getQuoteTemplateData”Fetches negotiable quote template data by template ID. Returns the transformed template data on success and emits an event with the template data and user permissions.
const getQuoteTemplateData = async ( templateId: string): Promise<NegotiableQuoteTemplateModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
templateId | string | Yes | The unique identifier for the quote template to retrieve. Returns template details including structure, items, and configuration settings. |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns NegotiableQuoteTemplateModel or null.
getQuoteTemplates
Section titled “getQuoteTemplates”Retrieves the list of negotiable quote templates for the authenticated customer and emits an event with the template list.
const getQuoteTemplates = async ( params: GetQuoteTemplatesParams = {}): Promise<NegotiableQuoteTemplatesListModel>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | GetQuoteTemplatesParams | No | An optional object of type `GetQuoteTemplatesParams` containing pagination and filter criteria (currentPage, pageSize, filter). Omit to retrieve all templates with default pagination. |
Events
Section titled “Events”Emits the quote-management/quote-templates-data event.
Returns
Section titled “Returns”Returns NegotiableQuoteTemplatesListModel.
getStoreConfig
Section titled “getStoreConfig”Retrieves store configuration used by Quote Management.
const getStoreConfig = async (): Promise<StoreConfigModel>Events
Section titled “Events”Does not emit any drop-in events.
Returns
Section titled “Returns”Returns StoreConfigModel.
negotiableQuotes
Section titled “negotiableQuotes”Retrieves the list of negotiable quotes for the authenticated customer.
const negotiableQuotes = async ( params: NegotiableQuotesParams = {}): Promise<NegotiableQuotesListModel>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | NegotiableQuotesParams | No | An optional object of type `NegotiableQuotesParams` containing pagination and filter criteria (currentPage, pageSize, filter). Omit to retrieve all negotiable quotes with default pagination. |
Events
Section titled “Events”Does not emit any drop-in events.
Returns
Section titled “Returns”Returns NegotiableQuotesListModel.
openQuoteTemplate
Section titled “openQuoteTemplate”Opens an existing negotiable quote template. This action allows buyers to reopen a quote template for viewing or editing, returns the updated template data on success, and emits an event with the template data.
const openQuoteTemplate = async ( params: OpenQuoteTemplateParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | OpenQuoteTemplateParams | Yes | An object of type `OpenQuoteTemplateParams` containing the template UID to open or activate. This makes the template available for generating quotes. |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns void.
removeNegotiableQuoteItems
Section titled “removeNegotiableQuoteItems”Removes one or more items from a negotiable quote and emits an event with the updated quote data.
const removeNegotiableQuoteItems = async ( input: RemoveNegotiableQuoteItemsInput): Promise<NegotiableQuoteModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
input | RemoveNegotiableQuoteItemsInput | Yes | An object containing the quote UID and an array of item UIDs to remove. Required fields: quoteUid (string), quoteItemUids (array of strings, must not be empty). |
Events
Section titled “Events”Emits the quote-management/quote-items-removed event.
Returns
Section titled “Returns”Returns NegotiableQuoteModel or null.
removeQuoteTemplateItems
Section titled “removeQuoteTemplateItems”Removes one or more products from an existing negotiable quote template. This allows you to delete items from a template by providing their unique identifiers.
const removeQuoteTemplateItems = async ( params: RemoveQuoteTemplateItemsParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | RemoveQuoteTemplateItemsParams | Yes | An object of type `RemoveQuoteTemplateItemsParams` containing the template UID and an array of item UIDs to remove from the template. |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns void.
renameNegotiableQuote
Section titled “renameNegotiableQuote”Renames a negotiable quote. It supports renaming quotes with or without a comment explaining the reason for the rename, returns the updated quote data on success, and emits an event for successful renames.
const renameNegotiableQuote = async ( input: RenameNegotiableQuoteInput): Promise<NegotiableQuoteModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
input | RenameNegotiableQuoteInput | Yes | An object containing the quote UID, new quote name, and optional comment. Required fields: quoteUid (string), quoteName (string). Optional field: quoteComment (string). |
Events
Section titled “Events”Emits the quote-management/quote-renamed event.
Returns
Section titled “Returns”Returns NegotiableQuoteModel or null.
requestNegotiableQuote
Section titled “requestNegotiableQuote”Creates a new negotiable quote request from the current cart. This initiates the quote negotiation workflow, converting cart items into a quote that can be reviewed and negotiated by the seller.
const requestNegotiableQuote = async ( input: RequestNegotiableQuoteInput): Promise<NegotiableQuoteModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
input | RequestNegotiableQuoteInput | Yes | An object containing the cart ID, quote name, comment, optional draft flag, and optional file attachments. Required fields: cartId (string), quoteName (string), comment (string). Optional fields: isDraft (boolean), attachments (array of objects with key property). |
Events
Section titled “Events”Emits the quote-management/negotiable-quote-requested event.
Returns
Section titled “Returns”Returns NegotiableQuoteModel or null.
sendForReview
Section titled “sendForReview”Submits a negotiable quote for review by the seller. It supports submitting quotes with or without a comment, returns the updated quote data on success, and emits an event for successful submissions.
const sendForReview = async ( input: SendForReviewInput): Promise<NegotiableQuoteModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
input | SendForReviewInput | Yes | An object containing the quote UID and optional comment and attachments. Required field: quoteUid (string). Optional fields: comment (string), attachments (array of objects with key property). |
Events
Section titled “Events”Emits the quote-management/quote-sent-for-review event.
Returns
Section titled “Returns”Returns NegotiableQuoteModel or null.
sendQuoteTemplateForReview
Section titled “sendQuoteTemplateForReview”Submits a negotiable quote template for review by the seller. It supports submitting templates with optional name, comment, and reference document links, returns the updated template data on success, and emits an event for successful submissions.
const sendQuoteTemplateForReview = async ( params: SendQuoteTemplateForReviewParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | SendQuoteTemplateForReviewParams | Yes | An object of type `SendQuoteTemplateForReviewParams` containing the template UID and optional review notes. Submits the template for review by the seller or approver. |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns void.
setQuoteTemplateExpirationDate
Section titled “setQuoteTemplateExpirationDate”Sets the expiration date for a negotiable quote template. The function calls the setQuoteTemplateExpirationDate mutation.
const setQuoteTemplateExpirationDate = async ( params: SetQuoteTemplateExpirationDateParams): Promise<NegotiableQuoteTemplateModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | SetQuoteTemplateExpirationDateParams | Yes | An object containing the templateId (string) of the quote template and the expirationDate (string) to set. |
Events
Section titled “Events”Does not emit any drop-in events.
Returns
Section titled “Returns”Returns NegotiableQuoteTemplateModel or null.
setLineItemNote
Section titled “setLineItemNote”Sets a note for a specific negotiable quote line item and emits events with the updated quote data.
const setLineItemNote = async ( input: SetLineItemNoteInput): Promise<NegotiableQuoteModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
input | SetLineItemNoteInput | Yes | An object containing the quote UID, item UID, note text, and optional quantity. Required fields: quoteUid (string), itemUid (string), note (string). Optional field: quantity (number). |
Events
Section titled “Events”Emits the following events: quote-management/line-item-note-set, quote-management/quote-data.
Returns
Section titled “Returns”Returns NegotiableQuoteModel or null.
setShippingAddress
Section titled “setShippingAddress”Sets or updates the shipping address for a negotiable quote. It supports setting the address using either a saved customer address ID or by providing new address data. Returns the updated quote data on success and emits an event for successful updates.
const setShippingAddress = async ( input: SetShippingAddressInput): Promise<NegotiableQuoteModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
input | SetShippingAddressInput | Yes | An object containing the quote UID and either a saved address ID or new address data. Required field: quoteUid (string). Provide either addressId (number) for a saved address OR addressData (object) for a new address. Cannot provide both. |
Examples
Section titled “Examples”additionalInput: { vat_id: 'GB123456789', custom_attribute: 'value', delivery_instructions: 'Leave at door'}Events
Section titled “Events”Emits the quote-management/shipping-address-set event.
Returns
Section titled “Returns”Returns NegotiableQuoteModel or null.
updateQuantities
Section titled “updateQuantities”Updates the quantities of items in a negotiable quote. It validates input, transforms the request to GraphQL format, returns the updated quote data on success, and emits an event for successful updates.
const updateQuantities = async ( input: UpdateQuantitiesInput): Promise<NegotiableQuoteModel | null>| Parameter | Type | Req? | Description |
|---|---|---|---|
input | UpdateQuantitiesInput | Yes | An object containing the quote UID and an array of items with their new quantities. Required fields: quoteUid (string), items (array of objects, each with quoteItemUid (string) and quantity (number, must be positive integer)). |
Events
Section titled “Events”Emits the quote-management/quantities-updated event.
Returns
Section titled “Returns”Returns NegotiableQuoteModel or null.
updateQuoteTemplateItemQuantities
Section titled “updateQuoteTemplateItemQuantities”Changes the quantity of one or more items in an existing negotiable quote template. This allows updating item quantities, including optional min/max quantity constraints when the template uses min/max quantity settings.
const updateQuoteTemplateItemQuantities = async ( params: UpdateQuoteTemplateItemQuantitiesParams): Promise<any>| Parameter | Type | Req? | Description |
|---|---|---|---|
params | UpdateQuoteTemplateItemQuantitiesParams | Yes | An object of type `UpdateQuoteTemplateItemQuantitiesParams` containing the template UID and an array of item quantity updates (item UID and new quantity for each item). |
Events
Section titled “Events”Emits the quote-management/quote-template-data event.
Returns
Section titled “Returns”Returns void.
uploadFile
Section titled “uploadFile”Uploads a file attachment and returns a key for associating the file with a quote or quote template.
const uploadFile = async ( file: File): Promise<{ key: string }>| Parameter | Type | Req? | Description |
|---|---|---|---|
file | File | Yes | The File object to upload and attach to a quote. Supports specification documents, purchase orders, or any supporting files that provide context for quote requests. |
Events
Section titled “Events”Emits the quote-management/file-upload-error event.
Returns
Section titled “Returns”Returns { key: string }.
Type Definitions
Section titled “Type Definitions”The following input types are used by functions in this drop-in.
CloseNegotiableQuoteInput
Section titled “CloseNegotiableQuoteInput”The CloseNegotiableQuoteInput type is used by closeNegotiableQuote.
interface CloseNegotiableQuoteInput { /** Array of quote UIDs to close (must not be empty) */ quoteUids: string[];}DuplicateQuoteInput
Section titled “DuplicateQuoteInput”The DuplicateQuoteInput type is used by duplicateQuote.
interface DuplicateQuoteInput { /** The unique identifier of the original quote to duplicate */ quoteUid: string; /** The unique identifier of the duplicated quote */ duplicatedQuoteUid: string; /** Optional flag indicating if the duplicated quote has out-of-stock items */ hasOutOfStockItems?: boolean;}RemoveNegotiableQuoteItemsInput
Section titled “RemoveNegotiableQuoteItemsInput”The RemoveNegotiableQuoteItemsInput type is used by removeNegotiableQuoteItems.
interface RemoveNegotiableQuoteItemsInput { /** The unique identifier of the negotiable quote */ quoteUid: string; /** Array of quote item UIDs to remove (must not be empty) */ quoteItemUids: string[];}RenameNegotiableQuoteInput
Section titled “RenameNegotiableQuoteInput”The RenameNegotiableQuoteInput type is used by renameNegotiableQuote.
interface RenameNegotiableQuoteInput { /** The unique identifier of the negotiable quote */ quoteUid: string; /** The new name for the quote */ quoteName: string; /** Optional comment explaining the reason for the rename */ quoteComment?: string;}RequestNegotiableQuoteInput
Section titled “RequestNegotiableQuoteInput”The RequestNegotiableQuoteInput type is used by requestNegotiableQuote.
interface RequestNegotiableQuoteInput { /** The unique identifier of the cart to create the quote from */ cartId: string; /** The name for the negotiable quote */ quoteName: string; /** The comment or message to include with the quote request */ comment: string; /** Whether to save as a draft (optional) */ isDraft?: boolean; /** Array of file attachment keys (optional) */ attachments?: { key: string }[];}SendForReviewInput
Section titled “SendForReviewInput”The SendForReviewInput type is used by sendForReview.
interface SendForReviewInput { /** The unique identifier of the negotiable quote */ quoteUid: string; /** Optional comment to include with the submission */ comment?: string; /** Optional array of file attachment keys */ attachments?: { key: string }[];}SetQuoteTemplateExpirationDateParams
Section titled “SetQuoteTemplateExpirationDateParams”The SetQuoteTemplateExpirationDateParams type is used by setQuoteTemplateExpirationDate.
interface SetQuoteTemplateExpirationDateParams { templateId: string; expirationDate: string;}SetLineItemNoteInput
Section titled “SetLineItemNoteInput”The SetLineItemNoteInput type is used by setLineItemNote.
interface SetLineItemNoteInput { /** The unique identifier of the negotiable quote */ quoteUid: string; /** The unique identifier of the quote line item */ itemUid: string; /** The note text to set for the line item */ note: string; /** Optional quantity for the line item */ quantity?: number;}SetShippingAddressInput
Section titled “SetShippingAddressInput”The SetShippingAddressInput type is used by setShippingAddress.
interface SetShippingAddressInput { /** The unique identifier of the negotiable quote */ quoteUid: string; /** The ID of a saved customer address (use this OR addressData, not both) */ addressId?: number; /** New address data (use this OR addressId, not both) */ addressData?: AddressInput;}
interface AddressInput { /** City name */ city: string; /** Optional company name */ company?: string; /** Two-letter country code (e.g., 'US') */ countryCode: string; /** First name */ firstname: string; /** Last name */ lastname: string; /** Postal/ZIP code */ postcode: string; /** Optional state/province name */ region?: string; /** Optional state/province ID */ regionId?: number; /** Whether to save this address to the customer's address book */ saveInAddressBook?: boolean; /** Street address lines (array) */ street: string[]; /** Phone number */ telephone: string; /** Additional custom fields for the address */ additionalInput?: Record<string, any>;}UpdateQuantitiesInput
Section titled “UpdateQuantitiesInput”The UpdateQuantitiesInput type is used by updateQuantities.
interface UpdateQuantitiesInput { /** The unique identifier of the negotiable quote */ quoteUid: string; /** Array of items with their new quantities */ items: QuantityItem[];}
interface QuantityItem { /** The unique ID of the quote item */ quoteItemUid: string; /** The new quantity for the item (must be greater than 0 and an integer) */ quantity: number;}Data Models
Section titled “Data Models”The following data models are used by functions in this drop-in.
NegotiableQuoteModel
Section titled “NegotiableQuoteModel”The NegotiableQuoteModel object is returned by the following functions: duplicateQuote, removeNegotiableQuoteItems, renameNegotiableQuote, requestNegotiableQuote, sendForReview, setLineItemNote, setShippingAddress, updateQuantities.
interface NegotiableQuoteModel { uid: string; name: string; createdAt: string; salesRepName: string; expirationDate: string; updatedAt: string; status: NegotiableQuoteStatus; isVirtual: boolean; buyer: { firstname: string; lastname: string; }; email?: string; templateName?: string; totalQuantity: number; comments?: { uid: string; createdAt: string; author: { firstname: string; lastname: string; }; text: string; attachments?: { name: string; url: string; }[]; }[]; history?: NegotiableQuoteHistoryEntry[]; prices: { appliedDiscounts?: Discount[]; appliedTaxes?: Tax[]; discount?: Currency; grandTotal?: Currency; grandTotalExcludingTax?: Currency; shippingExcludingTax?: Currency; shippingIncludingTax?: Currency; subtotalExcludingTax?: Currency; subtotalIncludingTax?: Currency; subtotalWithDiscountExcludingTax?: Currency; totalTax?: Currency; }; items: CartItemModel[]; shippingAddresses?: ShippingAddress[]; canCheckout: boolean; canSendForReview: boolean; lockedForEditing?: boolean; canDelete: boolean; canClose: boolean; canUpdateQuote: boolean; readOnly: boolean;}NegotiableQuoteTemplateModel
Section titled “NegotiableQuoteTemplateModel”The NegotiableQuoteTemplateModel object is returned by the following functions: createQuoteTemplate, getQuoteTemplateData, setQuoteTemplateExpirationDate.
interface NegotiableQuoteTemplateModel { id: string; uid: string; name: string; createdAt: string; updatedAt: string; expirationDate?: string; status: NegotiableQuoteTemplateStatus; salesRepName: string; buyer: { firstname: string; lastname: string; }; comments?: QuoteTemplateComment[]; history?: NegotiableQuoteHistoryEntry[]; prices: { subtotalExcludingTax?: Currency; subtotalIncludingTax?: Currency; subtotalWithDiscountExcludingTax?: Currency; grandTotal?: Currency; appliedTaxes?: { amount: Currency; label: string; }[]; }; items: CartItemModel[]; shippingAddresses?: ShippingAddress[]; referenceDocuments?: { uid: string; name: string; identifier?: string; url: string; }[]; // Template-specific fields quantityThresholds?: { min?: number; max?: number; }; canAccept: boolean; canDelete: boolean; canReopen: boolean; canCancel: boolean; canSendForReview: boolean; canGenerateQuoteFromTemplate: boolean; canEditTemplateItems: boolean;}NegotiableQuoteTemplatesListModel
Section titled “NegotiableQuoteTemplatesListModel”The NegotiableQuoteTemplatesListModel object is returned by the following functions: getQuoteTemplates.
interface NegotiableQuoteTemplatesListModel { items: NegotiableQuoteTemplateListEntry[]; pageInfo: { currentPage: number; pageSize: number; totalPages: number; }; totalCount: number; paginationInfo?: PaginationInfo; sortFields?: { default: string; options: Array<{ label: string; value: string; }>; };}NegotiableQuotesListModel
Section titled “NegotiableQuotesListModel”The NegotiableQuotesListModel object is returned by the following functions: negotiableQuotes.
interface NegotiableQuotesListModel { items: NegotiableQuoteListEntry[]; pageInfo: { currentPage: number; pageSize: number; totalPages: number; }; totalCount: number; paginationInfo?: PaginationInfo; sortFields?: { default: string; options: Array<{ label: string; value: string; }>; };}StoreConfigModel
Section titled “StoreConfigModel”The StoreConfigModel object is returned by the following functions: getStoreConfig.
interface StoreConfigModel { quoteSummaryDisplayTotal: number; quoteSummaryMaxItems: number; quoteDisplaySettings: { zeroTax: boolean; subtotal: QuoteDisplayAmount; price: QuoteDisplayAmount; shipping: QuoteDisplayAmount; fullSummary: boolean; grandTotal: boolean; }; useConfigurableParentThumbnail: boolean; quoteMinimumAmount: number | null; quoteMinimumAmountMessage: string | null;}