@unchainedshop/core-quotations
Quotation management module for the Unchained Engine. Handles quote requests, proposals, and quotation workflows for custom pricing.
npm install @unchainedshop/core-quotations
import { configureQuotationsModule , QuotationStatus } from '@unchainedshop/core-quotations' ;
const quotationsModule = await configureQuotationsModule ( { db } ) ;
// Create a quotation request
const quotationId = await quotationsModule . create ( {
userId : 'user-123' ,
productId : 'custom-product-456' ,
configuration : [ { key : 'quantity' , value : '1000' } ] ,
} ) ;
// Propose a quote
await quotationsModule . propose ( quotationId , {
price : { amount : 5000 , currency : 'CHF' } ,
expiresAt : new Date ( '2024-12-31' ) ,
} ) ;
// Find quotations
const quotations = await quotationsModule . findQuotations ( {
status : QuotationStatus . PROPOSED ,
} ) ;
Export
Description
configureQuotationsModule
Configure and return the quotations module
Method
Description
findQuotation
Find quotation by ID
findQuotations
Find quotations with filtering and pagination
count
Count quotations matching query
quotationExists
Check if quotation exists
Method
Description
create
Create a quotation request
update
Update quotation data
delete
Delete a quotation
propose
Propose a quote
verify
Verify a quotation
reject
Reject a quotation
fulfill
Mark quotation as fulfilled
Export
Description
QuotationStatus
Status values (REQUESTED, PROCESSING, PROPOSED, FULFILLED, REJECTED)
Export
Description
quotationsSettings
Access quotation module settings
Export
Description
Quotation
Quotation document type
QuotationConfiguration
Configuration item type
QuotationsModule
Module interface type
Event
Description
QUOTATION_CREATE
Quotation requested
QUOTATION_UPDATE
Quotation updated
QUOTATION_REMOVE
Quotation deleted
QUOTATION_PROPOSE
Quote proposed
QUOTATION_REJECT
Quotation rejected
QUOTATION_FULLFILL
Quotation fulfilled
EUPL-1.2