Skip to main content

Quotes

@archibald/commerce/quotes implements the @archibald/quotes contract against the SAP Commerce quote OCC API — the B2B request-for-quote flow (draft, submit, negotiate, accept). The shop template's portal platform is the reference consumer.

How to use

Register the QuotesModule with the commerce provider:

// src/{platform}/server/module/server.tsx
import { QuotesModule } from '@archibald/quotes';
import { CommerceQuotesProvider } from '@archibald/commerce/quotes';

new QuotesModule({ provider: new CommerceQuotesProvider() });

On the client, your components consume the @archibald/quotes hooks/client and type against the interfaces this subpath exports (CommerceQuote, CommerceQuoteActions).

API reference

ExportSideWhat it is
CommerceQuote, CommerceQuoteActionsclientTyped quote shapes (states, entries, allowed actions)
CommerceQuotesProviderserverQuotesModule provider against OCC quotes
CommerceQuotesServiceserverThe OCC quote operations the provider delegates to
AggregatedQuotesServiceserverAggregates quote lists across sources/states
PersistedQuotesService, QuoteKeyProviderserverPersistence of quote drafts and the keying scheme
mapping helpersserverOCC quote → storefront mapping

Configuration

Reads the hybris block of the environment config; quote endpoints follow the configured OCC base.

Further documentation