Skip to content

Quote Management Data & Events

The Quote Management drop-in uses the event bus to emit and listen to events for communication between drop-ins and external integrations.

Version: 1.1.2
EventDirectionDescription
quote-management/file-upload-errorEmitsEmitted when a specific condition or state change occurs.
quote-management/line-item-note-setEmitsEmitted when a specific condition or state change occurs.
quote-management/negotiable-quote-delete-errorEmitsEmitted when a specific condition or state change occurs.
quote-management/negotiable-quote-deletedEmitsEmitted when a specific condition or state change occurs.
quote-management/negotiable-quote-requestedEmitsEmitted when a specific condition or state change occurs.
quote-management/quote-data/errorEmitsEmitted when an error occurs.
quote-management/quote-data/initializedEmitsEmitted when the component completes initialization.
quote-management/quote-template-data/errorEmitsEmitted when an error occurs.
quote-management/quote-template-deletedEmitsEmitted when a specific condition or state change occurs.
quote-management/quote-template-generatedEmitsEmitted when a specific condition or state change occurs.
quote-management/quote-templates-dataEmitsEmitted when a specific condition or state change occurs.
auth/permissionsListensFired by Auth (auth) when permissions are updated.
checkout/updatedListensFired by Checkout (checkout) when the component state is updated.
quote-management/initializedEmits and listensEmitted when the component completes initialization.
quote-management/negotiable-quote-close-errorEmits and listensEmitted and consumed for internal and external communication.
quote-management/negotiable-quote-closedEmits and listensEmitted and consumed for internal and external communication.
quote-management/permissionsEmits and listensEmitted when permissions are updated.
quote-management/quantities-updatedEmits and listensEmitted and consumed for internal and external communication.
quote-management/quote-dataEmits and listensEmitted and consumed for internal and external communication.
quote-management/quote-duplicatedEmits and listensEmitted and consumed for internal and external communication.
quote-management/quote-items-removedEmits and listensEmitted and consumed for internal and external communication.
quote-management/quote-renamedEmits and listensEmitted and consumed for internal and external communication.
quote-management/quote-sent-for-reviewEmits and listensEmitted and consumed for internal and external communication.
quote-management/quote-template-dataEmits and listensEmitted and consumed for internal and external communication.
quote-management/shipping-address-setEmits and listensEmitted and consumed for internal and external communication.

The following sections provide detailed information about each event, including its direction, event payload, and usage examples.

Fired by Auth (auth) when Adobe Commerce permissions are updated.

AuthPermissionsPayload
import { events } from '@dropins/tools/event-bus.js';
events.on('auth/permissions', (payload) => {
console.log('auth/permissions event received:', payload);
// Add your custom logic here
});

Fired by Checkout (checkout) when the component state is updated. Quote Management uses it to reload quote data when the checkout type is quote.

import { events } from '@dropins/tools/event-bus.js';
events.on('checkout/updated', (payload) => {
console.log('checkout/updated event received:', payload);
// Add your custom logic here
});

quote-management/file-upload-error (emits)

Section titled “quote-management/file-upload-error (emits)”

Emitted when uploadFile() fails to upload or finalize a file attachment.

{
error: string;
fileName?: string;
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/file-upload-error', (payload) => {
console.log('quote-management/file-upload-error event received:', payload);
// Add your custom logic here
});

quote-management/initialized (emits and listens)

Section titled “quote-management/initialized (emits and listens)”

Emitted when the Quote Management initializer finishes loading store configuration.

{
config: StoreConfigModel;
}

See StoreConfigModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/initialized', (payload) => {
console.log('quote-management/initialized event received:', payload);
// Add your custom logic here
});

quote-management/line-item-note-set (emits)

Section titled “quote-management/line-item-note-set (emits)”

Emitted after setLineItemNote() updates a line item note for a negotiable quote.

{
quote: NegotiableQuoteModel;
input: {
quoteUid: string;
itemUid: string;
note: string;
quantity?: number;
}
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/line-item-note-set', (payload) => {
console.log('quote-management/line-item-note-set event received:', payload);
// Add your custom logic here
});

quote-management/negotiable-quote-close-error (emits and listens)

Section titled “quote-management/negotiable-quote-close-error (emits and listens)”

Emitted when closeNegotiableQuote() fails to close one or more negotiable quotes.

