Skip to main content

Catalog

Overview​

Tenant products, categories, tags, and per-channel listings.

Responsibilities​

  • Product command and query.
  • Catalog ingestion and product import from channels.
  • Publish allocation changes into the stock sync path.

Code map​

PiecePath
Product featuresrc/modules/commerce/product
Category, tagsrc/modules/commerce/category, src/modules/commerce/tag
Schema20-catalog.prisma
Embedding listenerproduct-embedding.listener.ts

Entities: Product, ChannelListing, CatalogProduct, Category, Tag.

Business rules​

Channel allocation mode, buffer, min/max publish quantity, and zero-quantity behaviour live on Channel as defaults and can exist per listing. Publishing policy is data. The numeric formula was not extracted. See Inventory.

product.content.changed and product.channel-allocation.changed are in-process events, not outbox types found in enqueue calls.

API surface​

Product, category, and tag controllers. Channel product sync endpoints also exist on provider controllers (Amazon, BigCommerce, and others). Use OpenAPI.

ProductController at /v1/commerce/products includes file imports (POST bulk-import/file, 202 Accepted), listing search (GET channel-listings with channel, mapping status, search and pagination), link/unlink/auto-map actions, and channel SKU mapping import. Product file import can set pushPricesToListings=true to update active, same-currency Amazon or Flipkart listings when price management is enabled.

Channel price endpoints are GET channel-prices/export, POST channel-prices/preview, POST channel-prices/apply, and POST channel-prices/submit (202 Accepted, queued). They also include GET channel-prices/failures (skip/take) and per-listing retry, check-live, and adopt actions. The price spreadsheet has six ordered columns: Channel Code, Warehouse SKU, Channel SKU, External ID, Selling Price, MRP. The server validates headers and rows; a queued response is not a per-row success result. See Channel pricing.

Events​

EventListener
product.content.changedembedding
product.channel-allocation.changedProductStockSyncListener

Integrations​

Marketplace catalog services are auto-registered when the class name matches {Provider}CatalogService. A provider without both order and catalog services is not registered.

Failure scenarios​

Embedding failures are caught so API boot does not require the AI gateway. Content embeddings can lag. That is separate from inventory publish.

Development​

Do not import a marketplace SDK into the product module. Call the integration from src/integrations.