{
error: Error;
attemptedQuoteUids: string[];
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/negotiable-quote-close-error', (payload) => {
console.log('quote-management/negotiable-quote-close-error event received:', payload);
// Add your custom logic here
});

quote-management/negotiable-quote-closed (emits and listens)

Section titled “quote-management/negotiable-quote-closed (emits and listens)”

Emitted after closeNegotiableQuote() closes one or more negotiable quotes.

{
closedQuoteUids: string[];
resultStatus: string;
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/negotiable-quote-closed', (payload) => {
console.log('quote-management/negotiable-quote-closed event received:', payload);
// Add your custom logic here
});

quote-management/negotiable-quote-delete-error (emits)

Section titled “quote-management/negotiable-quote-delete-error (emits)”

Emitted when deleteQuote() fails to delete one or more negotiable quotes.

{
error: Error;
attemptedQuoteUids: string[];
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/negotiable-quote-delete-error', (payload) => {
console.log('quote-management/negotiable-quote-delete-error event received:', payload);
// Add your custom logic here
});

quote-management/negotiable-quote-deleted (emits)

Section titled “quote-management/negotiable-quote-deleted (emits)”

Emitted after deleteQuote() deletes one or more negotiable quotes.

{
deletedQuoteUids: string[];
resultStatus: string;
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/negotiable-quote-deleted', (payload) => {
console.log('quote-management/negotiable-quote-deleted event received:', payload);
// Add your custom logic here
});

quote-management/negotiable-quote-requested (emits)

Section titled “quote-management/negotiable-quote-requested (emits)”

Emitted after requestNegotiableQuote() creates a negotiable quote from a cart.

{
quote: NegotiableQuoteModel | null;
input: {
cartId: string;
quoteName: string;
comment?: string;
attachments?: { key: string }[];
isDraft?: boolean;
}
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/negotiable-quote-requested', (payload) => {
console.log('quote-management/negotiable-quote-requested event received:', payload);
// Add your custom logic here
});

quote-management/permissions (emits and listens)

Section titled “quote-management/permissions (emits and listens)”

Emitted when the permissions state for Quote Management changes (for example, after auth/permissions is processed or on logout).

typeof state.permissions
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/permissions', (payload) => {
console.log('quote-management/permissions event received:', payload);
// Add your custom logic here
});

quote-management/quantities-updated (emits and listens)

Section titled “quote-management/quantities-updated (emits and listens)”

Emitted after updateQuantities() updates item quantities in a negotiable quote.

{
quote: NegotiableQuoteModel;
input: {
quoteUid: string;
items: Array<{ quoteItemUid: string; quantity: number }>;
}
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quantities-updated', (payload) => {
console.log('quote-management/quantities-updated event received:', payload);
// Add your custom logic here
});

quote-management/quote-data (emits and listens)

Section titled “quote-management/quote-data (emits and listens)”

Emitted when negotiable quote data is loaded or updated.

{
quote: NegotiableQuoteModel;
permissions: typeof state.permissions;
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-data', (payload) => {
console.log('quote-management/quote-data event received:', payload);
// Add your custom logic here
});

Emitted when Quote Management fails to load negotiable quote data during initialization.

{
error: Error;
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-data/error', (payload) => {
console.log('quote-management/quote-data/error event received:', payload);
// Add your custom logic here
});

quote-management/quote-data/initialized (emits)

Section titled “quote-management/quote-data/initialized (emits)”

Emitted the first time Quote Management successfully loads negotiable quote data during initialization.

{
quote: NegotiableQuoteModel;
permissions: typeof state.permissions;
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-data/initialized', (payload) => {
console.log('quote-management/quote-data/initialized event received:', payload);
// Add your custom logic here
});

quote-management/quote-duplicated (emits and listens)

Section titled “quote-management/quote-duplicated (emits and listens)”

Emitted after duplicateQuote() creates a copy of a negotiable quote.

{
quote: NegotiableQuoteModel;
input: {
quoteUid: string;
duplicatedQuoteUid: string;
}
hasOutOfStockItems?: boolean;
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-duplicated', (payload) => {
console.log('quote-management/quote-duplicated event received:', payload);
// Add your custom logic here
});

quote-management/quote-items-removed (emits and listens)

Section titled “quote-management/quote-items-removed (emits and listens)”

Emitted after removeNegotiableQuoteItems() removes one or more items from a negotiable quote.

{
quote: NegotiableQuoteModel;
removedItemUids: string[];
input: RemoveNegotiableQuoteItemsInput;
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-items-removed', (payload) => {
console.log('quote-management/quote-items-removed event received:', payload);
// Add your custom logic here
});

quote-management/quote-renamed (emits and listens)

Section titled “quote-management/quote-renamed (emits and listens)”

Emitted after renameNegotiableQuote() updates the name (and optional comment) of a negotiable quote.

{
quote: NegotiableQuoteModel;
input: {
quoteUid: string;
quoteName: string;
quoteComment?: string;
}
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-renamed', (payload) => {
console.log('quote-management/quote-renamed event received:', payload);
// Add your custom logic here
});

quote-management/quote-sent-for-review (emits and listens)

Section titled “quote-management/quote-sent-for-review (emits and listens)”

Emitted after sendForReview() submits a negotiable quote for merchant review.

{
quote: NegotiableQuoteModel;
input: {
quoteUid: string;
comment?: string;
attachments?: { key: string }[];
}
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-sent-for-review', (payload) => {
console.log('quote-management/quote-sent-for-review event received:', payload);
// Add your custom logic here
});

quote-management/quote-template-data (emits and listens)

Section titled “quote-management/quote-template-data (emits and listens)”

Emitted when quote template data is loaded or updated.

{
quoteTemplate: NegotiableQuoteTemplateModel;
permissions: typeof state.permissions;
}

See NegotiableQuoteTemplateModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-template-data', (payload) => {
console.log('quote-management/quote-template-data event received:', payload);
// Add your custom logic here
});

quote-management/quote-template-data/error (emits)

Section titled “quote-management/quote-template-data/error (emits)”

Emitted when Quote Management fails to load quote template data during initialization.

{
error: Error;
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-template-data/error', (payload) => {
console.log('quote-management/quote-template-data/error event received:', payload);
// Add your custom logic here
});

quote-management/quote-template-deleted (emits)

Section titled “quote-management/quote-template-deleted (emits)”

Emitted after deleteQuoteTemplate() deletes a quote template.

{
templateId: string;
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-template-deleted', (payload) => {
console.log('quote-management/quote-template-deleted event received:', payload);
// Add your custom logic here
});

quote-management/quote-template-generated (emits)

Section titled “quote-management/quote-template-generated (emits)”

Emitted after generateQuoteFromTemplate() creates a new negotiable quote from a template.

{
quoteId: string;
}
import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-template-generated', (payload) => {
console.log('quote-management/quote-template-generated event received:', payload);
// Add your custom logic here
});

quote-management/quote-templates-data (emits)

Section titled “quote-management/quote-templates-data (emits)”

Emitted after getQuoteTemplates() loads the quote templates list.

{
quoteTemplates: NegotiableQuoteTemplatesListModel;
permissions: typeof state.permissions;
}

See NegotiableQuoteTemplatesListModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/quote-templates-data', (payload) => {
console.log('quote-management/quote-templates-data event received:', payload);
// Add your custom logic here
});

quote-management/shipping-address-set (emits and listens)

Section titled “quote-management/shipping-address-set (emits and listens)”

Emitted after setShippingAddress() updates the shipping address for a negotiable quote.

{
quote: NegotiableQuoteModel;
input: {
quoteUid: string;
addressId?: number;
addressData?: AddressInput;
}
}

See NegotiableQuoteModel for full type definition.

import { events } from '@dropins/tools/event-bus.js';
events.on('quote-management/shipping-address-set', (payload) => {
console.log('quote-management/shipping-address-set event received:', payload);
// Add your custom logic here
});

The following data models are used in event payloads for this drop-in.

Used in: quote-management/line-item-note-set, quote-management/negotiable-quote-requested, quote-management/quantities-updated, quote-management/quote-data, quote-management/quote-data/initialized, quote-management/quote-duplicated, quote-management/quote-items-removed, quote-management/quote-renamed, quote-management/quote-sent-for-review, quote-management/shipping-address-set.

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;
}

Used in: quote-management/quote-template-data.

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;
}

Used in: quote-management/quote-templates-data.

interface NegotiableQuoteTemplatesListModel {
items: NegotiableQuoteTemplateListEntry[];
pageInfo: {
currentPage: number;
pageSize: number;
totalPages: number;
};
totalCount: number;
paginationInfo?: PaginationInfo;
sortFields?: {
default: string;
options: Array<{
label: string;
value: string;
}>;
};
}

Used in: quote-management/initialized.

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;
}